Skip to content

Commit d496ab1

Browse files
authored
ci: linux: specify target triple for neon pack-build (vectordb) (lancedb#1889)
fixes that all `neon pack-build` packs are named `vectordb-linux-x64-musl-*.tgz` even when cross-compiling adds 2nd param: `TARGET_TRIPLE=${2:-x86_64-unknown-linux-gnu}` `npm run pack-build -- -t $TARGET_TRIPLE`
1 parent 69d9bee commit d496ab1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
free -h
134134
- name: Build Linux Artifacts
135135
run: |
136-
bash ci/build_linux_artifacts.sh ${{ matrix.config.arch }}
136+
bash ci/build_linux_artifacts.sh ${{ matrix.config.arch }} ${{ matrix.config.arch }}-unknown-linux-gnu
137137
- name: Upload Linux Artifacts
138138
uses: actions/upload-artifact@v4
139139
with:
@@ -188,7 +188,7 @@ jobs:
188188
- name: Build Linux Artifacts
189189
run: |
190190
source ./saved_env
191-
bash ci/manylinux_node/build_vectordb.sh ${{ matrix.config.arch }}
191+
bash ci/manylinux_node/build_vectordb.sh ${{ matrix.config.arch }} ${{ matrix.config.arch }}-unknown-linux-musl
192192
- name: Upload Linux Artifacts
193193
uses: actions/upload-artifact@v4
194194
with:

ci/build_linux_artifacts.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22
set -e
33
ARCH=${1:-x86_64}
4+
TARGET_TRIPLE=${2:-x86_64-unknown-linux-gnu}
45

5-
# We pass down the current user so that when we later mount the local files
6+
# We pass down the current user so that when we later mount the local files
67
# into the container, the files are accessible by the current user.
78
pushd ci/manylinux_node
89
docker build \
@@ -18,4 +19,4 @@ docker run \
1819
-v $(pwd):/io -w /io \
1920
--memory-swap=-1 \
2021
lancedb-node-manylinux \
21-
bash ci/manylinux_node/build_vectordb.sh $ARCH
22+
bash ci/manylinux_node/build_vectordb.sh $ARCH $TARGET_TRIPLE

ci/manylinux_node/build_vectordb.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Builds the node module for manylinux. Invoked by ci/build_linux_artifacts.sh.
33
set -e
44
ARCH=${1:-x86_64}
5+
TARGET_TRIPLE=${2:-x86_64-unknown-linux-gnu}
56

67
if [ "$ARCH" = "x86_64" ]; then
78
export OPENSSL_LIB_DIR=/usr/local/lib64/
@@ -17,4 +18,4 @@ FILE=$HOME/.bashrc && test -f $FILE && source $FILE
1718
cd node
1819
npm ci
1920
npm run build-release
20-
npm run pack-build
21+
npm run pack-build -t $TARGET_TRIPLE

0 commit comments

Comments
 (0)