Skip to content

Commit d309a89

Browse files
committed
wasm: run IEEE and relaxed numerical suites as CI matrix jobs
Expose WASM_RELAXED_SIMD=0 and =1 as separate GitHub Actions jobs so both builds are visible checks. run.sh still runs both locally when the variable is unset. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
1 parent 9de4560 commit d309a89

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

‎.github/workflows/wasm.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ jobs:
3131
if: github.repository == 'OpenMathLib/OpenBLAS' || github.event_name == 'workflow_dispatch'
3232
runs-on: ubuntu-latest
3333
timeout-minutes: 45
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
# Explicit IEEE vs relaxed-SIMD OpenBLAS builds (and matching suite tolerances).
38+
wasm_relaxed_simd: ['0', '1']
39+
40+
name: numerical (WASM_RELAXED_SIMD=${{ matrix.wasm_relaxed_simd }})
3441

3542
steps:
3643
- name: Checkout repository
@@ -54,5 +61,8 @@ jobs:
5461
which emmake emar emranlib
5562
5663
- name: Run WASM numerical CBLAS suite
64+
env:
65+
WASM_RELAXED_SIMD: ${{ matrix.wasm_relaxed_simd }}
5766
run: |
67+
echo "Running suite with WASM_RELAXED_SIMD=${WASM_RELAXED_SIMD}"
5868
JOBS="$(nproc)" ./test/wasm/run.sh

‎test/wasm/run.sh‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,24 @@ build_and_run() {
114114
}
115115

116116
echo "test/wasm run.sh JOBS=$JOBS"
117-
build_and_run 0
118-
build_and_run 1
119-
echo "test/wasm: IEEE + relaxed suites passed"
117+
# If WASM_RELAXED_SIMD is set to 0 or 1, run only that mode (used by CI matrix).
118+
# Otherwise run both IEEE and relaxed builds.
119+
case "${WASM_RELAXED_SIMD-}" in
120+
0)
121+
build_and_run 0
122+
echo "test/wasm: IEEE suite passed (WASM_RELAXED_SIMD=0)"
123+
;;
124+
1)
125+
build_and_run 1
126+
echo "test/wasm: relaxed suite passed (WASM_RELAXED_SIMD=1)"
127+
;;
128+
"")
129+
build_and_run 0
130+
build_and_run 1
131+
echo "test/wasm: IEEE + relaxed suites passed"
132+
;;
133+
*)
134+
echo "WASM_RELAXED_SIMD must be unset, 0, or 1 (got: ${WASM_RELAXED_SIMD})" >&2
135+
exit 1
136+
;;
137+
esac

0 commit comments

Comments
 (0)