3737 runs-on : ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
3838 env :
3939 buildArch : x64
40- common_build_args : --parallel ${{ inputs.use_vcpkg == true && '--use_vcpkg --use_vcpkg_ms_internal_asset_cache' || '' }} --config ${{ inputs.build_config }} --skip_submodule_sync --build_wasm --enable_wasm_simd ${{ inputs.enable_wasm_threads == true && '--enable_wasm_threads' || '' }} ${{ inputs.extra_build_args }}
40+ common_build_args : >-
41+ --parallel
42+ ${{ inputs.use_vcpkg == true && '--use_vcpkg --use_vcpkg_ms_internal_asset_cache' || '' }}
43+ --config ${{ inputs.build_config }}
44+ --skip_submodule_sync
45+ --build_wasm
46+ --enable_wasm_simd
47+ ${{ inputs.enable_wasm_threads == true && '--enable_wasm_threads' || '' }}
48+ ${{ inputs.extra_build_args }}
4149
4250 steps :
4351 - name : Checkout code
4654 submodules : recursive
4755
4856 - name : Set up Node.js
49- uses : actions/setup-node@v5
57+ uses : actions/setup-node@v6
5058 with :
5159 node-version : " 22"
5260
7078 python ./tools/ci_build/build.py \
7179 ${{ env.common_build_args }} \
7280 --build_dir ${{ github.workspace }}/build/wasm_inferencing \
81+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
7382 --skip_tests
7483 working-directory : ${{ github.workspace }}
7584
8291 --use_jsep \
8392 --use_webnn \
8493 --target onnxruntime_webassembly \
94+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
8595 --skip_tests
8696 working-directory : ${{ github.workspace }}
8797
@@ -94,6 +104,20 @@ jobs:
94104 --use_webgpu \
95105 --use_webnn \
96106 --target onnxruntime_webassembly \
107+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
108+ --skip_tests
109+ working-directory : ${{ github.workspace }}
110+
111+ - name : Build (simd + threads + WebGPU experimental, JSPI)
112+ if : ${{ inputs.build_webgpu == true }}
113+ run : |
114+ python ./tools/ci_build/build.py \
115+ ${{ env.common_build_args }} \
116+ --build_dir ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi \
117+ --use_webgpu \
118+ --use_webnn \
119+ --enable_wasm_jspi \
120+ --target onnxruntime_webassembly \
97121 --skip_tests
98122 working-directory : ${{ github.workspace }}
99123
@@ -111,6 +135,10 @@ jobs:
111135 cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.wasm ${{ github.workspace }}/artifacts/wasm/
112136 cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.mjs ${{ github.workspace }}/artifacts/wasm/
113137 fi
138+ if [ -d ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi ]; then
139+ cp ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi/${{ inputs.build_config }}/ort-wasm-simd-threaded.jspi.wasm ${{ github.workspace }}/artifacts/wasm/
140+ cp ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi/${{ inputs.build_config }}/ort-wasm-simd-threaded.jspi.mjs ${{ github.workspace }}/artifacts/wasm/
141+ fi
114142
115143 - name : Upload WASM artifacts
116144 if : ${{ inputs.skip_publish != true }}
0 commit comments