Skip to content

Commit fdef65c

Browse files
committed
faster build
1 parent c1e1e45 commit fdef65c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/publish-npm-package.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,14 @@ jobs:
173173
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
174174
rustup toolchain install $(cat ../../rust-toolchain) &&
175175
rustup target add aarch64-unknown-linux-musl &&
176-
RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl &&
177-
rm -rf target/release/.cargo-lock &&
178-
cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc &&
179-
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
176+
if [[ ${{ inputs.package }} == "core" ]]; then
177+
RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl &&
178+
rm -rf target/release/.cargo-lock &&
179+
cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc &&
180+
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
181+
else
182+
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
183+
fi
180184
- host: windows-latest
181185
target: aarch64-pc-windows-msvc
182186
# Disable `LTO` and increase `codegen-units` to avoid llvm `OOM` on GitHub Actions.

0 commit comments

Comments
 (0)