Skip to content

Commit

Permalink
Post build
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jan 24, 2024
1 parent 031844d commit 5871a1d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/napi2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
- os: macos-latest
target: x86_64-apple-darwin
build: |
yarn build
yarn build && yarn post-build
strip -x *.node
#- os: windows-latest
# build: yarn build
# build: yarn build && yarn post-build
# target: x86_64-pc-windows-msvc

#- os: windows-latest
# build: |
# yarn build --target i686-pc-windows-msvc
# yarn build --target i686-pc-windows-msvc && yarn post-build
# target: i686-pc-windows-msvc

- os: ubuntu-latest
Expand All @@ -43,13 +43,14 @@ jobs:
build: |-
set -e &&
cd ./languages/node &&
yarn build --target x86_64-unknown-linux-gnu &&
export npm_config_target=x86_64-unknown-linux-gnu
yarn build && yarn post-build
strip *.node
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: set -e && cd ./languages/node && yarn build && strip *.node
build: set -e && cd ./languages/node && yarn build && yarn post-build && strip *.node

- os: macos-latest
target: aarch64-apple-darwin
Expand All @@ -59,42 +60,42 @@ jobs:
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
yarn build --target aarch64-apple-darwin
yarn build --target aarch64-apple-darwin && yarn post-build
strip -x *.node
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
cd ./languages/node
yarn build --target aarch64-unknown-linux-gnu
yarn build --target aarch64-unknown-linux-gnu && yarn post-build
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
yarn build --target armv7-unknown-linux-gnueabihf
yarn build --target armv7-unknown-linux-gnueabihf && yarn post-build
- os: ubuntu-latest
target: aarch64-linux-android
build: |
yarn build --target aarch64-linux-android
yarn build --target aarch64-linux-android && yarn post-build
- os: ubuntu-latest
target: armv7-linux-androideabi
build: |
yarn build --target armv7-linux-androideabi
yarn build --target armv7-linux-androideabi && yarn post-build
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
cd ./languages/node &&
yarn build --target aarch64-unknown-linux-musl
yarn build --target aarch64-unknown-linux-musl && yarn post-build
#- os: windows-latest
# target: aarch64-pc-windows-msvc
# build: yarn build --target aarch64-pc-windows-msvc
# build: yarn build --target aarch64-pc-windows-msvc && yarn post-build

name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.os }}
Expand Down
3 changes: 2 additions & 1 deletion languages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
}
},
"scripts": {
"build": "yarn --cwd ../../crates/infisical-napi build --target $npm_config_target && npm run move && npm run format-binding",
"build": "yarn --cwd ../../crates/infisical-napi build",
"post-build": "npm run move && npm run format-binding",
"build-arm64": "npm run build-arm64 --prefix ../../crates/infisical-napi && npm run move && npm run format-binding",
"build-gnu-arm64": "npm run build-gnu-arm64 --prefix ../../crates/infisical-napi && npm run move && npm run format-binding",
"build-win-ia32": "npm run build-win-ia32 --prefix ../../crates/infisical-napi && npm run move-win-ia32 && npm run format-binding",
Expand Down

0 comments on commit 5871a1d

Please sign in to comment.