From 244b6919ccf68d044a88c85253fb4958b4a25f37 Mon Sep 17 00:00:00 2001 From: Chang She <759245+changhiskhan@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:49:52 -0800 Subject: [PATCH] chore: Use m1 runner for npm publish (#687) We had some build issues with npm publish for cross-compiling arm64 macos on an x86 macos runner. Switching to m1 runner for now until someone has time to deal with the feature flags. follow-up tracked here: #688 --- .github/workflows/npm-publish.yml | 33 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4272f0bb..d7fce392 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -37,14 +37,10 @@ jobs: path: | node/vectordb-*.tgz - node-macos: + node-macos-x86: runs-on: macos-13 # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') - strategy: - fail-fast: false - matrix: - target: [x86_64-apple-darwin, aarch64-apple-darwin] steps: - name: Checkout uses: actions/checkout@v3 @@ -54,11 +50,8 @@ jobs: run: | cd node npm ci - - name: Install rustup target - if: ${{ matrix.target == 'aarch64-apple-darwin' }} - run: rustup target add aarch64-apple-darwin - name: Build MacOS native node modules - run: bash ci/build_macos_artifacts.sh ${{ matrix.target }} + run: bash ci/build_macos_artifacts.sh x86_64-apple-darwin - name: Upload Darwin Artifacts uses: actions/upload-artifact@v3 with: @@ -66,6 +59,28 @@ jobs: path: | node/dist/lancedb-vectordb-darwin*.tgz + node-macos-arm64: + runs-on: macos-13-xlarge + # Only runs on tags that matches the make-release action + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install system dependencies + run: brew install protobuf + - name: Install npm dependencies + run: | + cd node + npm ci + - name: Build MacOS native node modules + run: bash ci/build_macos_artifacts.sh aarch64-apple-darwin + - name: Upload Darwin Artifacts + uses: actions/upload-artifact@v3 + with: + name: native-darwin + path: | + node/dist/lancedb-vectordb-darwin*.tgz + node-linux: name: node-linux (${{ matrix.config.arch}}-unknown-linux-gnu runs-on: ${{ matrix.config.runner }}