diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 63c09554ba..379a5fffb4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -36,7 +36,7 @@ jobs: uses: actions/setup-java@v2 with: java-version: 8 - distribution: adopt-hotspot + distribution: temurin - name: License Check run: mvn apache-rat:check "-Drat.consoleOutput" @@ -49,44 +49,21 @@ jobs: strategy: matrix: - os: [ ubuntu-latest, windows-latest, macOS-latest ] - java: - # 8 - - version: 8 - dist: adopt-hotspot - - version: 8 - dist: adopt-openj9 - - version: 8 - dist: zulu - # 11 - - version: 11 - dist: adopt-hotspot - - version: 11 - dist: adopt-openj9 - - version: 11 - dist: zulu - # 17 (16 fallback) - - version: 17 - dist: temurin - - version: 16 - dist: adopt-openj9 - - version: 17 - dist: zulu + os: [ 'ubuntu-latest', 'windows-latest', 'macOS-latest' ] + jdk: [ 8, 11, 17 ] + dist: [ 'temurin', 'adopt-openj9', 'zulu' ] exclude: # was already built - - os: ubuntu-latest - java: - version: 8 - dist: adopt-hotspot + - os: 'ubuntu-latest' + jdk: 8 + dist: 'temurin' # exclude some builds, because MacOs builds have fewer resources available. # excludes java 16 on macOS. - - os: macOS-latest - java: - version: 16 + - os: 'macOS-latest' + jdk: 16 # exclude temurin on MacOS. zulu (also hotspot) and OpenJ9 are sufficient. - - os: macOS-latest - java: - dist: adopt-hotspot + - os: 'macOS-latest' + dist: 'temurin' fail-fast: false runs-on: ${{ matrix.os }} @@ -95,22 +72,11 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up cache for ~./m2/repository - uses: actions/cache@v2.1.6 - with: - path: | - ~/.m2/repository - !~/.m2/repository/org/apache/shiro - key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-${{ matrix.os }}-java${{ matrix.java }}- - maven-${{ matrix.os }}- - - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: - java-version: ${{ matrix.java.version }} - distribution: ${{ matrix.java.dist }} + java-version: ${{ matrix.jdk }} + distribution: ${{ matrix.dist }} - name: Build with Maven run: mvn verify --show-version --errors --batch-mode --no-transfer-progress -Pdocs