Test with JDK 21 #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
path-ignore: | |
- '**/*.md' | |
pull_request: | |
path-ignore: | |
- '**/*.md' | |
# First build on Linux with JDK 11 | |
# Then run tests with various Gradle and JDKs versions | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Build with Gradle | |
id: gradle-build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --scan build | |
- name: Store reports | |
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-reports | |
path: build/reports/ | |
test-gradle: | |
needs: linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
gradle: [ '8.5', '8.4', '8.3', '8.2.1', '8.1.1', '8.0.2', '7.5.1', '7.4.2', '7.3.3', '7.2', '7.1.1', '7.0.2', '6.9.4', '6.8.3' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Build with Gradle | |
id: gradle-build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --scan test "-Ptest.gradle-version=${{ matrix.gradle }}" | |
- name: Store reports | |
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gradle-${{ matrix.gradle }}-tests | |
path: build/reports/tests/test/ | |
test-jdk: | |
needs: linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 8, 17 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
${{ matrix.java }} | |
11 | |
- name: Setup environment | |
run: | | |
echo "org.gradle.java.installations.auto-download=false" | tee -a gradle.properties | |
echo "org.gradle.java.installations.fromEnv=JAVA_HOME_${{ matrix.java }}_X64" | tee -a gradle.properties | |
- name: Build with Gradle | |
id: gradle-build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --scan test "-Ptest.java-toolchain=${{ matrix.java }}" | |
- name: Store reports | |
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jdk-${{ matrix.java }}-tests | |
path: build/reports/tests/test/ | |
test-gradle-jdk17: | |
needs: linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
gradle: [ '8.5', '8.4', '8.3', '8.2.1', '8.1.1', '8.0.2', '7.5.1', '7.4.2', '7.3.3', '7.2' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
17 | |
11 | |
- name: Setup environment | |
run: | | |
echo "org.gradle.java.installations.auto-download=false" | tee -a gradle.properties | |
echo "org.gradle.java.installations.fromEnv=JAVA_HOME_17_X64" | tee -a gradle.properties | |
- name: Build with Gradle | |
id: gradle-build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --scan test -Ptest.java-toolchain=17 "-Ptest.gradle-version=${{ matrix.gradle }}" | |
- name: Store reports | |
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jdk17-gradle-${{ matrix.gradle }}-tests | |
path: build/reports/tests/test/ | |
test-gradle-jdk21: | |
needs: linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
gradle: [ '8.5' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
21 | |
11 | |
- name: Setup environment | |
run: | | |
echo "org.gradle.java.installations.auto-download=false" | tee -a gradle.properties | |
echo "org.gradle.java.installations.fromEnv=JAVA_HOME_21_X64" | tee -a gradle.properties | |
- name: Build with Gradle | |
id: gradle-build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --scan test -Ptest.java-toolchain=21 "-Ptest.gradle-version=${{ matrix.gradle }}" | |
- name: Store reports | |
if: always() && (steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jdk21-gradle-${{ matrix.gradle }}-tests | |
path: build/reports/tests/test/ |