Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions .github/workflows/cmov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,28 @@ concurrency:
cancel-in-progress: true

jobs:
minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

build:
runs-on: ubuntu-latest
build-no-std:
strategy:
matrix:
rust:
- 1.85.0 # MSRV
- stable
target:
- riscv32i-unknown-none-elf
- thumbv7em-none-eabi
- wasm32-unknown-unknown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
toolchain: stable
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --all-features
- run: cargo build --target ${{ matrix.target }} --all-features --release

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

test:
strategy:
Expand Down Expand Up @@ -163,3 +161,18 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
- run: rustup component add miri && cargo miri setup
- run: cargo miri test --target ${{ matrix.target }} --all-features --lib

# Test WASM using `wasmtime`
test-wasm:
runs-on: ubuntu-latest
env:
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime"
steps:
- uses: actions/checkout@v6
- uses: bytecodealliance/actions/wasmtime/setup@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-wasip1
- run: cargo test --target wasm32-wasip1 --all-features
- run: cargo test --target wasm32-wasip1 --all-features --release
2 changes: 1 addition & 1 deletion cmov/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ wrappers for the CMOV family of instructions on x86/x86_64 and CSEL on AArch64,
portable "best-effort" pure Rust fallback implementation.
"""

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

[lints]
Expand Down
2 changes: 2 additions & 0 deletions cmov/tests/proptests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! `cmov` property-based tests: randomized with shrinking.

#![cfg(any(unix, windows))]

/// Write the proptests for an integer type.
macro_rules! int_proptests {
( $($int:ident),+ ) => {
Expand Down