Skip to content

Commit

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

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/ascon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,28 @@ 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
- name: Install Miri
run: |
rustup component add miri
cargo miri setup
- name: Test with Miri
run: |
cargo miri test --target ${{ matrix.target }} --no-default-features
cargo miri test --target ${{ matrix.target }}
cargo miri test --target ${{ matrix.target }} --all-features
40 changes: 17 additions & 23 deletions .github/workflows/keccak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,30 @@ 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
- name: Install Miri
run: |
rustup component add miri
cargo miri setup
- name: Test with Miri
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 329d4cd

Please sign in to comment.