Skip to content

Commit 4dcf890

Browse files
committed
Implement Testing on CI via wasmtime
1 parent b1d1ad3 commit 4dcf890

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.wasm32-wasi]
2+
runner = "wasmtime run --wasm-features all --dir ."

.github/workflows/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,36 @@ jobs:
5353
env:
5454
RUSTFLAGS: -Ctarget-feature=+avx2
5555
run: cargo test --verbose --all-features
56+
57+
wasm:
58+
runs-on: ubuntu-18.04
59+
strategy:
60+
matrix:
61+
rust:
62+
- nightly
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v2
66+
67+
- name: Install toolchain
68+
uses: actions-rs/toolchain@v1
69+
with:
70+
toolchain: ${{ matrix.rust }}
71+
override: true
72+
target: wasm32-wasi
73+
74+
- name: Install wasmtime
75+
run: |
76+
curl https://wasmtime.dev/install.sh -sSf | bash
77+
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
78+
79+
- name: Build with minimal features (no_std)
80+
run: cargo build --target wasm32-wasi --verbose --no-default-features --features libm
81+
82+
- name: Run tests without SIMD
83+
run: cargo test --target wasm32-wasi --verbose --no-default-features --features png-format
84+
85+
- name: Run tests with SIMD128
86+
env:
87+
RUSTFLAGS: -Ctarget-feature=+simd128,+bulk-memory,+nontrapping-fptoint,+sign-ext
88+
run: cargo test --target wasm32-wasi --verbose --all-features

0 commit comments

Comments
 (0)