mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-14 07:42:58 +00:00
use manylinux containers locally
This commit is contained in:
55
.github/workflows/release.yml
vendored
55
.github/workflows/release.yml
vendored
@@ -120,7 +120,7 @@ jobs:
|
||||
files: node/dist/vectordb-darwin*.tgz
|
||||
|
||||
node-linux:
|
||||
name: Linux ${{ matrix.settings.arch}} native node module
|
||||
name: node-linux (${{ matrix.arch}}-unknown-linux-${{ matrix.libc }})
|
||||
runs-on: ubuntu-latest
|
||||
needs: draft-release
|
||||
strategy:
|
||||
@@ -129,49 +129,26 @@ jobs:
|
||||
libc:
|
||||
- gnu
|
||||
- musl
|
||||
settings:
|
||||
- container: quay.io/pypa/manylinux2014_x86_64
|
||||
arch: x86_64
|
||||
protoc_arch: x86_64
|
||||
# TODO: find a way to build aarch64 on GA
|
||||
# - 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
|
||||
arch:
|
||||
- x86_64
|
||||
- aarch64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install system dependencies
|
||||
- name: Build Linux GNU native node modules
|
||||
if: ${{ matrix.libc == 'gnu' }}
|
||||
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
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 17 # Last that support glibc 2.17
|
||||
- name: Setup Rust
|
||||
docker run \
|
||||
-v $(pwd):/io -w /io \
|
||||
quay.io/pypa/manylinux2014_${{ matrix.arch }} \
|
||||
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-gnu
|
||||
- name: Build musl Linux native node modules
|
||||
if: ${{ matrix.libc == 'musl' }}
|
||||
run: |
|
||||
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||
echo "/root/.cargo/bin" >> $GITHUB_PATH
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
- name: Build ${{ matrix.settings.libc }} library
|
||||
run: |
|
||||
BUILD_TARGET=${{ matrix.settings.arch }}-unknown-linux-${{ matrix.settings.libc }}
|
||||
rustup target add $BUILD_TARGET
|
||||
export RUSTFLAGS="-C target-feature=-crt-static" # for musl
|
||||
npm run build-release -- --target $BUILD_TARGET
|
||||
npm run pack-build -- --target $BUILD_TARGET
|
||||
docker run \
|
||||
-v $(pwd):/io -w /io \
|
||||
quay.io/pypa/musllinux_1_1_${{ matrix.arch }} \
|
||||
bash ci/build_linux_artifacts.sh ${{ matrix.arch }}-unknown-linux-musl
|
||||
- uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: true
|
||||
|
||||
Reference in New Issue
Block a user