This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch fix-nodejs-build in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit 7945475c063c2accfaecf541f90bfae7ecf45c1c Author: Xuanwo <[email protected]> AuthorDate: Fri Mar 31 11:16:37 2023 +0800 ci: Fix build for nodejs binding on macos Signed-off-by: Xuanwo <[email protected]> --- .github/workflows/bindings_nodejs.yml | 8 +++++--- bindings/nodejs/package.json | 3 --- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bindings_nodejs.yml b/.github/workflows/bindings_nodejs.yml index b1d93962..9fe42de4 100644 --- a/.github/workflows/bindings_nodejs.yml +++ b/.github/workflows/bindings_nodejs.yml @@ -162,11 +162,13 @@ jobs: export CXX=$(xcrun -f clang++); SYSROOT=$(xcrun --sdk macosx --show-sdk-path); export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; + rustup target remove x86_64-apple-darwin; rustup target add aarch64-apple-darwin; - yarn build --target aarch64-apple-darwin + yarn build strip -x *.node runs-on: macos-latest - if: "startsWith(github.ref, 'refs/tags/')" + # For test, remove this before merging + # if: "startsWith(github.ref, 'refs/tags/')" # Notes: this defaults only apply on run tasks. defaults: @@ -228,7 +230,7 @@ jobs: with: path: bindings/nodejs/artifacts - name: Move artifacts - run: yarn artifacts + run: yarn run napi artifacts - name: List packages run: ls -R ./npm diff --git a/bindings/nodejs/package.json b/bindings/nodejs/package.json index ab1cdb7a..71e18f07 100644 --- a/bindings/nodejs/package.json +++ b/bindings/nodejs/package.json @@ -59,15 +59,12 @@ "node": ">= 10" }, "scripts": { - "artifacts": "napi artifacts", "build": "napi build --platform --release --js generated.js && node ./scripts/header.js", "build:debug": "napi build --platform --js generated.js && node ./scripts/header.js", "docs": "typedoc", "format": "prettier --write .", - "prepublishOnly": "napi prepublish -t npm", "test": "cucumber-js", "bench": "node ./benchmark/index.js", - "version": "napi version" }, "prettier": { "overrides": [
