Unverified Commit 5d85a444 authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

fix(CI): Avoid rebuilding native code in jobs that don't depend on native code (#78944)

The following jobs do not depend on `build-native`, but don't specify `skipNativeBuild`:

- `lint`
- `test-devlow`
- `test-next-swc-wasm`
- `test-next-swc-napi-wasi` *(currently disabled)*
- `test-unit` *(does actually appear to depend on native binaries)*

That means that they still build the native binary, but they don't wait for `build-native` to finish first, so they don't use the cached version (they run before the cache is populated), and instead each spend 5 minutes of CPU time rebuilding the native binary.
parent 245406ad
......@@ -86,6 +86,8 @@ jobs:
needs: ['build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
skipNativeInstall: 'yes'
afterBuild: |
pnpm lint-no-typescript
pnpm check-examples
......@@ -213,6 +215,7 @@ jobs:
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
stepName: 'test-devlow'
afterBuild: |
pnpm run --filter=devlow-bench test
......@@ -342,6 +345,8 @@ jobs:
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
skipNativeInstall: 'yes'
afterBuild: |
rustup target add wasm32-unknown-unknown
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
......@@ -371,6 +376,8 @@ jobs:
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
skipNativeInstall: 'yes'
afterBuild: |
rustup target add wasm32-wasip1-threads
pnpm dlx turbo@${TURBO_VERSION} run build-native-wasi
......@@ -379,7 +386,7 @@ jobs:
test-unit:
name: test unit
needs: ['changes']
needs: ['changes', 'build-next', 'build-native']
if: ${{ needs.changes.outputs.docs-only == 'false' }}
strategy:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment