@@ -101,7 +101,7 @@ jobs:
101
101
path : |
102
102
nodejs/dist/*.node
103
103
104
- node-linux :
104
+ node-linux-gnu :
105
105
name : vectordb (${{ matrix.config.arch}}-unknown-linux-gnu)
106
106
runs-on : ${{ matrix.config.runner }}
107
107
# Only runs on tags that matches the make-release action
@@ -137,11 +137,63 @@ jobs:
137
137
- name : Upload Linux Artifacts
138
138
uses : actions/upload-artifact@v4
139
139
with :
140
- name : node-native-linux-${{ matrix.config.arch }}
140
+ name : node-native-linux-${{ matrix.config.arch }}-gnu
141
141
path : |
142
142
node/dist/lancedb-vectordb-linux*.tgz
143
143
144
- nodejs-linux :
144
+ node-linux-musl :
145
+ name : vectordb (${{ matrix.config.arch}}-unknown-linux-musl)
146
+ runs-on : ubuntu-latest
147
+ container : alpine:edge
148
+ # Only runs on tags that matches the make-release action
149
+ if : startsWith(github.ref, 'refs/tags/v')
150
+ strategy :
151
+ fail-fast : false
152
+ matrix :
153
+ config :
154
+ - arch : x86_64
155
+ - arch : aarch64
156
+ steps :
157
+ - name : Checkout
158
+ uses : actions/checkout@v4
159
+ - name : Install common dependencies
160
+ run : |
161
+ apk add protobuf-dev curl clang mold grep npm bash
162
+ curl --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/rust-lang/rustup/refs/heads/master/rustup-init.sh | sh -s -- -y --default-toolchain 1.80.0
163
+ echo "source $HOME/.cargo/env" >> saved_env
164
+ echo "export CC=clang" >> saved_env
165
+ echo "export RUSTFLAGS='-Ctarget-cpu=haswell -Ctarget-feature=-crt-static,+avx2,+fma,+f16c -Clinker=clang -Clink-arg=-fuse-ld=mold'" >> saved_env
166
+ - name : Configure aarch64 build
167
+ if : ${{ matrix.config.arch == 'aarch64' }}
168
+ run : |
169
+ source "$HOME/.cargo/env"
170
+ rustup target add aarch64-unknown-linux-musl --toolchain 1.80.0
171
+ crt=$(realpath $(dirname $(rustup which rustc))/../lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained)
172
+ sysroot_lib=/usr/aarch64-unknown-linux-musl/usr/lib
173
+ apk_url=https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/aarch64/
174
+ curl -sSf $apk_url > apk_list
175
+ for pkg in gcc libgcc musl; do curl -sSf $apk_url$(cat apk_list | grep -oP '(?<=")'$pkg'-\d.*?(?=")') | tar zxf -; done
176
+ mkdir -p $sysroot_lib
177
+ echo 'GROUP ( libgcc_s.so.1 -lgcc )' > $sysroot_lib/libgcc_s.so
178
+ cp usr/lib/libgcc_s.so.1 $sysroot_lib
179
+ cp usr/lib/gcc/aarch64-alpine-linux-musl/*/libgcc.a $sysroot_lib
180
+ cp lib/ld-musl-aarch64.so.1 $sysroot_lib/libc.so
181
+ echo '!<arch>' > $sysroot_lib/libdl.a
182
+ (cd $crt && cp crti.o crtbeginS.o crtendS.o crtn.o -t $sysroot_lib)
183
+ echo "export CARGO_BUILD_TARGET=aarch64-unknown-linux-musl" >> saved_env
184
+ echo "export RUSTFLAGS='-Ctarget-cpu=apple-m1 -Ctarget-feature=-crt-static,+neon,+fp16,+fhm,+dotprod -Clinker=clang -Clink-arg=-fuse-ld=mold -Clink-arg=--target=aarch64-unknown-linux-musl -Clink-arg=--sysroot=/usr/aarch64-unknown-linux-musl -Clink-arg=-lc'" >> saved_env
185
+ - name : Build Linux Artifacts
186
+ run : |
187
+ source ./saved_env
188
+ bash ci/manylinux_node/build_vectordb.sh ${{ matrix.config.arch }}
189
+ - name : Upload Linux Artifacts
190
+ uses : actions/upload-artifact@v4
191
+ with :
192
+ name : node-native-linux-${{ matrix.config.arch }}-musl
193
+ path : |
194
+ node/dist/lancedb-vectordb-linux*.tgz
195
+
196
+ nodejs-linux-gnu :
145
197
name : lancedb (${{ matrix.config.arch}}-unknown-linux-gnu
146
198
runs-on : ${{ matrix.config.runner }}
147
199
# Only runs on tags that matches the make-release action
@@ -178,7 +230,7 @@ jobs:
178
230
- name : Upload Linux Artifacts
179
231
uses : actions/upload-artifact@v4
180
232
with :
181
- name : nodejs-native-linux-${{ matrix.config.arch }}
233
+ name : nodejs-native-linux-${{ matrix.config.arch }}-gnu
182
234
path : |
183
235
nodejs/dist/*.node
184
236
# The generic files are the same in all distros so we just pick
@@ -192,6 +244,62 @@ jobs:
192
244
nodejs/dist/*
193
245
!nodejs/dist/*.node
194
246
247
+ nodejs-linux-musl :
248
+ name : lancedb (${{ matrix.config.arch}}-unknown-linux-musl
249
+ runs-on : ubuntu-latest
250
+ container : alpine:edge
251
+ # Only runs on tags that matches the make-release action
252
+ if : startsWith(github.ref, 'refs/tags/v')
253
+ strategy :
254
+ fail-fast : false
255
+ matrix :
256
+ config :
257
+ - arch : x86_64
258
+ - arch : aarch64
259
+ steps :
260
+ - name : Checkout
261
+ uses : actions/checkout@v4
262
+ - name : Install common dependencies
263
+ run : |
264
+ apk add protobuf-dev curl clang mold grep npm bash openssl-dev openssl-libs-static
265
+ curl --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/rust-lang/rustup/refs/heads/master/rustup-init.sh | sh -s -- -y --default-toolchain 1.80.0
266
+ echo "source $HOME/.cargo/env" >> saved_env
267
+ echo "export CC=clang" >> saved_env
268
+ echo "export RUSTFLAGS='-Ctarget-cpu=haswell -Ctarget-feature=-crt-static,+avx2,+fma,+f16c -Clinker=clang -Clink-arg=-fuse-ld=mold'" >> saved_env
269
+ echo "export X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_INCLUDE_DIR=/usr/include" >> saved_env
270
+ echo "export X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_LIB_DIR=/usr/lib" >> saved_env
271
+ - name : Configure aarch64 build
272
+ if : ${{ matrix.config.arch == 'aarch64' }}
273
+ run : |
274
+ source "$HOME/.cargo/env"
275
+ rustup target add aarch64-unknown-linux-musl --toolchain 1.80.0
276
+ crt=$(realpath $(dirname $(rustup which rustc))/../lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained)
277
+ sysroot_lib=/usr/aarch64-unknown-linux-musl/usr/lib
278
+ apk_url=https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/aarch64/
279
+ curl -sSf $apk_url > apk_list
280
+ for pkg in gcc libgcc musl openssl-dev openssl-libs-static; do curl -sSf $apk_url$(cat apk_list | grep -oP '(?<=")'$pkg'-\d.*?(?=")') | tar zxf -; done
281
+ mkdir -p $sysroot_lib
282
+ echo 'GROUP ( libgcc_s.so.1 -lgcc )' > $sysroot_lib/libgcc_s.so
283
+ cp usr/lib/libgcc_s.so.1 $sysroot_lib
284
+ cp usr/lib/gcc/aarch64-alpine-linux-musl/*/libgcc.a $sysroot_lib
285
+ cp lib/ld-musl-aarch64.so.1 $sysroot_lib/libc.so
286
+ echo '!<arch>' > $sysroot_lib/libdl.a
287
+ (cd $crt && cp crti.o crtbeginS.o crtendS.o crtn.o -t $sysroot_lib)
288
+ echo "export CARGO_BUILD_TARGET=aarch64-unknown-linux-musl" >> saved_env
289
+ echo "export RUSTFLAGS='-Ctarget-feature=-crt-static,+neon,+fp16,+fhm,+dotprod -Clinker=clang -Clink-arg=-fuse-ld=mold -Clink-arg=--target=aarch64-unknown-linux-musl -Clink-arg=--sysroot=/usr/aarch64-unknown-linux-musl -Clink-arg=-lc'" >> saved_env
290
+ echo "export AARCH64_UNKNOWN_LINUX_MUSL_OPENSSL_INCLUDE_DIR=$(realpath usr/include)" >> saved_env
291
+ echo "export AARCH64_UNKNOWN_LINUX_MUSL_OPENSSL_LIB_DIR=$(realpath usr/lib)" >> saved_env
292
+ - name : Build Linux Artifacts
293
+ run : |
294
+ source ./saved_env
295
+ bash ci/manylinux_node/build_lancedb.sh ${{ matrix.config.arch }}
296
+ - name : Upload Linux Artifacts
297
+ uses : actions/upload-artifact@v4
298
+ with :
299
+ name : nodejs-native-linux-${{ matrix.config.arch }}-musl
300
+ path : |
301
+ nodejs/dist/*.node
302
+
195
303
node-windows :
196
304
name : vectordb ${{ matrix.target }}
197
305
runs-on : windows-2022
@@ -460,7 +568,7 @@ jobs:
460
568
461
569
release :
462
570
name : vectordb NPM Publish
463
- needs : [node, node-macos, node-linux, node-windows]
571
+ needs : [node, node-macos, node-linux-gnu, node-linux-musl , node-windows]
464
572
runs-on : ubuntu-latest
465
573
# Only runs on tags that matches the make-release action
466
574
if : startsWith(github.ref, 'refs/tags/v')
@@ -500,7 +608,7 @@ jobs:
500
608
501
609
release-nodejs :
502
610
name : lancedb NPM Publish
503
- needs : [nodejs-macos, nodejs-linux, nodejs-windows]
611
+ needs : [nodejs-macos, nodejs-linux-gnu, nodejs-linux-musl , nodejs-windows]
504
612
runs-on : ubuntu-latest
505
613
# Only runs on tags that matches the make-release action
506
614
if : startsWith(github.ref, 'refs/tags/v')
0 commit comments