Skip to content

Commit 3278182

Browse files
committed
cmov: test WASM using wasmtime
1 parent 368f33d commit 3278182

3 files changed

Lines changed: 27 additions & 18 deletions

File tree

.github/workflows/cmov.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,22 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29-
minimal-versions:
30-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
31-
with:
32-
working-directory: ${{ github.workflow }}
33-
34-
build:
29+
build-no-std:
3530
runs-on: ubuntu-latest
36-
strategy:
37-
matrix:
38-
rust:
39-
- 1.85.0 # MSRV
40-
- stable
41-
target:
42-
- thumbv7em-none-eabi
43-
- wasm32-unknown-unknown
4431
steps:
4532
- uses: actions/checkout@v6
4633
- uses: RustCrypto/actions/cargo-cache@master
4734
- uses: dtolnay/rust-toolchain@master
4835
with:
49-
toolchain: ${{ matrix.rust }}
50-
targets: ${{ matrix.target }}
36+
toolchain: stable
37+
targets: thumbv7em-none-eabi
5138
- uses: RustCrypto/actions/cargo-hack-install@master
52-
- run: cargo build --target ${{ matrix.target }}
39+
- run: cargo build --target thumbv7em-none-eabi --all-features
40+
41+
minimal-versions:
42+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
43+
with:
44+
working-directory: ${{ github.workflow }}
5345

5446
test:
5547
strategy:
@@ -163,3 +155,18 @@ jobs:
163155
- uses: dtolnay/rust-toolchain@nightly
164156
- run: rustup component add miri && cargo miri setup
165157
- run: cargo miri test --target ${{ matrix.target }} --all-features --lib
158+
159+
# Test WASM using `wasmtime`
160+
test-wasm:
161+
runs-on: ubuntu-latest
162+
env:
163+
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime"
164+
steps:
165+
- uses: actions/checkout@v6
166+
- uses: bytecodealliance/actions/wasmtime/setup@v1
167+
- uses: dtolnay/rust-toolchain@master
168+
with:
169+
toolchain: stable
170+
targets: wasm32-wasip1
171+
- run: cargo test --target wasm32-wasip1 --all-features
172+
- run: cargo test --target wasm32-wasip1 --all-features --release

cmov/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ wrappers for the CMOV family of instructions on x86/x86_64 and CSEL on AArch64,
1717
portable "best-effort" pure Rust fallback implementation.
1818
"""
1919

20-
[dev-dependencies]
20+
[target.'cfg(any(unix, windows))'.dev-dependencies]
2121
proptest = "1.9"
2222

2323
[lints]

cmov/tests/proptests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! `cmov` property-based tests: randomized with shrinking.
22
3+
#![cfg(any(unix, windows))]
4+
35
/// Write the proptests for an integer type.
46
macro_rules! int_proptests {
57
( $($int:ident),+ ) => {

0 commit comments

Comments
 (0)