(improvement)(build) CI supports JDK 21. (#1548)

This commit is contained in:
lexluo09
2024-08-09 20:32:54 +08:00
committed by GitHub
parent e586d887ed
commit cc3fa0078a
4 changed files with 10 additions and 7 deletions

View File

@@ -1,5 +1,4 @@
name: supersonic CentOS CI
on:
push:
branches:
@@ -16,7 +15,7 @@ jobs:
strategy:
matrix:
java-version: [8, 11] # 定义要测试的JDK版本
java-version: [8, 11, 21] # 定义要测试的JDK版本
steps:
- uses: actions/checkout@v2
@@ -36,10 +35,14 @@ jobs:
for i in {1..5}; do
dnf install -y java-1.8.0-openjdk-devel maven && break || sleep 15
done
else
elif [ ${{ matrix.java-version }} -eq 11 ]; then
for i in {1..5}; do
dnf install -y java-11-openjdk-devel maven && break || sleep 15
done
elif [ ${{ matrix.java-version }} -eq 21 ]; then
for i in {1..5}; do
dnf install -y java-21-openjdk-devel maven && break || sleep 15
done
fi
- name: Verify Java and Maven installation

View File

@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
java-version: [8, 11] # Define the JDK versions to test
java-version: [8, 11, 21] # Define the JDK versions to test
steps:
- uses: actions/checkout@v2

View File

@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
java-version: [8, 11] # 定义要测试的JDK版本
java-version: [8, 11, 21] # 定义要测试的JDK版本
steps:
- uses: actions/checkout@v2

View File

@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
java-version: [8, 11]
java-version: [8, 11, 21] # Add JDK 21 to the matrix
steps:
- uses: actions/checkout@v2
@@ -23,7 +23,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
distribution: 'adopt' # You might need to change this if 'adopt' doesn't support JDK 21
- name: Cache Maven packages
uses: actions/cache@v2