name: JavaCI

on: [push, pull_request]

jobs:
  ubuntu_build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [8, 11]
    steps:
      - uses: actions/checkout@v3
      - name: Setup java
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java }} 
          distribution: 'zulu'
          cache: 'maven'
      - name: Build with Maven
        run: mvn clean package -P full

  windows_build:
    runs-on: windows-2019
    strategy:
      matrix:
        java: [8, 11]
    steps:
      - uses: actions/checkout@v3
      - name: Setup java
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java }} 
          distribution: 'zulu'
          cache: 'maven'
      - name: Build with Maven
        run: mvn clean package -P full

  macos_build:
    runs-on: macos-latest
    strategy:
      matrix:
        java: [8, 11]
    steps:
      - uses: actions/checkout@v3
      - name: Setup java
        uses: actions/setup-java@v3
        with:
          java-version: ${{ matrix.java }} 
          distribution: 'zulu'
          cache: 'maven'
      - name: Build with Maven
        run: mvn clean package -P full
