From b3c0d521c2dd746c82dcb810c68f7149f9732634 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 5 Nov 2021 07:00:14 -0400 Subject: [PATCH 1/2] Move MIRI checks into a shell script --- .github/workflows/miri.sh | 12 ++++++++++++ .github/workflows/miri.yaml | 7 +------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100755 .github/workflows/miri.sh diff --git a/.github/workflows/miri.sh b/.github/workflows/miri.sh new file mode 100755 index 000000000000..2a01611c600b --- /dev/null +++ b/.github/workflows/miri.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script +# +# Must be run with nightly rust for example +# rustup default nightly +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 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 From 2ca81eda252b1d0c61201c76eebe35f0ece69f33 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 5 Nov 2021 07:07:11 -0400 Subject: [PATCH 2/2] add retry loop --- .github/workflows/miri.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/miri.sh b/.github/workflows/miri.sh index 2a01611c600b..27c6f5eecc87 100755 --- a/.github/workflows/miri.sh +++ b/.github/workflows/miri.sh @@ -4,9 +4,23 @@ # # Must be run with nightly rust for example # rustup default nightly + + 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 + +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