mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 19:02:58 +00:00
Compare commits
2 Commits
v0.1.2-dev
...
v0.1.2-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8bbe5f281 | ||
|
|
c4237c61d5 |
50
.github/workflows/release.yml
vendored
50
.github/workflows/release.yml
vendored
@@ -120,34 +120,56 @@ jobs:
|
|||||||
files: node/dist/vectordb-darwin*.tgz
|
files: node/dist/vectordb-darwin*.tgz
|
||||||
|
|
||||||
node-linux:
|
node-linux:
|
||||||
|
name: Linux ${{ matrix.settings.arch}} native node module
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: draft-release
|
needs: draft-release
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
libc:
|
||||||
- x86_64-unknown-linux-gnu
|
- gnu
|
||||||
- aarch64-unknown-linux-gnu
|
- musl
|
||||||
- aarch64-unknown-linux-musl
|
settings:
|
||||||
- x86_64-unknown-linux-musl
|
- container: quay.io/pypa/manylinux2014_x86_64
|
||||||
|
arch: x86_64
|
||||||
|
protoc_arch: x86_64
|
||||||
|
- container: quay.io/pypa/manylinux2014_aarch64
|
||||||
|
arch: aarch64
|
||||||
|
protoc_arch: aarch_64
|
||||||
|
container:
|
||||||
|
image: ${{ matrix.settings.container }}
|
||||||
|
options: --platform linux/amd64
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: node
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
yum install -y openssl-devel unzip
|
||||||
|
# Install new enough protobuf (yum-provided is old)
|
||||||
|
PB_REL=https://github.com/protocolbuffers/protobuf/releases
|
||||||
|
PB_VERSION=23.1
|
||||||
|
curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-${{ matrix.settings.protoc_arch }}.zip
|
||||||
|
unzip protoc-$PB_VERSION-linux-${{ matrix.settings.protoc_arch }}.zip -d /usr/local
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: ATiltedTree/setup-rust@v1
|
uses: ATiltedTree/setup-rust@v1
|
||||||
with:
|
with:
|
||||||
rust-version: stable
|
rust-version: stable
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y protobuf-compiler libssl-dev
|
|
||||||
cargo install cross
|
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Build ${{ matrix.settings.libc }} library
|
||||||
run: |
|
run: |
|
||||||
cd node
|
BUILD_TARGET=${{ matrix.settings.arch }}-unknown-linux-${{ matrix.settings.libc }}
|
||||||
npm ci
|
rustup target add $BUILD_TARGET
|
||||||
- name: Build Linux native node modules
|
export RUSTFLAGS="-C target-feature=-crt-static" # for musl
|
||||||
run: bash ci/build_linux_artifacts.sh ${{ matrix.target }}
|
npm run build-release -- --target $BUILD_TARGET
|
||||||
|
npm run pack-build -- --target $BUILD_TARGET
|
||||||
- uses: softprops/action-gh-release@v1
|
- uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
|
|||||||
25
Cross.toml
25
Cross.toml
@@ -1,26 +1,39 @@
|
|||||||
# These make sure our builds are compatible with old glibc versions.
|
# These make sure our builds are compatible with old glibc versions.
|
||||||
[target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
# Install newer gfortran
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler:$CROSS_DEB_ARCH",
|
"yum install -y openssl-devel unzip gcc-gfortran",
|
||||||
|
"scl enable devtoolset-11 bash",
|
||||||
|
# protobuf is too old, so we directly download binaries
|
||||||
|
"PB_REL=https://github.com/protocolbuffers/protobuf/releases",
|
||||||
|
"PB_VERSION=23.1",
|
||||||
|
"curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip",
|
||||||
|
"unzip protoc-$PB_VERSION-linux-x86_64.zip -d /usr/local",
|
||||||
]
|
]
|
||||||
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"
|
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"
|
||||||
|
|
||||||
[target.aarch64-unknown-linux-gnu]
|
[target.aarch64-unknown-linux-gnu]
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
"yum install -y openssl-devel unzip",
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler:$CROSS_DEB_ARCH",
|
# protobuf is too old, so we directly download binaries
|
||||||
|
"PB_REL=https://github.com/protocolbuffers/protobuf/releases",
|
||||||
|
"PB_VERSION=23.1",
|
||||||
|
"curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-x86_64.zip",
|
||||||
|
"unzip protoc-$PB_VERSION-linux-x86_64.zip -d /usr/local",
|
||||||
]
|
]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.aarch64-unknown-linux-gnu.centos
|
||||||
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"
|
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"
|
||||||
|
|
||||||
[target.x86_64-unknown-linux-musl]
|
[target.x86_64-unknown-linux-musl]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.x86_64-unknown-linux-musl
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler:$CROSS_DEB_ARCH",
|
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
|
||||||
]
|
]
|
||||||
|
|
||||||
[target.aarch64-unknown-linux-musl]
|
[target.aarch64-unknown-linux-musl]
|
||||||
|
# https://github.com/cross-rs/cross/blob/main/docker/Dockerfile.aarch64-unknown-linux-musl
|
||||||
pre-build = [
|
pre-build = [
|
||||||
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
"dpkg --add-architecture $CROSS_DEB_ARCH",
|
||||||
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH protobuf-compiler:$CROSS_DEB_ARCH",
|
"apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user