Skip to content
Closed
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,46 @@ jobs:
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
run: |
./.github/scripts/compare_iai.sh

miri:
name: miri
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
# See also <https://github.com/foundry-rs/foundry/issues/3827>
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: miri

- name: Setup Miri
run: cargo miri setup

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Install geth
run: |
mkdir -p "$HOME/bin"
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz
tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz
mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth
chmod u+x "$HOME/bin/geth"
export PATH=$HOME/bin:$PATH
echo $HOME/bin >> $GITHUB_PATH
geth version

- name: Install libclang # Necessary for compiling reth-mdbx-sys
run: |
sudo apt update
sudo apt-get install -y libclang-dev

- name: Run tests with miri
uses: xqft/[email protected]
with:
cargoflags: --workspace --all-features
miriflags: -Zmiri-disable-isolation
1 change: 1 addition & 0 deletions crates/primitives/src/bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ macro_rules! impl_fixed_hash_type {
mod hash_tests {
use super::*;

#[cfg_attr(miri, ignore)] // proptests hang miri
#[test]
fn arbitrary() {
$(
Expand Down
1 change: 1 addition & 0 deletions crates/primitives/src/hex_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ mod tests {
assert_ne!(wrong_b, b);
}

#[cfg_attr(miri, ignore)] // proptests hang miri
#[test]
fn arbitrary() {
proptest::proptest!(|(bytes: Bytes)| {
Expand Down
1 change: 1 addition & 0 deletions crates/storage/codecs/derive/src/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub fn maybe_generate_tests(args: TokenStream, ast: &DeriveInput) -> TokenStream
mod #mod_tests {
#(#traits)*

#[cfg_attr(miri, ignore)] // proptests hang miri
#[test]
fn proptest() {
let mut config = proptest::prelude::ProptestConfig::with_cases(#default_cases as u32);
Expand Down