Skip to content

Commit bfb0231

Browse files
committed
fix(ci): move Windows WASM cache check before build attempt
Move the Windows WASM cache requirement check to run immediately after cache validation steps, before attempting to build WASM assets. This prevents Windows builds from failing during AI model downloads due to network issues. Previous behavior: - Cache validation steps run - Setup Python and start building WASM assets - Windows builds fail during AI model download from Hugging Face - Windows cache check never triggered (too late in workflow) New behavior: - Cache validation steps run - Windows cache check runs immediately if any cache invalid - Build fails fast with clear error message before setup steps - No wasted time on expensive Python/Emscripten setup The check now correctly blocks Windows builds that don't have pre-cached WASM assets from build-wasm.yml workflow.
1 parent 90a6344 commit bfb0231

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/build-sea.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ jobs:
154154
echo "✗ ONNX Runtime cache invalid or missing"
155155
fi
156156
157+
- name: Check WASM cache requirements (Windows)
158+
if: matrix.os == 'windows' && (steps.yoga-cache-valid.outputs.valid != 'true' || steps.ai-cache-valid.outputs.valid != 'true' || steps.onnx-cache-valid.outputs.valid != 'true')
159+
run: |
160+
echo "::error::WASM assets not cached for Windows build. Run build-wasm.yml workflow first to prime the cache."
161+
echo "Windows builds require pre-cached WASM assets due to network reliability issues."
162+
exit 1
163+
157164
- name: Setup Python for WASM builds
158165
if: steps.yoga-cache-valid.outputs.valid != 'true' || steps.ai-cache-valid.outputs.valid != 'true' || steps.onnx-cache-valid.outputs.valid != 'true'
159166
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
@@ -239,13 +246,6 @@ jobs:
239246
key: node-sea-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.sea-cache-key.outputs.hash }}
240247
restore-keys: node-sea-${{ matrix.platform }}-${{ matrix.arch }}-
241248

242-
- name: Check WASM cache requirements (Windows)
243-
if: matrix.os == 'windows' && (steps.yoga-cache-valid.outputs.valid != 'true' || steps.ai-cache-valid.outputs.valid != 'true' || steps.onnx-cache-valid.outputs.valid != 'true')
244-
run: |
245-
echo "::error::WASM assets not cached for Windows build. Run build-wasm.yml workflow first to prime the cache."
246-
echo "Windows builds require pre-cached WASM assets due to network reliability issues."
247-
exit 1
248-
249249
- name: Build CLI (required for SEA)
250250
if: steps.sea-cache.outputs.cache-hit != 'true' || inputs.force
251251
run: pnpm --filter @socketsecurity/cli run build

0 commit comments

Comments
 (0)