Skip to content

Commit 25c2b60

Browse files
committed
better?
1 parent 40e3a2f commit 25c2b60

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/build_reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ on:
4444
type: string
4545
rustBuildProfile:
4646
required: false
47-
description: 'the profile to use for the build, default is `release-with-assertions`'
47+
description: 'The profile to use for the build, default is `release-with-assertions`, also supports `` for debug and `release` for normal release'
4848
type: string
4949
default: 'release-with-assertions'
5050
uploadSwcArtifact:
@@ -202,7 +202,7 @@ jobs:
202202
- run: node scripts/normalize-version-bump.js
203203
name: normalize versions
204204

205-
- run: pnpm dlx turbo@${TURBO_VERSION} run build-native -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }} --cargo-flags=--profile=${{ inputs.rustBuildProfile}}
205+
- run: pnpm dlx turbo@${TURBO_VERSION} run build-native-${{ inputs.rustBuildProfile }} -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
206206
if: ${{ inputs.skipNativeBuild != 'yes' }}
207207

208208
- name: Upload next-swc artifact

packages/next-swc/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"clean": "node ../../scripts/rm.mjs native",
1010
"build-native": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features plugin,image-extended --js false native",
1111
"build-native-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features plugin,image-extended,tracing/release_max_level_info --js false native",
12+
"build-native-release-with-assertions": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --cargo-flags=--profile=release-with-assertions --features plugin,image-extended,tracing/release_max_level_info --js false native",
1213
"build-native-no-plugin": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features image-webp --js false native",
1314
"build-native-no-plugin-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features image-webp,tracing/release_max_level_info --js false native",
1415
"build-native-wasi": "npx --package=@napi-rs/[email protected] napi build --platform --target wasm32-wasip1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native --no-default-features",

packages/next-swc/turbo.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@
2828
"env": ["CI"],
2929
"outputs": ["native/*.node"]
3030
},
31+
"build-native-release-with-assertions": {
32+
"inputs": [
33+
"../../.cargo/**",
34+
"../../crates/**",
35+
"../../turbopack/crates/**",
36+
"../../**/Cargo.toml",
37+
"../../**/Cargo.lock",
38+
"../../.github/workflows/build_and_deploy.yml",
39+
"../../rust-toolchain"
40+
],
41+
"env": ["CI"],
42+
"outputs": ["native/*.node"]
43+
},
3144
"build-native-no-plugin": {
3245
"inputs": [
3346
"../../.cargo/**",

0 commit comments

Comments
 (0)