7272 - name : test
7373 run : env -C build SQLITE_WEB_LOG=99 ctest -V
7474
75- linux-x86-64-so :
76- runs-on : ubuntu-24.04
75+ linux-so :
76+ runs-on : ${{ matrix.runs-on }}
77+ strategy :
78+ matrix :
79+ include :
80+ - target : x86_64-linux-gnu
81+ runs-on : ubuntu-24.04
82+ cpu_arch : ivybridge
83+ artifact : libgenomicsqlite.so-x86_64
84+ sqlite_artifact : libsqlite3.so.0-x86_64
85+ - target : aarch64-linux-gnu
86+ runs-on : ubuntu-24.04-arm
87+ cpu_arch : armv8-a
88+ artifact : libgenomicsqlite.so-aarch64
89+ sqlite_artifact : libsqlite3.so.0-aarch64
7790 steps :
7891 - uses : actions/checkout@v7
7992 with :
@@ -106,10 +119,11 @@ jobs:
106119 run : |
107120 # BuildKit builds only the stages the final target depends on, so the
108121 # two minimum-runtime smoke-test stages -- which nothing depends on --
109- # must be built explicitly, or they are silently skipped.
110- docker build --target alma-smoke-test .
111- docker build --target rust-smoke-test .
112- docker build -t genomicsqlite . && docker run -v $(pwd):/mnt --rm genomicsqlite cp /usr/local/lib/{libgenomicsqlite.so,libsqlite3.so.0} /usr/local/bin/sqlite3 /mnt/build/
122+ # must be built explicitly, or they are silently skipped. CPU_ARCH
123+ # selects the Dockerfile's -march baseline for this leg's CPU.
124+ docker build --build-arg CPU_ARCH=${{ matrix.cpu_arch }} --target alma-smoke-test .
125+ docker build --build-arg CPU_ARCH=${{ matrix.cpu_arch }} --target rust-smoke-test .
126+ docker build --build-arg CPU_ARCH=${{ matrix.cpu_arch }} -t genomicsqlite . && docker run -v $(pwd):/mnt --rm genomicsqlite cp /usr/local/lib/{libgenomicsqlite.so,libsqlite3.so.0} /usr/local/bin/sqlite3 /mnt/build/
113127 - name : symbols & digests
114128 run : |
115129 readelf -d build/libgenomicsqlite.so
@@ -135,31 +149,37 @@ jobs:
135149 - name : test rust crate
136150 run : |
137151 set -e
138- cp build/libgenomicsqlite.so bindings/rust/libgenomicsqlite-linux-x86_64.so
152+ mkdir -p bindings/rust/lib/${{ matrix.target }}
153+ cp build/libgenomicsqlite.so bindings/rust/lib/${{ matrix.target }}/
139154 ln -sf libsqlite3.so.0 build/libsqlite3.so # linker name, scoped to build/ like the Dockerfile rust stage
140155 env LD_LIBRARY_PATH="$(pwd)/build" LIBRARY_PATH="$(pwd)/build" SQLITE_WEB_LOG=99 bindings/rust/cargo test --release
141- bindings/rust/cargo package --list | grep libgenomicsqlite-linux-x86_64 .so
156+ bindings/rust/cargo package --list | grep lib/${{ matrix.target }}/ libgenomicsqlite.so
142157 - name : installed-package smoke test
143158 run : |
144159 python3 -m pip install -q setuptools wheel
145- bash test/pkg_smoke.sh python3 bindings/python build/libgenomicsqlite.so libgenomicsqlite-linux-x86_64.so "$(pwd)/build"
160+ bash test/pkg_smoke.sh python3 bindings/python build/libgenomicsqlite.so lib/${{ matrix.target }} "$(pwd)/build"
146161 - name : prepare artifacts
147- run : cp build/{libgenomicsqlite.so,libsqlite3.so.0} .
162+ run : cp build/libgenomicsqlite.so .
163+ - name : prepare sqlite artifact
164+ run : cp build/libsqlite3.so.0 .
148165 - uses : actions/upload-artifact@v7
149166 with :
150- name : libgenomicsqlite.so
167+ name : ${{ matrix.artifact }}
151168 path : libgenomicsqlite.so
152169 - uses : actions/upload-artifact@v7
153170 with :
154- name : libsqlite3.so.0
171+ name : ${{ matrix.sqlite_artifact }}
155172 path : libsqlite3.so.0
156173
157- macOS-arm64 -dylib :
174+ macOS-aarch64 -dylib :
158175 runs-on : macos-15
159176 steps :
160177 - uses : actions/checkout@v7
161178 with :
162179 fetch-depth : 0
180+ # The brew passes below report "Skipping <formula>: most recent version
181+ # not installed" for the runner image's own outdated formulae; GitHub
182+ # renders them as job annotations. Expected, and not our dependencies.
163183 - name : dependencies
164184 run : |
165185 rm -f $(brew --prefix)/bin/2to3 # https://github.com/pypa/pipenv/issues/3831
@@ -215,37 +235,48 @@ jobs:
215235 - name : test rust crate
216236 run : |
217237 set -e
218- cp build/libgenomicsqlite.dylib bindings/rust/libgenomicsqlite-macos-aarch64.dylib
238+ mkdir -p bindings/rust/lib/aarch64-darwin
239+ cp build/libgenomicsqlite.dylib bindings/rust/lib/aarch64-darwin/
219240 SQLITE_WEB_LOG=99 bindings/rust/cargo test --release
220- bindings/rust/cargo package --list | grep libgenomicsqlite-macos- aarch64.dylib
241+ bindings/rust/cargo package --list | grep lib/ aarch64-darwin/libgenomicsqlite .dylib
221242 - name : installed-package smoke test
222243 run : |
223244 python3 -m pip install -q setuptools wheel
224- bash test/pkg_smoke.sh python3 bindings/python build/libgenomicsqlite.dylib libgenomicsqlite-macos- aarch64.dylib "$(brew --prefix)/opt/sqlite/bin"
245+ bash test/pkg_smoke.sh python3 bindings/python build/libgenomicsqlite.dylib lib/ aarch64-darwin "$(brew --prefix)/opt/sqlite/bin"
225246 - name : prepare artifacts
226- run : cp build/libgenomicsqlite.dylib libgenomicsqlite-macos-aarch64.dylib && cp include/genomicsqlite.h .
247+ run : cp build/libgenomicsqlite.dylib . && cp include/genomicsqlite.h .
227248 - uses : actions/upload-artifact@v7
228249 with :
229- name : libgenomicsqlite-macos-aarch64 .dylib
230- path : libgenomicsqlite-macos-aarch64 .dylib
250+ name : libgenomicsqlite.dylib
251+ path : libgenomicsqlite.dylib
231252
232253 artifacts :
233254 runs-on : ubuntu-24.04
234- needs : [linux-x86-64- so, macOS-arm64 -dylib]
255+ needs : [linux-so, macOS-aarch64 -dylib]
235256 steps :
236257 - uses : actions/checkout@v7
237- - name : fetch libgenomicsqlite.so
258+ # Each library downloads directly into its per-target directory under
259+ # lib/ (the shipped layout, docs/bindings.md): plain file names, target
260+ # variation in the directory. Artifact names are transport labels only.
261+ - name : fetch libgenomicsqlite.so (x86_64)
262+ uses : actions/download-artifact@v8
263+ with :
264+ name : libgenomicsqlite.so-x86_64
265+ path : lib/x86_64-linux-gnu
266+ - name : fetch libsqlite3.so.0 (x86_64)
238267 uses : actions/download-artifact@v8
239268 with :
240- name : libgenomicsqlite .so
241- - name : fetch libsqlite3 .so.0
269+ name : libsqlite3 .so.0-x86_64
270+ - name : fetch libgenomicsqlite .so (aarch64)
242271 uses : actions/download-artifact@v8
243272 with :
244- name : libsqlite3.so.0
273+ name : libgenomicsqlite.so-aarch64
274+ path : lib/aarch64-linux-gnu
245275 - name : fetch libgenomicsqlite.dylib
246276 uses : actions/download-artifact@v8
247277 with :
248- name : libgenomicsqlite-macos-aarch64.dylib
278+ name : libgenomicsqlite.dylib
279+ path : lib/aarch64-darwin
249280 - name : detect GIT_REVISION
250281 run : |
251282 cp include/genomicsqlite.h .
@@ -256,17 +287,21 @@ jobs:
256287 path : |
257288 LICENSE
258289 genomicsqlite.h
259- libgenomicsqlite.so
260- libgenomicsqlite-macos-aarch64.dylib
290+ lib/x86_64-linux-gnu/libgenomicsqlite.so
291+ lib/aarch64-linux-gnu/libgenomicsqlite.so
292+ lib/aarch64-darwin/libgenomicsqlite.dylib
261293 - name : build jar
262294 run : |
263- cp libgenomicsqlite.so bindings/jdbc/genomicsqlite-jdbc/src/main/resources/libgenomicsqlite-linux-x86_64.so
264- cp libgenomicsqlite-macos-aarch64.dylib bindings/jdbc/genomicsqlite-jdbc/src/main/resources/libgenomicsqlite-macos-aarch64.dylib
295+ RES=bindings/jdbc/genomicsqlite-jdbc/src/main/resources
296+ mkdir -p $RES/lib/x86_64-linux-gnu $RES/lib/aarch64-linux-gnu $RES/lib/aarch64-darwin
297+ cp lib/x86_64-linux-gnu/libgenomicsqlite.so $RES/lib/x86_64-linux-gnu/
298+ cp lib/aarch64-linux-gnu/libgenomicsqlite.so $RES/lib/aarch64-linux-gnu/
299+ cp lib/aarch64-darwin/libgenomicsqlite.dylib $RES/lib/aarch64-darwin/
265300 mvn deploy -Drevision=${{ env.GIT_REVISION }} -B -f bindings/jdbc/genomicsqlite-jdbc/pom.xml
266301 - name : JDBC smoke test
267302 run : bash test/jdbc_smoke_test.sh bindings/jdbc/genomicsqlite-jdbc
268303 - name : digests
269- run : sha256sum *genomicsqlite* bindings/jdbc/genomicsqlite-jdbc/target/genomicsqlite*.jar libsqlite3.so.0
304+ run : sha256sum lib/x86_64-linux-gnu/libgenomicsqlite.so lib/aarch64-linux-gnu/libgenomicsqlite.so lib/aarch64-darwin/libgenomicsqlite.dylib bindings/jdbc/genomicsqlite-jdbc/target/genomicsqlite*.jar libsqlite3.so.0
270305 - uses : actions/upload-artifact@v7
271306 with :
272307 name : genomicsqlite-jdbc-${{ env.GIT_REVISION }}
0 commit comments