3434
3535jobs :
3636 build-wasm :
37- runs-on : ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
37+ runs-on : [
38+ " self-hosted" ,
39+ " 1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU" ,
40+ " JobId=build-wasm-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
41+ ]
3842 env :
3943 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 }}
44+ common_build_args : >-
45+ --parallel
46+ ${{ inputs.use_vcpkg == true && '--use_vcpkg --use_vcpkg_ms_internal_asset_cache' || '' }}
47+ --config ${{ inputs.build_config }}
48+ --skip_submodule_sync
49+ --build_wasm
50+ --enable_wasm_simd
51+ ${{ inputs.enable_wasm_threads == true && '--enable_wasm_threads' || '' }}
52+ ${{ inputs.extra_build_args }}
4153
4254 steps :
4355 - name : Checkout code
44- uses : actions/checkout@v5
56+ uses : actions/checkout@v6
4557 with :
4658 submodules : recursive
4759
4860 - name : Set up Node.js
49- uses : actions/setup-node@v5
61+ uses : actions/setup-node@v6
5062 with :
5163 node-version : " 22"
5264
7082 python ./tools/ci_build/build.py \
7183 ${{ env.common_build_args }} \
7284 --build_dir ${{ github.workspace }}/build/wasm_inferencing \
85+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
7386 --skip_tests
7487 working-directory : ${{ github.workspace }}
7588
8295 --use_jsep \
8396 --use_webnn \
8497 --target onnxruntime_webassembly \
98+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
8599 --skip_tests
86100 working-directory : ${{ github.workspace }}
87101
@@ -94,6 +108,20 @@ jobs:
94108 --use_webgpu \
95109 --use_webnn \
96110 --target onnxruntime_webassembly \
111+ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \
112+ --skip_tests
113+ working-directory : ${{ github.workspace }}
114+
115+ - name : Build (simd + threads + WebGPU experimental, JSPI)
116+ if : ${{ inputs.build_webgpu == true }}
117+ run : |
118+ python ./tools/ci_build/build.py \
119+ ${{ env.common_build_args }} \
120+ --build_dir ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi \
121+ --use_webgpu \
122+ --use_webnn \
123+ --enable_wasm_jspi \
124+ --target onnxruntime_webassembly \
97125 --skip_tests
98126 working-directory : ${{ github.workspace }}
99127
@@ -111,10 +139,14 @@ jobs:
111139 cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.wasm ${{ github.workspace }}/artifacts/wasm/
112140 cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.mjs ${{ github.workspace }}/artifacts/wasm/
113141 fi
142+ if [ -d ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi ]; then
143+ cp ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi/${{ inputs.build_config }}/ort-wasm-simd-threaded.jspi.wasm ${{ github.workspace }}/artifacts/wasm/
144+ cp ${{ github.workspace }}/build/wasm_inferencing_webgpu_jspi/${{ inputs.build_config }}/ort-wasm-simd-threaded.jspi.mjs ${{ github.workspace }}/artifacts/wasm/
145+ fi
114146
115147 - name : Upload WASM artifacts
116148 if : ${{ inputs.skip_publish != true }}
117- uses : actions/upload-artifact@v4
149+ uses : actions/upload-artifact@v5
118150 with :
119151 name : ${{ inputs.build_config }}_wasm
120152 path : ${{ github.workspace }}/artifacts/wasm
@@ -143,7 +175,7 @@ jobs:
143175
144176 - name : Publish test results
145177 if : ${{ always() && inputs.build_config == 'Debug' }}
146- uses : actions/upload-artifact@v4
178+ uses : actions/upload-artifact@v5
147179 with :
148180 name : test-results
149181 path : ${{ github.workspace }}/build/**/*.results.xml
0 commit comments