@@ -241,124 +241,126 @@ jobs:
241241 path : packages/socketbin-cli-ai/dist/
242242 retention-days : 7
243243
244- build-onnx-runtime :
245- name : 🌐 Build ONNX Runtime WASM
246- runs-on : ubuntu-latest
247- timeout-minutes : 90
248- steps :
249- - name : Checkout
250- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
251-
252- - name : Setup Node.js
253- uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
254- with :
255- node-version : 22
256-
257- - name : Setup pnpm
258- uses : pnpm/action-setup@9fd676a19091d4595eefd76e4bd31c97133911f1 # v4.2.0
259- with :
260- version : ^10.16.0
261-
262- - name : Install dependencies
263- run : pnpm install --frozen-lockfile
264-
265- - name : Generate ONNX Runtime cache key
266- id : onnx-cache-key
267- run : |
268- # Extract ONNX Runtime version from package.json (package version matches ONNX Runtime release).
269- ONNX_VERSION=$(node -p "require('./packages/onnxruntime/package.json').version")
270- # Hash includes script files and package.json.
271- HASH=$(find packages/onnxruntime -type f \( -name "*.mjs" -o -name "package.json" \) | sort | xargs sha256sum | sha256sum | cut -d' ' -f1)
272- FULL_HASH="${HASH}-${ONNX_VERSION}"
273- echo "hash=$FULL_HASH" >> $GITHUB_OUTPUT
274- echo "ONNX Runtime version: v$ONNX_VERSION"
275-
276- - name : Restore ONNX Runtime output cache
277- id : onnx-cache
278- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
279- with :
280- path : packages/onnxruntime/build/wasm
281- key : onnx-runtime-${{ steps.onnx-cache-key.outputs.hash }}
282- restore-keys : onnx-runtime-
283- enableCrossOsArchive : true
284-
285- - name : Restore ONNX Runtime build cache
286- id : onnx-build-cache
287- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
288- with :
289- path : packages/onnxruntime/build
290- key : onnx-runtime-build-${{ steps.onnx-cache-key.outputs.hash }}
291- restore-keys : |
292- onnx-runtime-build-
293-
294- - name : Verify cached artifacts
295- id : onnx-cache-valid
296- run : |
297- if [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] && [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
298- echo "valid=true" >> $GITHUB_OUTPUT
299- echo "Cache hit: artifacts found"
300- ls -lh packages/onnxruntime/build/wasm/
301- else
302- echo "valid=false" >> $GITHUB_OUTPUT
303- echo "Cache miss or incomplete: forcing rebuild"
304- ls -lh packages/onnxruntime/build/wasm/ 2>/dev/null || echo "Directory does not exist"
305- fi
306-
307- - name : Install Emscripten
308- if : steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force
309- run : |
310- echo "::group::Installing Emscripten"
311- git clone https://github.com/emscripten-core/emsdk.git
312- cd emsdk
313- ./emsdk install latest
314- ./emsdk activate latest
315- echo "::endgroup::"
316-
317- - name : Build ONNX Runtime WASM
318- if : steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force
319- run : |
320- echo "::group::Building ONNX Runtime WASM (this will take 30-60 minutes)"
321- source emsdk/emsdk_env.sh
322- if [ "${{ inputs.force }}" = "true" ]; then
323- pnpm --filter @socketsecurity/onnxruntime run build -- --force
324- else
325- pnpm --filter @socketsecurity/onnxruntime run build
326- fi
327- echo "Build exit code: $?"
328- echo "Checking for build artifacts..."
329- ls -lh packages/onnxruntime/build/wasm/ || echo "wasm directory not found"
330- echo "::endgroup::"
331-
332- - name : Save ONNX Runtime build cache
333- if : always() && (steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force)
334- uses : actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
335- with :
336- path : packages/onnxruntime/build
337- key : onnx-runtime-build-${{ steps.onnx-cache-key.outputs.hash }}-${{ github.run_id }}
338-
339- - name : Verify build artifacts
340- run : |
341- echo "=== ONNX Runtime Build Artifacts ==="
342- if [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] || [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
343- echo "ERROR: Required ONNX Runtime WASM artifacts not found!"
344- ls -lh packages/onnxruntime/build/wasm/ || echo "Directory does not exist"
345- exit 1
346- fi
347- ls -lh packages/onnxruntime/build/wasm/
348- echo ""
349- echo "ort-wasm-simd-threaded.wasm size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm | cut -f1)"
350- echo "ort-wasm-simd-threaded.js size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js | cut -f1)"
351-
352- - name : Upload ONNX Runtime artifacts
353- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
354- with :
355- name : onnx-runtime
356- path : packages/onnxruntime/build/wasm/
357- retention-days : 7
244+ # TEMPORARILY DISABLED: ONNX Runtime build issues.
245+ # Re-enable once build script is working correctly.
246+ # build-onnx-runtime:
247+ # name: 🌐 Build ONNX Runtime WASM
248+ # runs-on: ubuntu-latest
249+ # timeout-minutes: 90
250+ # steps:
251+ # - name: Checkout
252+ # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
253+
254+ # - name: Setup Node.js
255+ # uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
256+ # with:
257+ # node-version: 22
258+
259+ # - name: Setup pnpm
260+ # uses: pnpm/action-setup@9fd676a19091d4595eefd76e4bd31c97133911f1 # v4.2.0
261+ # with:
262+ # version: ^10.16.0
263+
264+ # - name: Install dependencies
265+ # run: pnpm install --frozen-lockfile
266+
267+ # - name: Generate ONNX Runtime cache key
268+ # id: onnx-cache-key
269+ # run: |
270+ # # Extract ONNX Runtime version from package.json (package version matches ONNX Runtime release).
271+ # ONNX_VERSION=$(node -p "require('./packages/onnxruntime/package.json').version")
272+ # # Hash includes script files and package.json.
273+ # HASH=$(find packages/onnxruntime -type f \( -name "*.mjs" -o -name "package.json" \) | sort | xargs sha256sum | sha256sum | cut -d' ' -f1)
274+ # FULL_HASH="${HASH}-${ONNX_VERSION}"
275+ # echo "hash=$FULL_HASH" >> $GITHUB_OUTPUT
276+ # echo "ONNX Runtime version: v$ONNX_VERSION"
277+
278+ # - name: Restore ONNX Runtime output cache
279+ # id: onnx-cache
280+ # uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
281+ # with:
282+ # path: packages/onnxruntime/build/wasm
283+ # key: onnx-runtime-${{ steps.onnx-cache-key.outputs.hash }}
284+ # restore-keys: onnx-runtime-
285+ # enableCrossOsArchive: true
286+
287+ # - name: Restore ONNX Runtime build cache
288+ # id: onnx-build-cache
289+ # uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
290+ # with:
291+ # path: packages/onnxruntime/build
292+ # key: onnx-runtime-build-${{ steps.onnx-cache-key.outputs.hash }}
293+ # restore-keys: |
294+ # onnx-runtime-build-
295+
296+ # - name: Verify cached artifacts
297+ # id: onnx-cache-valid
298+ # run: |
299+ # if [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] && [ -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
300+ # echo "valid=true" >> $GITHUB_OUTPUT
301+ # echo "Cache hit: artifacts found"
302+ # ls -lh packages/onnxruntime/build/wasm/
303+ # else
304+ # echo "valid=false" >> $GITHUB_OUTPUT
305+ # echo "Cache miss or incomplete: forcing rebuild"
306+ # ls -lh packages/onnxruntime/build/wasm/ 2>/dev/null || echo "Directory does not exist"
307+ # fi
308+
309+ # - name: Install Emscripten
310+ # if: steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force
311+ # run: |
312+ # echo "::group::Installing Emscripten"
313+ # git clone https://github.com/emscripten-core/emsdk.git
314+ # cd emsdk
315+ # ./emsdk install latest
316+ # ./emsdk activate latest
317+ # echo "::endgroup::"
318+
319+ # - name: Build ONNX Runtime WASM
320+ # if: steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force
321+ # run: |
322+ # echo "::group::Building ONNX Runtime WASM (this will take 30-60 minutes)"
323+ # source emsdk/emsdk_env.sh
324+ # if [ "${{ inputs.force }}" = "true" ]; then
325+ # pnpm --filter @socketsecurity/onnxruntime run build -- --force
326+ # else
327+ # pnpm --filter @socketsecurity/onnxruntime run build
328+ # fi
329+ # echo "Build exit code: $?"
330+ # echo "Checking for build artifacts..."
331+ # ls -lh packages/onnxruntime/build/wasm/ || echo "wasm directory not found"
332+ # echo "::endgroup::"
333+
334+ # - name: Save ONNX Runtime build cache
335+ # if: always() && (steps.onnx-cache-valid.outputs.valid != 'true' || inputs.force)
336+ # uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
337+ # with:
338+ # path: packages/onnxruntime/build
339+ # key: onnx-runtime-build-${{ steps.onnx-cache-key.outputs.hash }}-${{ github.run_id }}
340+
341+ # - name: Verify build artifacts
342+ # run: |
343+ # echo "=== ONNX Runtime Build Artifacts ==="
344+ # if [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm" ] || [ ! -f "packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js" ]; then
345+ # echo "ERROR: Required ONNX Runtime WASM artifacts not found!"
346+ # ls -lh packages/onnxruntime/build/wasm/ || echo "Directory does not exist"
347+ # exit 1
348+ # fi
349+ # ls -lh packages/onnxruntime/build/wasm/
350+ # echo ""
351+ # echo "ort-wasm-simd-threaded.wasm size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.wasm | cut -f1)"
352+ # echo "ort-wasm-simd-threaded.js size: $(du -h packages/onnxruntime/build/wasm/ort-wasm-simd-threaded.js | cut -f1)"
353+
354+ # - name: Upload ONNX Runtime artifacts
355+ # uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
356+ # with:
357+ # name: onnx-runtime
358+ # path: packages/onnxruntime/build/wasm/
359+ # retention-days: 7
358360
359361 summary :
360362 name : 📊 🧱 WASM Build Summary
361- needs : [build-yoga-layout, build-ai-models, build-onnx-runtime]
363+ needs : [build-yoga-layout, build-ai-models] # build-onnx-runtime temporarily disabled
362364 runs-on : ubuntu-latest
363365 steps :
364366 - name : Download all artifacts
0 commit comments