Skip to content

Commit b400a5a

Browse files
authored
chore(ci): switch CI from JDK 17 to GraalVM JDK 25 (#16)
1 parent f1dd21c commit b400a5a

3 files changed

Lines changed: 66 additions & 22 deletions

File tree

.github/workflows/rebuild_native_libs.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ jobs:
109109
wget -nv https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz
110110
tar -zxf cmake-3.29.2-linux-x86_64.tar.gz
111111
echo "PATH=`pwd`/cmake-3.29.2-linux-x86_64/bin/:$PATH" >> "$GITHUB_ENV"
112-
- name: Install JDK17 (for jni.h)
112+
- name: Install GraalVM JDK 25 (for jni.h)
113113
run: |
114-
wget -nv https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz
115-
tar xfz OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz
116-
echo "JAVA_HOME=`pwd`/jdk-17.0.11+9/" >> "$GITHUB_ENV"
114+
wget -nv -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz
115+
mkdir graalvm
116+
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
117+
echo "JAVA_HOME=`pwd`/graalvm" >> "$GITHUB_ENV"
117118
- name: Generate Makefiles
118119
run: |
119120
cd ./core
@@ -144,11 +145,12 @@ jobs:
144145
run: |
145146
yum update -y
146147
yum install wget nasm zstd -y
147-
- name: Install JDK17 (for jni.h)
148+
- name: Install GraalVM JDK 25 (for jni.h)
148149
run: |
149-
wget -v --timeout=180 https://api.adoptium.net/v3/binary/version/jdk-17.0.11+9/linux/aarch64/jdk/hotspot/normal/eclipse
150-
tar xfvz eclipse
151-
echo "JAVA_HOME=`pwd`/jdk-17.0.11+9/" >> "$GITHUB_ENV"
150+
wget -v --timeout=180 -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-aarch64_bin.tar.gz
151+
mkdir graalvm
152+
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
153+
echo "JAVA_HOME=`pwd`/graalvm" >> "$GITHUB_ENV"
152154
- name: CMAKE linux-aarch64
153155
run: |
154156
cd ./core
@@ -177,10 +179,16 @@ jobs:
177179
sudo sysctl -w fs.file-max=500000
178180
sudo apt-get update -y
179181
sudo apt-get install -y nasm gcc-mingw-w64 g++-mingw-w64
180-
- name: Download windows jni_md.h from JDK 11
182+
- name: Install GraalVM JDK 25 (for jni.h)
183+
run: |
184+
wget -nv -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz
185+
mkdir graalvm
186+
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
187+
echo "JAVA_HOME=`pwd`/graalvm" >> "$GITHUB_ENV"
188+
- name: Download windows jni_md.h from JDK 25
181189
run: |
182190
cd core
183-
curl https://raw.githubusercontent.com/AdoptOpenJDK/openjdk-jdk11/master/src/java.base/windows/native/include/jni_md.h > $JAVA_HOME/include/jni_md.h
191+
curl https://raw.githubusercontent.com/openjdk/jdk25u/master/src/java.base/windows/native/include/jni_md.h > $JAVA_HOME/include/jni_md.h
184192
- name: CMake Windows
185193
run: |
186194
cd core

ci/run_tests_pipeline.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ stages:
2323
pool:
2424
name: "Azure Pipelines"
2525
vmImage: "ubuntu-latest"
26+
variables:
27+
jdkArch: "x64"
28+
imageName: "ubuntu-latest"
2629
steps:
2730
- checkout: self
2831
fetchDepth: 0
@@ -33,12 +36,7 @@ stages:
3336
git checkout FETCH_HEAD
3437
displayName: "Checkout PR source branch"
3538
condition: eq(variables['Build.Reason'], 'PullRequest')
36-
- task: JavaToolInstaller@0
37-
displayName: "Install Java 17"
38-
inputs:
39-
versionSpec: "17"
40-
jdkArchitectureOption: "x64"
41-
jdkSourceOption: "PreInstalled"
39+
- template: setup.yaml
4240
- bash: mvn -f core/pom.xml javadoc:javadoc -Pjavadoc --batch-mode
4341
displayName: "Verify Javadoc"
4442

ci/setup.yaml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
11
steps:
2-
- task: JavaToolInstaller@0
3-
displayName: "Install Java 17"
4-
inputs:
5-
versionSpec: "17"
6-
jdkArchitectureOption: "$(jdkArch)"
7-
jdkSourceOption: "PreInstalled"
2+
- bash: |
3+
set -eux
4+
case "$(jdkArch)" in
5+
arm64) ARCH="aarch64" ;;
6+
*) ARCH="x64" ;;
7+
esac
8+
curl -fsSL -o "$HOME/graalvm.tar.gz" \
9+
"https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-${ARCH}_bin.tar.gz"
10+
mkdir -p "$HOME/graalvm"
11+
tar -xzf "$HOME/graalvm.tar.gz" -C "$HOME/graalvm" --strip-components=1
12+
echo "##vso[task.setvariable variable=JAVA_HOME]$HOME/graalvm"
13+
echo "##vso[task.prependpath]$HOME/graalvm/bin"
14+
displayName: "Install GraalVM JDK 25 (Linux)"
15+
condition: eq(variables['Agent.OS'], 'Linux')
16+
17+
- bash: |
18+
set -eux
19+
case "$(jdkArch)" in
20+
arm64) ARCH="aarch64" ;;
21+
*) ARCH="x64" ;;
22+
esac
23+
curl -fsSL -o "$HOME/graalvm.tar.gz" \
24+
"https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_macos-${ARCH}_bin.tar.gz"
25+
mkdir -p "$HOME/graalvm"
26+
tar -xzf "$HOME/graalvm.tar.gz" -C "$HOME/graalvm" --strip-components=1
27+
echo "##vso[task.setvariable variable=JAVA_HOME]$HOME/graalvm/Contents/Home"
28+
echo "##vso[task.prependpath]$HOME/graalvm/Contents/Home/bin"
29+
displayName: "Install GraalVM JDK 25 (macOS)"
30+
condition: eq(variables['Agent.OS'], 'Darwin')
31+
32+
- powershell: |
33+
$ErrorActionPreference = "Stop"
34+
$url = "https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_windows-x64_bin.zip"
35+
$zip = Join-Path $env:USERPROFILE "graalvm.zip"
36+
$dest = Join-Path $env:USERPROFILE "graalvm"
37+
Invoke-WebRequest -Uri $url -OutFile $zip -UseBasicParsing
38+
if (Test-Path $dest) { Remove-Item -Recurse -Force $dest }
39+
Expand-Archive -Path $zip -DestinationPath $dest -Force
40+
$jdkDir = Get-ChildItem -Path $dest -Directory | Select-Object -First 1
41+
$javaHome = $jdkDir.FullName
42+
Write-Host "##vso[task.setvariable variable=JAVA_HOME]$javaHome"
43+
Write-Host "##vso[task.prependpath]$javaHome\bin"
44+
displayName: "Install GraalVM JDK 25 (Windows)"
45+
condition: eq(variables['Agent.OS'], 'Windows_NT')
846
947
- bash: sudo sysctl -w fs.file-max=500000
1048
displayName: "Increase file count on Linux"

0 commit comments

Comments
 (0)