1616 package_name :
1717 type : string
1818 default : " NPM_packages"
19- run_webgpu_tests :
20- type : boolean
21- default : true
2219
2320jobs :
2421 build_onnxruntime_web :
8683 run : |
8784 copy ${{ github.workspace }}\artifacts_wasm\ort-*.mjs ${{ github.workspace }}\js\web\dist\
8885
86+ - name : Download WebAssembly WebGPU artifacts
87+ uses : actions/download-artifact@v4
88+ with :
89+ name : ${{ inputs.build_config }}_wasm_webgpu
90+ path : ${{ github.workspace }}/artifacts_wasm_webgpu
91+
92+ - name : Binplace dist files (.wasm) for WebGPU
93+ shell : cmd
94+ run : |
95+ copy ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.wasm ${{ github.workspace }}\js\web\dist\
96+
97+ - name : Binplace dist files (.mjs) for WebGPU
98+ shell : cmd
99+ run : |
100+ copy ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.mjs ${{ github.workspace }}\js\web\dist\
101+
89102 - name : npm ci for /js/
90103 run : npm ci
91104 working-directory : ${{ github.workspace }}/js
@@ -115,17 +128,7 @@ jobs:
115128 run : |
116129 Get-WmiObject Win32_Process -Filter "name = 'chrome.exe'" | Format-List CommandLine
117130
118- - name : Run ort-web tests (wasm,webgl backend)
119- if : ${{ inputs.run_webgpu_tests != true }}
120- shell : cmd
121- run : |
122- mkdir ${{ runner.temp }}\web\test\01
123- dir ${{ runner.temp }}\web\test\01
124- npm test -- -e=chrome -b=webgl,wasm --user-data-dir=${{ runner.temp }}\web\test\01 --chromium-flags=--enable-logging --chromium-flags=--v=1
125- working-directory : ${{ github.workspace }}\js\web
126-
127131 - name : Run ort-web tests (ALL backends)
128- if : ${{ inputs.run_webgpu_tests == true }}
129132 shell : cmd
130133 run : |
131134 mkdir ${{ runner.temp }}\web\test\02
@@ -134,7 +137,6 @@ jobs:
134137 working-directory : ${{ github.workspace }}\js\web
135138
136139 - name : Run ort-web tests (Suite1, webgpu, IO-binding=gpu-tensor)
137- if : ${{ inputs.run_webgpu_tests == true }}
138140 shell : cmd
139141 run : |
140142 mkdir ${{ runner.temp }}\web\test\03
@@ -143,7 +145,6 @@ jobs:
143145 working-directory : ${{ github.workspace }}\js\web
144146
145147 - name : Run ort-web tests (Suite1, webgpu, IO-binding=gpu-location)
146- if : ${{ inputs.run_webgpu_tests == true }}
147148 shell : cmd
148149 run : |
149150 mkdir ${{ runner.temp }}\web\test\04
@@ -169,27 +170,7 @@ jobs:
169170 working-directory : ${{ github.workspace }}\js\web
170171
171172 # WebGPU EP tests
172- - name : Download WebAssembly WebGPU artifacts
173- if : ${{ inputs.run_webgpu_tests == true }}
174- uses : actions/download-artifact@v4
175- with :
176- name : ${{ inputs.build_config }}_wasm_webgpu
177- path : ${{ github.workspace }}/artifacts_wasm_webgpu
178-
179- - name : Binplace dist files (.wasm) for WebGPU
180- if : ${{ inputs.run_webgpu_tests == true }}
181- shell : cmd
182- run : |
183- copy /Y ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.wasm ${{ github.workspace }}\js\web\dist\
184-
185- - name : Binplace dist files (.mjs) for WebGPU
186- if : ${{ inputs.run_webgpu_tests == true }}
187- shell : cmd
188- run : |
189- copy /Y ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.mjs ${{ github.workspace }}\js\web\dist\
190-
191173 - name : Run ort-web tests - WebGPU EP
192- if : ${{ inputs.run_webgpu_tests == true }}
193174 continue-on-error : true
194175 shell : cmd
195176 run : |
@@ -199,15 +180,15 @@ jobs:
199180 working-directory : ${{ github.workspace }}\js\web
200181
201182 - name : Validate shader keys - WebGPU EP
202- if : ${{ inputs.run_webgpu_tests == true && inputs. build_config == 'Debug' }}
183+ if : ${{ inputs.build_config == 'Debug' }}
203184 uses : ./.github/actions/webgpu-validate-shader-key
204185 with :
205186 log_file_path : ${{ runner.temp }}\web\test\07\chrome_debug.log
206187 is_chromium_log : true
207188
208189 # this step is added to help investigate the shader validation failure which is hard to reproduce
209190 - name : Upload WebGPU shader validation log on failure
210- if : ${{ failure() && inputs.run_webgpu_tests == true && inputs. build_config == 'Debug' }}
191+ if : ${{ failure() && inputs.build_config == 'Debug' }}
211192 uses : actions/upload-artifact@v4
212193 with :
213194 name : webgpu-shader-validation-logs
0 commit comments