2828 strategy :
2929 fail-fast : false
3030 matrix :
31- java : [ '17', '21' ]
31+ java : [ '17', '21', '23' ]
3232 os : [ 'ubuntu-24.04', 'windows-latest', 'macos-latest' ]
3333 steps :
3434 - name : Checkout code
@@ -52,18 +52,49 @@ jobs:
5252 with :
5353 distribution : ' zulu'
5454 java-version : ${{ matrix.java }}
55- - name : Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION
55+ - name : Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Unix)
56+ if : runner.os != 'Windows'
5657 run : |
5758 java -Xinternalversion
5859 echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV
5960 echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV
60- - name : Setup java 17 to run the Gradle script
61+ - name : Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Windows)
62+ if : runner.os == 'Windows'
63+ run : |
64+ java -Xinternalversion
65+ echo "BUILD_JAVA_HOME=$env:JAVA_HOME" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
66+ echo "BUILD_JAVA_VERSION=${{ matrix.java }}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
67+ - name : Setup java
6168 uses : actions/setup-java@v4
6269 with :
6370 distribution : ' zulu'
6471 java-version : 17
6572 - name : Build with Gradle
66- run : ./gradlew --stacktrace
73+ run : ./gradlew
74+ - name : Copy test logs (Unix)
75+ id : copy_test_logs
76+ if : failure() && runner.os != 'Windows'
77+ run : |
78+ echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT
79+ ./gradlew tarTestLogs
80+ - name : Upload crash logs (Unix)
81+ if : always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2'
82+ uses : actions/upload-artifact@v4
83+ with :
84+ name : crash-logs-${{ matrix.os }}-java-${{ matrix.java }}
85+ path : ${{ steps.copy_test_logs.outputs.file }}
86+ - name : Copy test logs (Windows)
87+ id : copy_test_logs_windows
88+ if : runner.os == 'Windows' && failure()
89+ run : |
90+ echo "file=build/distributions/test_logs.tbz2" | Out-File $env:GITHUB_OUTPUT -Encoding utf8 -Append
91+ ./gradlew tarTestLogs
92+ - name : Upload crash logs (Windows)
93+ if : runner.os == 'Windows' && always() && steps.copy_test_logs_windows.outputs.file == 'build/distributions/test_logs.tbz2'
94+ uses : actions/upload-artifact@v4
95+ with :
96+ name : crash-logs-${{ matrix.os }}-java-${{ matrix.java }}
97+ path : ${{ steps.copy_test_logs_windows.outputs.file }}
6798
6899 csharp-build :
69100 name : C# ${{ matrix.dotnet }}
0 commit comments