Skip to content

Commit c359cb7

Browse files
committed
fix(ci): update ONNX Runtime artifact verification to check for .mjs files
The ONNX Runtime build produces .mjs files (ort-wasm-simd-threaded.mjs) but the workflow verification was checking for .js files, causing build failures. Updated both cache validation and build verification steps to check for the correct .mjs extension.
1 parent c8c90bb commit c359cb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build-wasm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ jobs:
398398
- name: Verify cached artifacts
399399
id: onnx-cache-valid
400400
run: |
401-
if [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] && [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
401+
if [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] && [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.mjs" ]; then
402402
echo "valid=true" >> $GITHUB_OUTPUT
403403
echo "Cache hit: artifacts found"
404404
ls -lh packages/onnxruntime/build/wasm/
@@ -469,15 +469,15 @@ jobs:
469469
- name: Verify build artifacts
470470
run: |
471471
echo "=== ONNX Runtime Build Artifacts ==="
472-
if [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] || [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
472+
if [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] || [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.mjs" ]; then
473473
echo "ERROR: Required ONNX Runtime WASM artifacts not found!"
474474
ls -lh packages/onnxruntime/build/wasm/ || echo "Directory does not exist"
475475
exit 1
476476
fi
477477
ls -lh packages/onnxruntime/build/wasm/
478478
echo ""
479479
echo "ort-wasm-simd-threaded.wasm size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm | cut -f1)"
480-
echo "ort-wasm-simd-threaded.js size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js | cut -f1)"
480+
echo "ort-wasm-simd-threaded.mjs size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.mjs | cut -f1)"
481481
482482
- name: Upload ONNX Runtime artifacts
483483
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

0 commit comments

Comments
 (0)