Compare commits

..

1 Commits

Author SHA1 Message Date
Will Jones
19397c6188 fixes for action 2023-05-23 18:59:45 -07:00
2 changed files with 13 additions and 19 deletions

View File

@@ -38,7 +38,8 @@ jobs:
- uses: softprops/action-gh-release@v1
with:
draft: true
files: target/vectordb-*.crate
files: |
rust/target/vectordb-*.crate
python:
runs-on: ubuntu-latest
@@ -57,9 +58,7 @@ jobs:
with:
python-version: "3.10"
- name: Build wheel
run: |
pip install wheel
python setup.py sdist bdist_wheel
run: python setup.py sdist bdist_wheel
- uses: softprops/action-gh-release@v1
with:
draft: true
@@ -82,6 +81,7 @@ jobs:
node-version: 20
cache: 'npm'
cache-dependency-path: node/package-lock.json
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
sudo apt update
@@ -100,7 +100,6 @@ jobs:
runs-on: macos-12
needs: draft-release
strategy:
fail-fast: false
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
@@ -109,9 +108,7 @@ jobs:
- name: Install system dependencies
run: brew install protobuf
- name: Install npm dependencies
run: |
cd node
npm ci
run: npm ci
- name: Build MacOS native node modules
run: bash ci/build_macos_artifacts.sh ${{ matrix.target }}
- uses: softprops/action-gh-release@v1
@@ -123,29 +120,22 @@ jobs:
runs-on: ubuntu-latest
needs: draft-release
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu:centos
- aarch64-unknown-linux-gnu:centos
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
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
run: |
cd node
npm ci
run: npm ci
- name: Build Linux native node modules
run: bash ci/build_linux_artifacts.sh ${{ matrix.target }}
- uses: softprops/action-gh-release@v1

View File

@@ -20,7 +20,11 @@ build_node_binaries() {
do
echo "Building node library for $target"
# cross doesn't yet pass this down to Docker, so we do it ourselves.
export CROSS_CONTAINER_OPTS="--platform linux/amd64"
if [[ $target == x86_64* ]]; then
export CROSS_CONTAINER_OPTS="--platform linux/amd64"
else
export CROSS_CONTAINER_OPTS="--platform linux/arm64/v8"
fi
npm run cross-release -- --target $target
npm run pack-build -- --target $target
done