diff --git a/.github/workflows/miri.sh b/.github/workflows/miri.sh new file mode 100755 index 000000000000..27c6f5eecc87 --- /dev/null +++ b/.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 diff --git a/.github/workflows/miri.yaml b/.github/workflows/miri.yaml index b7d64db1c72c..bcbb48ed31fc 100644 --- a/.github/workflows/miri.yaml +++ b/.github/workflows/miri.yaml @@ -44,9 +44,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