4ead5fc00d
As noted in (https://github.com/vercel/nextpack/pull/103), by not having this as a default feature, when running the `build-native` script it's not able to re-use any cargo caches that might already exist from a default build. Because this feature impacts the swc crate, everything dependent on it can be forced to rebuild. By making this a default feature, the hope/theory is that the number of different ways we potentially build our dependency graph reduces, and cargo cache hits will improve. ## Changes - Add `plugin` to the default set of features for `next-swc-napi`. - Consolidate `build-native-no-plugin-woa` with `build-native-no-plugin`. Given the lack of any other default features, these are equivalent. - `i686-pc-windows-msvc`: Switch to `build-native-no-plugin-release` in CI instead of just supplying the `--release` flag. This has the benefit of also enabling `tracing/release_max_level_info`, which might reduce the size of or speed up these builds. - `x86_64-apple-darwin`: Remove a redundant `--release` flag in the CI config (no expected changes). ## Testing I've tested this locally on Linux (`pnpm run build-native`) and Windows-on-ARM (`pnpm run build-native-no-plugin`) by making sure things still build. I'll also make sure CI passes.
130 lines
3.2 KiB
JSON
130 lines
3.2 KiB
JSON
{
|
|
"extends": ["//"],
|
|
"pipeline": {
|
|
"build-native": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../Cargo.toml",
|
|
"../../Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*.node"]
|
|
},
|
|
"build-native-release": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*.node"]
|
|
},
|
|
"build-native-no-plugin": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*.node"]
|
|
},
|
|
"build-native-no-plugin-release": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*.node"]
|
|
},
|
|
"build-wasm": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["crates/wasm/pkg/*"]
|
|
},
|
|
"build-native-wasi": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*"]
|
|
},
|
|
"cache-build-native": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"outputs": ["native/*.node"]
|
|
},
|
|
"rust-check": {
|
|
"dependsOn": [
|
|
"rust-check-fmt",
|
|
"rust-check-clippy",
|
|
"rust-check-napi-rustls"
|
|
]
|
|
},
|
|
"rust-check-fmt": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
],
|
|
"cache": false
|
|
},
|
|
"rust-check-clippy": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
]
|
|
},
|
|
"rust-check-napi-rustls": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
]
|
|
},
|
|
"test-cargo-unit": {
|
|
"inputs": [
|
|
"../../.cargo/**",
|
|
"crates/**",
|
|
"../../**/Cargo.toml",
|
|
"../../**/Cargo.lock",
|
|
"../../.github/workflows/build_and_deploy.yml",
|
|
"../../rust-toolchain"
|
|
]
|
|
}
|
|
}
|
|
}
|