1name: CI 2 3on: 4 push: 5 branches: 6 - '*' 7 pull_request: 8 branches: 9 - '*' 10 11# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners 12 13concurrency: 14 # On master/release, we don't want any jobs cancelled so the sha is used to name the group 15 # On PR branches, we cancel the job if new commits are pushed 16 # More info: https://stackoverflow.com/a/68422069/253468 17 group: ${{ (github.ref == 'refs/heads/branch_1.2.18' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }} 18 cancel-in-progress: true 19 20permissions: 21 contents: read 22 23jobs: 24 Test: 25 name: JDK ${{ matrix.jdk }}, ${{ matrix.os }} 26 runs-on: ${{ matrix.os }} 27 strategy: 28 matrix: 29 jdk: [11, 17, 19] 30 os: [ubuntu-latest, windows-latest, macos-latest] 31 fail-fast: true 32 max-parallel: 4 33 steps: 34 - uses: actions/checkout@v3 35 with: 36 fetch-depth: 50 37 - name: Set up Java ${{ matrix.jdk }} 38 if: ${{ matrix.jdk != '8' }} 39 uses: actions/setup-java@v3 40 with: 41 distribution: 'temurin' 42 java-version: ${{ matrix.jdk }} 43 - name: Install 44 # download dependencies, etc, so test log looks better 45 run: mvn -B install 46 47 48