Skip to content

Commit c4fd876

Browse files
authored
[CI] re-enable wasm CPU tests (#24801)
### Description <!-- Describe your changes. --> 1. re-enable wasm CPU tests. It was originally enabled but was later disabled in a change that treat wasm build as cross-compiling. 2. Use build.py to populate the environment variables. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
1 parent 1b5628a commit c4fd876

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

.github/workflows/linux-wasm-ci-build-and-test-workflow.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,50 @@ jobs:
5757
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
5858
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
5959
60-
- name: Install EMSDK
60+
- name: Build (simd + threads)
6161
run: |
62-
set -ex
63-
cd ${{ github.workspace }}/cmake/external/emsdk
64-
./emsdk install 4.0.4
65-
./emsdk activate 4.0.4
62+
python ./tools/ci_build/build.py \
63+
${{ env.common_build_args }} \
64+
--build_dir ${{ github.workspace }}/build/wasm_inferencing \
65+
--skip_tests
66+
working-directory: ${{ github.workspace }}
67+
68+
- name: Test (Node.js) (simd + threads)
69+
# onnxruntime_test_all is currently only supported in Debug build because it requires exception, which is disabled in Release build.
70+
if: ${{ inputs.build_config == 'Debug' }}
71+
run: |
72+
python ./tools/ci_build/build.py \
73+
${{ env.common_build_args }} \
74+
--build_dir ${{ github.workspace }}/build/wasm_inferencing \
75+
--test
76+
working-directory: ${{ github.workspace }}
6677

67-
- name: Build and test (browser) (simd + threads)
78+
- name: Test (browser) (simd + threads)
79+
# onnxruntime_test_all is currently only supported in Debug build because it requires exception, which is disabled in Release build.
80+
if: ${{ inputs.build_config == 'Debug' }}
6881
run: |
69-
set -e -x
70-
source ${{ github.workspace }}/cmake/external/emsdk/emsdk_env.sh
71-
cd '${{ github.workspace }}'
7282
python ./tools/ci_build/build.py \
7383
${{ env.common_build_args }} \
7484
--build_dir ${{ github.workspace }}/build/wasm_inferencing \
75-
--wasm_run_tests_in_browser
85+
--wasm_run_tests_in_browser \
86+
--test
87+
working-directory: ${{ github.workspace }}
7688

7789
- name: Build (simd + threads + JSEP)
7890
if: ${{ inputs.build_jsep == true }}
7991
run: |
80-
set -e -x
81-
source ${{ github.workspace }}/cmake/external/emsdk/emsdk_env.sh
82-
cd '${{ github.workspace }}'
8392
python ./tools/ci_build/build.py \
8493
${{ env.common_build_args }} \
8594
--build_dir ${{ github.workspace }}/build/wasm_inferencing_jsep \
8695
--use_jsep \
8796
--use_webnn \
8897
--target onnxruntime_webassembly \
8998
--skip_tests
99+
working-directory: ${{ github.workspace }}
90100

91101
- name: Build (simd + threads + WebGPU experimental)
92102
if: ${{ inputs.build_webgpu == true }}
93103
run: |
94-
set -e -x
95-
source ${{ github.workspace }}/cmake/external/emsdk/emsdk_env.sh
96-
cd '${{ github.workspace }}'
97104
python ./tools/ci_build/build.py \
98105
${{ env.common_build_args }} \
99106
--build_dir ${{ github.workspace }}/build/wasm_inferencing_webgpu \
@@ -102,6 +109,7 @@ jobs:
102109
--use_webnn \
103110
--target onnxruntime_webassembly \
104111
--skip_tests
112+
working-directory: ${{ github.workspace }}
105113

106114
- name: Create Artifacts
107115
if: ${{ inputs.skip_publish != true }}

0 commit comments

Comments
 (0)