chore(ci): Use RUSTFLAGS for linux

This commit is contained in:
Donny 2022-01-05 16:05:26 +09:00
parent ef4ea2fc7b
commit 4cbe8d18bb

View File

@ -51,8 +51,8 @@ jobs:
docker pull $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-debian
docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-debian builder
build: |
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "cargo build -p swc_cli --release; rm -rf target/release/.cargo-lock" && cp target/release/swc .
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder yarn build && strip swc.linux-x64-gnu.node
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release; rm -rf target/release/.cargo-lock" && cp target/release/swc .
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder env RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' yarn build && strip swc.linux-x64-gnu.node
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: |
@ -60,8 +60,8 @@ jobs:
docker pull $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine
docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
build: |
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "cargo build -p swc_cli --release; rm -rf target/release/.cargo-lock" && cp target/release/swc .
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder yarn build && strip swc.linux-x64-musl.node
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release; rm -rf target/release/.cargo-lock" && cp target/release/swc .
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder env RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' yarn build && strip swc.linux-x64-musl.node
- host: macos-latest
target: aarch64-apple-darwin
build: |