Skip to content

Commit 51ed8ea

Browse files
authored
ci(build): build and release questdb-client on JDK 8 (#56)
1 parent bbc0c96 commit 51ed8ea

1 file changed

Lines changed: 53 additions & 33 deletions

File tree

.github/workflows/maven_central_release.yml

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ jobs:
7272
ref: ${{ inputs.source_ref }}
7373
fetch-depth: 0
7474

75-
- name: Set up Java 11
75+
- name: Set up Java 8
7676
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
7777
with:
7878
distribution: temurin
79-
java-version: "11"
79+
java-version: "8"
8080
cache: maven
8181

8282
- name: Resolve versions and guard against re-release
@@ -168,11 +168,15 @@ jobs:
168168
ref: ${{ needs.resolve.outputs.source_sha }}
169169
submodules: true
170170

171-
- name: Set up Java 11
171+
- name: Set up Java 8
172172
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
173173
with:
174-
distribution: temurin
175-
java-version: "11"
174+
# Temurin publishes no macOS/aarch64 8u, which fails the darwin-aarch64
175+
# (macos-14) leg; Zulu ships both macOS aarch64 and x64 8u. The macOS
176+
# jni_md.h is ABI-identical across vendors, so building the native lib
177+
# against Zulu's JDK 8 headers matches the artifact's Java 8 floor.
178+
distribution: zulu
179+
java-version: "8"
176180

177181
- name: Install toolchains
178182
run: |
@@ -222,9 +226,16 @@ jobs:
222226
timeout-minutes: 60
223227
container:
224228
image: quay.io/pypa/manylinux2014_x86_64
229+
# GitHub's runner now forces JS actions (actions/checkout) onto Node 24, but
230+
# Node 24 needs glibc >= 2.28 while this container is glibc 2.17 -- the stock
231+
# /__e/node24 binary aborts with `GLIBC_2.27'/`GLIBC_2.28' not found`. There is
232+
# no glibc-2.17 build of Node 24, so shadow BOTH /__e/node20 AND /__e/node24
233+
# with the glibc-2.17 Node 20 binary installed below; checkout's JS runs fine
234+
# on it regardless of the runtime the runner advertises.
225235
volumes:
226236
- /node20217:/node20217
227237
- /node20217:/__e/node20
238+
- /node20217:/__e/node24
228239
steps:
229240
- name: Install tools
230241
run: |
@@ -238,11 +249,14 @@ jobs:
238249
rpmbuild --rebuild ./nasm-2.16.03-0.fc39.src.rpm
239250
rpm -i ~/rpmbuild/RPMS/x86_64/nasm-2.16.03-0.el7.x86_64.rpm
240251
241-
- name: Install Node.js 20 glibc2.17
252+
- name: Install Node.js 20 glibc2.17 (shadows /__e/node20 and /__e/node24)
242253
run: |
243254
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
244255
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
256+
# The same /node20217 source is bind-mounted over both runtime paths, so the
257+
# glibc-2.17 binary is what runs whether the runner picks node20 or node24.
245258
ldd /__e/node20/bin/node
259+
ldd /__e/node24/bin/node
246260
247261
- name: Check out release source
248262
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -256,13 +270,15 @@ jobs:
256270
tar -zxf cmake-3.29.2-linux-x86_64.tar.gz
257271
echo "PATH=$(pwd)/cmake-3.29.2-linux-x86_64/bin/:$PATH" >> "$GITHUB_ENV"
258272
259-
- name: Install GraalVM JDK 25
273+
- name: Install Temurin JDK 8
260274
run: |
261-
# TODO(pin): replace /25/latest/ with an exact GraalVM build URL and verify a sha256.
262-
wget -nv -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz
263-
mkdir graalvm
264-
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
265-
echo "JAVA_HOME=$(pwd)/graalvm" >> "$GITHUB_ENV"
275+
# Build the native lib against the Java 8 JNI headers -- JDK 8 is the artifact's
276+
# floor. The Adoptium "latest GA" redirect tracks the newest 8u release.
277+
# TODO(pin): pin to an exact Temurin 8u build URL and verify a sha256.
278+
wget -nv -O jdk8.tar.gz https://api.adoptium.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/eclipse
279+
mkdir jdk8
280+
tar xfz jdk8.tar.gz -C jdk8 --strip-components=1
281+
echo "JAVA_HOME=$(pwd)/jdk8" >> "$GITHUB_ENV"
266282
267283
- name: Build native library
268284
run: |
@@ -320,13 +336,15 @@ jobs:
320336
yum update -y
321337
yum install wget nasm zstd -y
322338
323-
- name: Install GraalVM JDK 25
339+
- name: Install Temurin JDK 8
324340
run: |
325-
# TODO(pin): replace /25/latest/ with an exact GraalVM build URL and verify a sha256.
326-
wget -v --timeout=180 -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-aarch64_bin.tar.gz
327-
mkdir graalvm
328-
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
329-
echo "JAVA_HOME=$(pwd)/graalvm" >> "$GITHUB_ENV"
341+
# Build the native lib against the Java 8 JNI headers -- JDK 8 is the artifact's
342+
# floor. The Adoptium "latest GA" redirect tracks the newest 8u release.
343+
# TODO(pin): pin to an exact Temurin 8u build URL and verify a sha256.
344+
wget -v --timeout=180 -O jdk8.tar.gz https://api.adoptium.net/v3/binary/latest/8/ga/linux/aarch64/jdk/hotspot/normal/eclipse
345+
mkdir jdk8
346+
tar xfz jdk8.tar.gz -C jdk8 --strip-components=1
347+
echo "JAVA_HOME=$(pwd)/jdk8" >> "$GITHUB_ENV"
330348
331349
- name: Build native library
332350
run: |
@@ -382,19 +400,21 @@ jobs:
382400
sudo apt-get update -y
383401
sudo apt-get install -y nasm gcc-mingw-w64 g++-mingw-w64
384402
385-
- name: Install GraalVM JDK 25
403+
- name: Install Temurin JDK 8
386404
run: |
387-
# TODO(pin): replace /25/latest/ with an exact GraalVM build URL and verify a sha256.
388-
wget -nv -O graalvm.tar.gz https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz
389-
mkdir graalvm
390-
tar xfz graalvm.tar.gz -C graalvm --strip-components=1
391-
echo "JAVA_HOME=$(pwd)/graalvm" >> "$GITHUB_ENV"
405+
# Host JDK only supplies the shared JNI header (jni.h); the Windows-specific
406+
# jni_md.h is fetched below. JDK 8 is the artifact's floor.
407+
# TODO(pin): pin to an exact Temurin 8u build URL and verify a sha256.
408+
wget -nv -O jdk8.tar.gz https://api.adoptium.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/eclipse
409+
mkdir jdk8
410+
tar xfz jdk8.tar.gz -C jdk8 --strip-components=1
411+
echo "JAVA_HOME=$(pwd)/jdk8" >> "$GITHUB_ENV"
392412
393-
- name: Download Windows jni_md.h from JDK 25
413+
- name: Download Windows jni_md.h from JDK 8
394414
run: |
395415
cd core
396-
# TODO(pin): pin to a jdk25u tag/commit instead of the moving `master` branch.
397-
curl -fsSL https://raw.githubusercontent.com/openjdk/jdk25u/master/src/java.base/windows/native/include/jni_md.h > "$JAVA_HOME/include/jni_md.h"
416+
# TODO(pin): pin to a jdk8u tag/commit instead of the moving `master` branch.
417+
curl -fsSL https://raw.githubusercontent.com/openjdk/jdk8u/master/jdk/src/windows/javavm/export/jni_md.h > "$JAVA_HOME/include/jni_md.h"
398418
399419
- name: Build native library
400420
run: |
@@ -443,11 +463,11 @@ jobs:
443463
with:
444464
ref: ${{ needs.resolve.outputs.source_sha }}
445465

446-
- name: Set up Java 11
466+
- name: Set up Java 8
447467
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
448468
with:
449469
distribution: temurin
450-
java-version: "11"
470+
java-version: "8"
451471
cache: maven
452472

453473
- name: Download native artifacts
@@ -537,11 +557,11 @@ jobs:
537557
exit 1
538558
fi
539559
540-
- name: Set up Java 11
560+
- name: Set up Java 8
541561
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
542562
with:
543563
distribution: temurin
544-
java-version: "11"
564+
java-version: "8"
545565
cache: maven
546566

547567
- name: Download native artifacts
@@ -741,11 +761,11 @@ jobs:
741761
ref: ${{ inputs.source_ref }}
742762
fetch-depth: 0
743763

744-
- name: Set up Java 11
764+
- name: Set up Java 8
745765
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
746766
with:
747767
distribution: temurin
748-
java-version: "11"
768+
java-version: "8"
749769
cache: maven
750770

751771
- name: Open next-development-version bump PR

0 commit comments

Comments
 (0)