Skip to content

Commit

Permalink
Replace cross tests with MIRI
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Sep 12, 2023
1 parent 48cc4ac commit 60bd957
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 56 deletions.
33 changes: 0 additions & 33 deletions .github/actions/cross-tests/action.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/ascon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,25 @@ jobs:
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features

miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-symbolic-alignment-check -Zmiri-strict-provenance"
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- s390x-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
component: miri
- run: cargo miri setup
- run: |
cargo miri test --target ${{ matrix.target }} --no-default-features
cargo miri test --target ${{ matrix.target }}
cargo miri test --target ${{ matrix.target }} --all-features
37 changes: 14 additions & 23 deletions .github/workflows/keccak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,27 @@ jobs:
- run: cargo check --features simd
- run: cargo test --features simd

# Cross-compiled tests
cross:
needs: set-msrv
miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-symbolic-alignment-check -Zmiri-strict-provenance"
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
target:
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- powerpc-unknown-linux-gnu
features:
- no_unroll
- 'NO_FEATURE'

runs-on: ubuntu-latest
defaults:
run:
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
working-directory: .
- s390x-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cross-tests
- uses: dtolnay/rust-toolchain@master
with:
rust: ${{ matrix.rust }}
package: ${{ github.workflow }}
target: ${{ matrix.target }}
features: ${{ matrix.features }}
toolchain: nightly
component: miri
- run: cargo miri setup
- run: |
cargo miri test --target ${{ matrix.target }} --no-default-features
cargo miri test --target ${{ matrix.target }}
cargo miri test --target ${{ matrix.target }} --features no_unroll
cargo miri test --target ${{ matrix.target }} --features simd
aarch64-sha3:
needs: set-msrv
Expand Down

0 comments on commit 60bd957

Please sign in to comment.