name: CI

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [8, 11]
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java }}
    - name: Build with Maven
      run: mvn -B package --file pom.xml
      env:
        JAVA_TOOL_OPTIONS: -Xmx2G
