11name : CI
2- on : [push, pull_request]
2+ on : [push, pull_request, workflow_dispatch ]
33
44concurrency :
55 group : ${{ github.workflow }}-${{ github.ref }}
@@ -168,113 +168,112 @@ jobs:
168168 test : true
169169 args : -DTARGET_TRIPLE=wasm32-wasip2
170170 steps :
171- - uses : actions/checkout@v6
172- with :
173- submodules : true
174-
175- - uses : ./.github/actions/setup
176- with :
177- clang_version : ${{ matrix.clang_version }}
178- llvm_asset_suffix : ${{ matrix.llvm_asset_suffix }}
179-
180- - name : Install V8 dependencies
181- if : matrix.test_with_v8
182- run : |
183- npm -C test/scripts/browser-test install
184- npx -C test/scripts/browser-test playwright install chromium-headless-shell
185- echo ENGINE="$PWD/test/scripts/browser-test/harness.mjs" >> $GITHUB_ENV
186- echo CTEST_ARGS="--label-exclude v8fail" >> $GITHUB_ENV
187-
188- - name : Configure libc
189- run : |
190- cmake -G Ninja -S . -B build \
191- -DCHECK_SYMBOLS=ON \
192- ${{ matrix.args }} \
193- -DCMAKE_LINK_DEPENDS_USE_LINKER=OFF
194-
195- - name : Configure testing
196- if : matrix.test
197- run : cmake -S . -B build -DENABLE_WERROR=ON -DBUILD_TESTS=ON -DENGINE=${{ env.ENGINE }}
198-
199- - name : Build
200- run : ninja -C build -v
201-
202- - name : Test
203- if : matrix.test
204- run : ctest --test-dir build/test --output-on-failure -j4 $CTEST_ARGS
205-
206- - uses : actions/upload-artifact@v6
207- if : matrix.upload
208- with :
209- name : ${{ format( 'sysroot-{0}.tgz', matrix.upload) }}
210- path : build/sysroot
211-
171+ - uses : actions/checkout@v6
172+ with :
173+ submodules : true
174+
175+ - uses : ./.github/actions/setup
176+ with :
177+ clang_version : ${{ matrix.clang_version }}
178+ llvm_asset_suffix : ${{ matrix.llvm_asset_suffix }}
179+
180+ - name : Install V8 dependencies
181+ if : matrix.test_with_v8
182+ run : |
183+ npm -C test/scripts/browser-test install
184+ npx -C test/scripts/browser-test playwright install chromium-headless-shell
185+ echo ENGINE="$PWD/test/scripts/browser-test/harness.mjs" >> $GITHUB_ENV
186+ echo CTEST_ARGS="--label-exclude v8fail" >> $GITHUB_ENV
187+
188+ - name : Configure libc
189+ run : |
190+ cmake -G Ninja -S . -B build \
191+ -DCHECK_SYMBOLS=ON \
192+ ${{ matrix.args }} \
193+ -DCMAKE_LINK_DEPENDS_USE_LINKER=OFF
194+
195+ - name : Configure testing
196+ if : matrix.test
197+ run : cmake -S . -B build -DENABLE_WERROR=ON -DBUILD_TESTS=ON -DENGINE=${{ env.ENGINE }}
198+
199+ - name : Build
200+ run : ninja -C build -v
201+
202+ - name : Test
203+ if : matrix.test
204+ run : ctest --test-dir build/test --output-on-failure -j4 $CTEST_ARGS
205+
206+ - uses : actions/upload-artifact@v6
207+ if : matrix.upload
208+ with :
209+ name : ${{ format( 'sysroot-{0}.tgz', matrix.upload) }}
210+ path : build/sysroot
212211
213212 # Disable the headerstest job for now, while WASI transitions from the
214213 # witx snapshots to wit proposals, and we have a few manual edits to the
215214 # generated header to make life easier for folks.
216215 headerstest :
217- if : ${{ false }} # Disable the headers test for now.
216+ if : ${{ false }} # Disable the headers test for now.
218217 name : wasi-headers test
219218 runs-on : ${{ matrix.os }}
220219 strategy :
221220 matrix :
222221 os : [ubuntu-latest, macos-15, windows-2025]
223222 steps :
224- - uses : actions/checkout@v6
225- with :
226- submodules : true
227- - name : Install Rust (rustup)
228- run : rustup update stable --no-self-update && rustup default stable
229- if : matrix.os != 'macos-15'
230- - name : Install Rust (macos)
231- run : |
232- curl https://sh.rustup.rs | sh -s -- -y
233- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
234- if : matrix.os == 'macos-15'
235- - run : cargo fetch
236- working-directory : tools/wasi-headers
237- - run : cargo build
238- working-directory : tools/wasi-headers
239- - run : cargo test
240- working-directory : tools/wasi-headers
223+ - uses : actions/checkout@v6
224+ with :
225+ submodules : true
226+ - name : Install Rust (rustup)
227+ run : rustup update stable --no-self-update && rustup default stable
228+ if : matrix.os != 'macos-15'
229+ - name : Install Rust (macos)
230+ run : |
231+ curl https://sh.rustup.rs | sh -s -- -y
232+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
233+ if : matrix.os == 'macos-15'
234+ - run : cargo fetch
235+ working-directory : tools/wasi-headers
236+ - run : cargo build
237+ working-directory : tools/wasi-headers
238+ - run : cargo test
239+ working-directory : tools/wasi-headers
241240
242241 clang-format :
243242 name : Clang Format
244243 runs-on : ubuntu-latest
245244 steps :
246- - uses : actions/checkout@v6
247- with :
248- submodules : true
249- - run : cmake -S . -B build -DBUILD_TESTS=ON -G Ninja -DCMAKE_C_COMPILER=clang
250- - run : ninja -C build format-check
251- - run : cmake -S . -B build -DTARGET_TRIPLE=wasm32-wasip2
252- - run : ninja -C build format-check
253- - run : cmake -S . -B build -DTARGET_TRIPLE=wasm32-wasip1-threads
254- - run : ninja -C build format-check
245+ - uses : actions/checkout@v6
246+ with :
247+ submodules : true
248+ - run : cmake -S . -B build -DBUILD_TESTS=ON -G Ninja -DCMAKE_C_COMPILER=clang
249+ - run : ninja -C build format-check
250+ - run : cmake -S . -B build -DTARGET_TRIPLE=wasm32-wasip2
251+ - run : ninja -C build format-check
252+ - run : cmake -S . -B build -DTARGET_TRIPLE=wasm32-wasip1-threads
253+ - run : ninja -C build format-check
255254
256255 rustfmt :
257256 name : Rustfmt
258257 runs-on : ubuntu-latest
259258 steps :
260- - uses : actions/checkout@v6
261- with :
262- submodules : true
263- - name : Install Rust
264- run : rustup update stable && rustup default stable && rustup component add rustfmt
265- - run : cargo fmt -- --check
266- working-directory : tools/wasi-headers
259+ - uses : actions/checkout@v6
260+ with :
261+ submodules : true
262+ - name : Install Rust
263+ run : rustup update stable && rustup default stable && rustup component add rustfmt
264+ - run : cargo fmt -- --check
265+ working-directory : tools/wasi-headers
267266
268267 bindings :
269268 name : Ensure wit-bingen bindings are up-to-date
270269 runs-on : ubuntu-latest
271270 steps :
272- - uses : actions/checkout@v6
273- with :
274- submodules : true
275- - run : CC=clang cmake -S . -B build -G Ninja
276- - run : ninja -C build bindings
277- - run : git diff --exit-code
271+ - uses : actions/checkout@v6
272+ with :
273+ submodules : true
274+ - run : CC=clang cmake -S . -B build -G Ninja
275+ - run : ninja -C build bindings
276+ - run : git diff --exit-code
278277
279278 # Currently wasi-libc's test suite is pretty bare-bones. To try to increase
280279 # test coverage build Python in CI as well with a fresh copy of wasi-libc.
@@ -295,29 +294,29 @@ jobs:
295294 - name : wasm32-wasip2
296295 args : -DTARGET_TRIPLE=wasm32-wasip2
297296 steps :
298- - uses : actions/checkout@v6
299- with :
300- submodules : true
301- - run : |
302- curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-arm64-linux.tar.gz -L | tar xzvf -
303- echo "WASI_SDK_PATH=`pwd`/wasi-sdk-25.0-arm64-linux" >> $GITHUB_ENV
304- if: runner.os == 'Linux'
305- shell: bash
306- working-directory: ${{ runner.tool_cache }}
307- - name : Setup `wasmtime`
308- uses : bytecodealliance/actions/wasmtime/setup@v1
309- with :
310- version : " 40.0.2"
311- - name : Setup wasi-libc
312- run : |
313- cmake -S . -B build -G Ninja \
314- ${{ matrix.args }} \
315- -DCMAKE_LINK_DEPENDS_USE_LINKER=OFF \
316- -DPYTHON_TESTS=ON \
317- -DBUILD_TESTS=ON \
318- -DCMAKE_C_COMPILER=$WASI_SDK_PATH/bin/clang
319- - name : Build and test python
320- run : ninja -C build -v python
297+ - uses : actions/checkout@v6
298+ with :
299+ submodules : true
300+ - run : |
301+ curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-arm64-linux.tar.gz -L | tar xzvf -
302+ echo "WASI_SDK_PATH=`pwd`/wasi-sdk-25.0-arm64-linux" >> $GITHUB_ENV
303+ if: runner.os == 'Linux'
304+ shell: bash
305+ working-directory: ${{ runner.tool_cache }}
306+ - name : Setup `wasmtime`
307+ uses : bytecodealliance/actions/wasmtime/setup@v1
308+ with :
309+ version : " 40.0.2"
310+ - name : Setup wasi-libc
311+ run : |
312+ cmake -S . -B build -G Ninja \
313+ ${{ matrix.args }} \
314+ -DCMAKE_LINK_DEPENDS_USE_LINKER=OFF \
315+ -DPYTHON_TESTS=ON \
316+ -DBUILD_TESTS=ON \
317+ -DCMAKE_C_COMPILER=$WASI_SDK_PATH/bin/clang
318+ - name : Build and test python
319+ run : ninja -C build -v python
321320
322321 # This is a "join node" which depends on all prior workflows. The merge queue,
323322 # for example, gates on this to ensure that everything has executed
@@ -345,9 +344,9 @@ jobs:
345344 - python
346345 if : always()
347346 steps :
348- # Calculate the exit status of the whole CI workflow.
349- # If all dependent jobs were successful, this exits with 0 (and the
350- # outcome job continues successfully). If a some dependent job has
351- # failed, this exits with 1.
352- - name : calculate the correct exit status
353- run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
347+ # Calculate the exit status of the whole CI workflow.
348+ # If all dependent jobs were successful, this exits with 0 (and the
349+ # outcome job continues successfully). If a some dependent job has
350+ # failed, this exits with 1.
351+ - name : calculate the correct exit status
352+ run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
0 commit comments