Skip to content

Commit 26afb11

Browse files
committed
Implement Testing on CI via wasmtime
1 parent b1d1ad3 commit 26afb11

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-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

src/wide/i32x8_t.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ impl i32x8 {
6161
Self(blend_varying_i8_m256i(f.0, t.0, self.0))
6262
} else if #[cfg(all(feature = "simd", target_feature = "sse4.1"))] {
6363
Self(blend_varying_i8_m128i(f.0, t.0, self.0), blend_varying_i8_m128i(f.1, t.1, self.1))
64+
} else if #[cfg(all(feature = "simd", target_feature = "simd128"))] {
65+
Self(v128_bitselect(t.0, f.0, self.0), v128_bitselect(t.1, f.1, self.1))
6466
} else {
6567
super::generic_bit_blend(self, t, f)
6668
}

0 commit comments

Comments
 (0)