Skip to content

Commit

Permalink
[Java] add jdk 21 tests ci (#978)
Browse files Browse the repository at this point in the history
* add jdk 21 tests

* use oracle jdk

* use oracle jdk for jdk21

* upgrade lombok for jdk21
  • Loading branch information
chaokunyang committed Oct 6, 2023
1 parent a8e8b38 commit cfa074f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 18 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,28 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
distribution: 'temurin' # temurin hasn't release for jdk21
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run CI with Maven
run: PATH="$HOME/miniconda/bin:$PATH" ./ci/run_ci.sh java${{ matrix.java-version }}
java21:
name: Java CI
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ["21"]
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'oracle'
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
Expand Down
39 changes: 23 additions & 16 deletions ci/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ integration_tests() {
cd "$ROOT"/integration_tests/perftests
echo "Start latest jdk tests"
cd "$ROOT"/integration_tests/latest_jdk_tests
echo "latest_jdk_tests: JDK 17"
export JAVA_HOME="$ROOT/zulu17.44.17-ca-crac-jdk17.0.8-linux_x64"
export PATH=$JAVA_HOME/bin:$PATH
mvn -T10 -B --no-transfer-progress clean test
echo "latest_jdk_tests: JDK 21"
export JAVA_HOME="$ROOT/zulu21.28.85-ca-jdk21.0.0-linux_x64"
export PATH=$JAVA_HOME/bin:$PATH
Expand All @@ -112,6 +108,23 @@ integration_tests() {
done
}

jdk17_plus_tests() {
java -version
echo "Executing fury java tests"
cd "$ROOT/java"
set +e
mvn -T16 --batch-mode --no-transfer-progress test -pl '!fury-format,!fury-testsuite,!fury-benchmark'
testcode=$?
if [[ $testcode -ne 0 ]]; then
exit $testcode
fi
echo "Executing fury java tests succeeds"
echo "Executing latest_jdk_tests"
cd "$ROOT"/integration_tests/latest_jdk_tests
mvn -T10 -B --no-transfer-progress clean test
echo "Executing latest_jdk_tests succeeds"
}

case $1 in
java8)
echo "Executing fury java tests"
Expand All @@ -124,7 +137,7 @@ case $1 in
fi
echo "Executing fury java tests succeeds"
;;
java11)
java11)
java -version
echo "Executing fury java tests"
cd "$ROOT/java"
Expand All @@ -136,17 +149,11 @@ case $1 in
fi
echo "Executing fury java tests succeeds"
;;
java17)
java -version
echo "Executing fury java tests"
cd "$ROOT/java"
set +e
mvn -T16 --batch-mode --no-transfer-progress test -pl '!fury-format,!fury-testsuite,!fury-benchmark'
testcode=$?
if [[ $testcode -ne 0 ]]; then
exit $testcode
fi
echo "Executing fury java tests succeeds"
java17)
jdk17_plus_tests
;;
java21)
jdk17_plus_tests
;;
integration_tests)
echo "Install jdk"
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down

0 comments on commit cfa074f

Please sign in to comment.