-
Notifications
You must be signed in to change notification settings - Fork 3
163 lines (147 loc) · 6.41 KB
/
Copy pathci.yml
File metadata and controls
163 lines (147 loc) · 6.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# JDK 8 is the source of truth: the client ships as a Java 8 artifact
# (io.questdb:questdb-client) and is released from JDK 8, so on JDK 8 it must
# compile, the full test suite must pass, and the javadoc jar must build
# (-P javadoc attaches it at the package phase). The native libraries are no
# longer committed, so this job compiles libquestdb.so from source (hence the
# zstd submodule + cmake/nasm/build-essential toolchain) before the tests run.
build-jdk8:
name: Build, test & javadoc (JDK 8)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out
uses: actions/checkout@v4
with:
# zstd is required to compile the native library.
submodules: recursive
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven
- name: Install native build toolchain
run: sudo apt-get update && sudo apt-get install -y cmake nasm build-essential
- name: Build native libquestdb.so
# JAVA_HOME points at the JDK 8 above, so the lib is compiled against the
# Java 8 JNI headers -- the artifact's Java floor. Copy it into src
# resources (not target/) so it survives the `mvn clean` in the next step
# and gets packaged + loaded via the production bin/<platform> path.
# NOTE: this builds on ubuntu-latest for FUNCTIONAL testing only; the
# library's glibc runtime floor is validated separately by the
# `glibc-floor` job, which rebuilds in the release low-glibc container.
run: |
cd core
cmake -DCMAKE_BUILD_TYPE=Release -B cmake-build-release -S.
cmake --build cmake-build-release --config Release
test -f target/classes/io/questdb/client/bin-local/libquestdb.so
mkdir -p src/main/resources/io/questdb/client/bin/linux-x86-64
cp target/classes/io/questdb/client/bin-local/libquestdb.so \
src/main/resources/io/questdb/client/bin/linux-x86-64/libquestdb.so
- name: Compile, test, and build javadoc
run: mvn -B -ntp -P javadoc clean install
# The client is also consumed as a submodule of the main questdb repo, which
# builds on JDK 25. Guard against JDK 25 compile breakage (main + test
# sources, both modules) and confirm the javadoc jar builds on JDK 25 too
# (-P javadoc attaches it at the package phase). Do NOT run the tests -- the
# parent repo runs them against a real server.
compile-jdk25:
name: Compile & javadoc smoke (JDK 25)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "25"
cache: maven
- name: Compile (main + test) and build javadoc (no tests run)
run: mvn -B -ntp -P javadoc -DskipTests clean package
# GLIBC floor guard. The native libraries are built at release time in
# low-glibc manylinux containers (see maven_central_release.yml) and are NOT
# committed, so a floor regression is invisible to the functional test job
# above (it builds on ubuntu-latest, whose glibc is new enough to load almost
# anything). This job rebuilds the linux libraries in the SAME low-glibc
# environment as release and asserts the runtime floor with objdump, so a
# change that raises the floor (e.g. a new stat/fstat call pulling in
# stat@GLIBC_2.33 on a modern build host) fails the PR instead of silently
# shipping a library that cannot load on older distros.
#
# * linux-x86-64 -> GLIBC_2.14 (the intended floor: memcpy@GLIBC_2.14).
# * linux-aarch64 -> GLIBC_2.17 (the lowest floor glibc offers on aarch64).
#
# Uses manylinux_2_28 for both arches (stock Node 24, no glibc-2.17 shadow
# hack). The x86-64 floor is identical in manylinux2014 (2.17) and
# manylinux_2_28 (2.28) -- both resolve stat/fstat to the inline
# __xstat/__fxstat@GLIBC_2.2.5 wrappers -- so this validates the real shipped
# floor without the heavier manylinux2014 release toolchain.
glibc-floor:
name: GLIBC floor guard (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x86-64
os: ubuntu-latest
image: quay.io/pypa/manylinux_2_28_x86_64
jdk_arch: x64
floor: "2.14"
cmake_args: ""
build_dir: cmake-build-release
- platform: linux-aarch64
os: ubuntu-22.04-arm
image: quay.io/pypa/manylinux_2_28_aarch64
jdk_arch: aarch64
floor: "2.17"
cmake_args: "-DCMAKE_TOOLCHAIN_FILE=./src/main/c/toolchains/linux-arm64.cmake"
build_dir: cmake-build-release-arm64
runs-on: ${{ matrix.os }}
timeout-minutes: 45
container:
image: ${{ matrix.image }}
steps:
- name: Check out
uses: actions/checkout@v4
with:
# zstd is required to compile the native library.
submodules: recursive
- name: Install tooling
# binutils provides objdump for the floor check; nasm/zstd are build deps.
run: |
yum update -y
yum install -y wget nasm zstd binutils
- name: Install Temurin JDK 8 (for jni.h)
# Build against the Java 8 JNI headers -- JDK 8 is the artifact's floor.
# The JDK version does not affect the glibc floor; it only supplies jni.h.
run: |
wget -v --timeout=180 -O jdk8.tar.gz \
"https://api.adoptium.net/v3/binary/latest/8/ga/linux/${{ matrix.jdk_arch }}/jdk/hotspot/normal/eclipse"
mkdir jdk8
tar xfz jdk8.tar.gz -C jdk8 --strip-components=1
echo "JAVA_HOME=$(pwd)/jdk8" >> "$GITHUB_ENV"
- name: Build native libquestdb.so
run: |
cd core
cmake ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -B ${{ matrix.build_dir }} -S.
cmake --build ${{ matrix.build_dir }} --config Release
- name: Assert GLIBC floor
run: |
./.github/scripts/check-glibc-floor.sh \
core/target/classes/io/questdb/client/bin-local/libquestdb.so \
"${{ matrix.floor }}"