Skip to content

Commit 2ebd21b

Browse files
committed
ci: enable test for wasm-wasip1 target
Signed-off-by: Master-Hash <[email protected]>
1 parent 4219836 commit 2ebd21b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- { target: aarch64-pc-windows-msvc, os: windows-11-arm }
1717

1818
- { target: aarch64-unknown-linux-gnu, os: ubuntu-22.04, use-cross: true }
19+
- { target: wasm-wasip1, os: ubuntu-24.04 }
1920

2021
# mac-14 is an M1 ARM device.
2122
- { target: aarch64-apple-darwin, os: macos-14 }
@@ -42,6 +43,14 @@ jobs:
4243
with:
4344
4445

46+
- if: ${{ matrix.job.target == 'wasm32-wasip1' }}
47+
run: |
48+
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-29/wasi-sdk-29.0-x86_64-linux.deb
49+
sudo apt-get install ./wasi-sdk-29.0-x86_64-linux.deb
50+
rm ./wasi-sdk-29.0-x86_64-linux.deb
51+
rustup override set stable
52+
rustup target add wasm32-wasip1
53+
4554
- name: Overwrite build command env variable
4655
if: matrix.job.use-cross
4756
shell: bash
@@ -50,6 +59,12 @@ jobs:
5059
- name: Test
5160
shell: bash
5261
run: $BUILD_CMD $SUBCOMMAND --target ${{ matrix.job.target }}
62+
env:
63+
WASI_SDK_PATH: /opt/wasi-sdk
64+
WASI_SYSROOT: /opt/wasi-sdk/share/wasi-sysroot
65+
CC_wasm32_wasip1: /opt/wasi-sdk/bin/clang
66+
AR_wasm32_wasip1: /opt/wasi-sdk/bin/llvm-ar
67+
CFLAGS_wasm32_wasip1: "--sysroot=/opt/wasi-sdk/share/wasi-sysroot"
5368

5469
test_mime_db:
5570
name: Test with MIME database

0 commit comments

Comments
 (0)