Skip to content

Commit

Permalink
npm run build --
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 17, 2024
1 parent 79af478 commit fdcdef0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,33 @@ jobs:
- host: macos-latest
target: x86_64-apple-darwin
build: |
npm run build
npm run build --
- host: windows-latest
build: |
export CARGO_PROFILE_RELEASE_LTO=false
npm run build
npm run build --
target: x86_64-pc-windows-msvc
- host: windows-latest
# use npm to run test, because of corepack link the yarn with x64 Node.js
build: |
export CARGO_PROFILE_RELEASE_LTO=false
npm run build --target i686-pc-windows-msvc
npm 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 run build --target x86_64-unknown-linux-gnu
unset CC_x86_64_unknown_linux_gnu && unset CC && npm 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
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: >-
set -e &&
export CARGO_PROFILE_RELEASE_LTO=false &&
RUSTFLAGS='-C target-feature=+sse2 -C target-feature=-crt-static' npm run build
RUSTFLAGS='-C target-feature=+sse2 -C target-feature=-crt-static' npm run build --
- host: macos-latest
target: aarch64-apple-darwin
build: |
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 run build --target aarch64-apple-darwin
npm 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 run build --target aarch64-unknown-linux-gnu
npm run build -- --target aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
build: |
npm run build --target armv7-unknown-linux-gnueabihf --zig
npm 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 run build --target=aarch64-unknown-linux-musl
env RUSTFLAGS='-C target-feature=-crt-static' npm 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 run build --target aarch64-pc-windows-msvc
npm run build -- --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
run: ls -R .
shell: bash
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Test bindings
run: npm test -ws
test-linux-x64-gnu-binding:
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
run: ls -R .
shell: bash
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Test bindings
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim npm test -ws
test-linux-x64-musl-binding:
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
run: ls -R .
shell: bash
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Test bindings
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine npm test -ws
test-linux-aarch64-gnu-binding:
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
Expand Down Expand Up @@ -377,7 +377,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
Expand Down Expand Up @@ -417,7 +417,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build:ts -ws
run: npm run build --:ts -ws
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
Expand Down Expand Up @@ -460,7 +460,7 @@ jobs:
run: npm ci

- name: Build typescript files
run: npm run build:ts -ws
run: npm run build --:ts -ws

- name: Download all artifacts
uses: actions/download-artifact@v3
Expand Down

0 comments on commit fdcdef0

Please sign in to comment.