mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-23 05:19:58 +00:00
feat(node): Add Linux ARM build (#348)
This commit is contained in:
31
.github/workflows/npm-publish.yml
vendored
31
.github/workflows/npm-publish.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: node-package
|
name: node-package
|
||||||
path: |
|
path: |
|
||||||
node/lancedb-vectordb-*.tgz
|
node/vectordb-*.tgz
|
||||||
|
|
||||||
node-macos:
|
node-macos:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
@@ -116,6 +116,33 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
node/dist/lancedb-vectordb-linux*.tgz
|
node/dist/lancedb-vectordb-linux*.tgz
|
||||||
|
|
||||||
|
node-linux-arm:
|
||||||
|
name: node-linux (aarch64-unknown-linux-gnu)
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204-arm
|
||||||
|
# Only runs on tags that matches the make-release action
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Change owner to root (for npm)
|
||||||
|
# The docker container is run as root, so we need the files to be owned by root
|
||||||
|
# Otherwise npm is a nightmare: https://github.com/npm/cli/issues/3773
|
||||||
|
run: sudo chown -R root:root .
|
||||||
|
- name: Build Linux GNU native node modules
|
||||||
|
run: |
|
||||||
|
docker run \
|
||||||
|
-v $(pwd):/io -w /io \
|
||||||
|
rust:1.70-bookworm \
|
||||||
|
bash ci/build_linux_artifacts.sh aarch64-unknown-linux-gnu
|
||||||
|
- name: Upload Linux Artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: native-linux-arm
|
||||||
|
path: |
|
||||||
|
node/dist/lancedb-vectordb-linux*.tgz
|
||||||
|
|
||||||
node-windows:
|
node-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
# Only runs on tags that matches the make-release action
|
# Only runs on tags that matches the make-release action
|
||||||
@@ -150,7 +177,7 @@ jobs:
|
|||||||
node/dist/lancedb-vectordb-win32*.tgz
|
node/dist/lancedb-vectordb-win32*.tgz
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [node, node-macos, node-linux, node-windows]
|
needs: [node, node-macos, node-linux, node-linux-arm, node-windows]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Only runs on tags that matches the make-release action
|
# Only runs on tags that matches the make-release action
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ build_node_binary() {
|
|||||||
|
|
||||||
# We don't pass in target, since the native target here already matches
|
# We don't pass in target, since the native target here already matches
|
||||||
# We need to pass OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR for static build to work https://github.com/sfackler/rust-openssl/issues/877
|
# We need to pass OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR for static build to work https://github.com/sfackler/rust-openssl/issues/877
|
||||||
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release
|
if [[ $1 == aarch64-* ]]; then
|
||||||
|
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release
|
||||||
|
else
|
||||||
|
OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl/ npm run build-release
|
||||||
|
fi
|
||||||
npm run pack-build
|
npm run pack-build
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
Reference in New Issue
Block a user