Skip to content

Commit

Permalink
npm -ws run build -- --target
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 18, 2024
1 parent aa3c917 commit 628e6d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ jobs:
# use npm to run test, because of corepack link the yarn with x64 Node.js
build: |
export CARGO_PROFILE_RELEASE_LTO=false
npm -ws run build --target i686-pc-windows-msvc
npm -ws run build -- --target i686-pc-windows-msvc
npm test
target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: >-
set -e &&
unset CC_x86_64_unknown_linux_gnu && unset CC && npm -ws run build --target x86_64-unknown-linux-gnu
unset CC_x86_64_unknown_linux_gnu && unset CC && npm -ws run build -- --target x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
# musl build is slow, let's disable the LTO
Expand All @@ -63,7 +63,7 @@ jobs:
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
npm -ws run build --target aarch64-apple-darwin
npm -ws run build -- --target aarch64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
Expand All @@ -72,11 +72,11 @@ jobs:
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
rustup target add aarch64-unknown-linux-gnu &&
export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc &&
npm -ws run build --target aarch64-unknown-linux-gnu
npm -ws run build -- --target aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
build: |
npm -ws run build --target armv7-unknown-linux-gnueabihf --zig
npm -ws run build -- --target armv7-unknown-linux-gnueabihf --zig
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
downloadTarget: aarch64-unknown-linux-musl
Expand All @@ -85,14 +85,14 @@ jobs:
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
rustup toolchain install $(cat ./rust-toolchain) &&
rustup target add aarch64-unknown-linux-musl &&
env RUSTFLAGS='-C target-feature=-crt-static' npm -ws run build --target=aarch64-unknown-linux-musl
env RUSTFLAGS='-C target-feature=-crt-static' npm -ws run build -- --target=aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
# Disable `LTO` and increase `codegen-units` to avoid llvm `OOM` on GitHub Actions.
build: |
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=256
export CARGO_PROFILE_RELEASE_LTO=false
npm -ws run build --target aarch64-pc-windows-msvc
npm -ws run build -- --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
Expand Down

0 comments on commit 628e6d2

Please sign in to comment.