Skip to content

Commit

Permalink
Cherry pick Automatically retry failed MIRI runs to work around inter…
Browse files Browse the repository at this point in the history
…mittent failures (#934)

* Automatically retry failed MIRI runs to work around intermittent failures (#922)

* Move MIRI checks into a shell script

* add retry loop

* Do not use cache for miri
  • Loading branch information
alamb committed Nov 9, 2021
1 parent c9a9515 commit 3f0e252
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/miri.sh
@@ -0,0 +1,26 @@
#!/bin/bash
#
# Script
#
# Must be run with nightly rust for example
# rustup default nightly


export MIRIFLAGS="-Zmiri-disable-isolation"
cargo miri setup
cargo clean

run_miri() {
# Currently only the arrow crate is tested with miri
# IO related tests and some unsupported tests are skipped
cargo miri test -p arrow -- --skip csv --skip ipc --skip json
}

# If MIRI fails, automatically retry
# Seems like miri is occasionally killed by the github runner
# https://github.com/apache/arrow-rs/issues/879
for i in `seq 1 5`; do
echo "Starting Arrow MIRI run..."
run_miri && break
echo "foo" > /tmp/data.txt
done
14 changes: 1 addition & 13 deletions .github/workflows/miri.yaml
Expand Up @@ -35,13 +35,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
Expand All @@ -52,9 +45,4 @@ jobs:
RUST_BACKTRACE: full
RUST_LOG: 'trace'
run: |
export MIRIFLAGS="-Zmiri-disable-isolation"
cargo miri setup
cargo clean
# Currently only the arrow crate is tested with miri
# IO related tests and some unsupported tests are skipped
cargo miri test -p arrow -- --skip csv --skip ipc --skip json
bash .github/workflows/miri.sh

0 comments on commit 3f0e252

Please sign in to comment.