5252 variables :
5353 buildArch : x64
5454 CommonBuildArgs : ' --parallel --config ${{ parameters.BuildConfig }} --skip_submodule_sync --build_wasm --enable_wasm_simd --enable_wasm_threads ${{ parameters.ExtraBuildArgs }}'
55+ ${{ if eq(parameters.BuildConfig, 'Release') }} :
56+ # Add '--enable_wasm_api_exception_catching' only for non-JSPI Release build
57+ ExceptionHandlingBuildArgs : ' --enable_wasm_api_exception_catching'
58+ ${{ else }} :
59+ ExceptionHandlingBuildArgs : ' '
5560 runCodesignValidationInjection : false
5661 TODAY : $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
5762 ORT_CACHE_DIR : $(Agent.TempDirectory)/ort_ccache
@@ -110,7 +115,7 @@ jobs:
110115 ${{ else }} :
111116 AdditionalKey : wasm_inferencing | ${{ parameters.BuildConfig }}
112117 CacheDir : $(ORT_CACHE_DIR)/wasm_inferencing
113- Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing ${{ eq(parameters.BuildConfig, '' Release '' ) && '' --enable_wasm_api_exception_catching '' || '''' }} --wasm_run_tests_in_browser'
118+ Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing $(ExceptionHandlingBuildArgs) --wasm_run_tests_in_browser'
114119 DisplayName : ' Build and test (browser) (simd + threads)'
115120 WithCache : ${{ parameters.WithCache }}
116121
@@ -123,7 +128,7 @@ jobs:
123128 ${{ else }} :
124129 AdditionalKey : wasm_inferencing_jsep | ${{ parameters.BuildConfig }}
125130 CacheDir : $(ORT_CACHE_DIR)/wasm_inferencing_jsep
126- Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_jsep --use_jsep --use_webnn --target onnxruntime_webassembly ${{ eq(parameters.BuildConfig, '' Release '' ) && '' --enable_wasm_api_exception_catching '' || '''' }} --skip_tests'
131+ Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_jsep --use_jsep --use_webnn --target onnxruntime_webassembly $(ExceptionHandlingBuildArgs) --skip_tests'
127132 DisplayName : ' Build (simd + threads + JSEP)'
128133 WithCache : ${{ parameters.WithCache }}
129134
@@ -136,7 +141,7 @@ jobs:
136141 ${{ else }} :
137142 AdditionalKey : wasm_inferencing_webgpu | ${{ parameters.BuildConfig }}
138143 CacheDir : $(ORT_CACHE_DIR)/wasm_inferencing_webgpu
139- Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu --use_webgpu --use_webnn --target onnxruntime_webassembly ${{ eq(parameters.BuildConfig, '' Release '' ) && '' --enable_wasm_api_exception_catching '' || '''' }} --skip_tests'
144+ Arguments : ' $(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu --use_webgpu --use_webnn --target onnxruntime_webassembly $(ExceptionHandlingBuildArgs) --skip_tests'
140145 DisplayName : ' Build (simd + threads + WebGPU experimental)'
141146 WithCache : ${{ parameters.WithCache }}
142147
0 commit comments