This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch cherry_pick_08925959
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git

commit cb5849188c5d386368532f03600aef5372b5270e
Author: Andrew Lamb <[email protected]>
AuthorDate: Sat Nov 6 05:55:53 2021 -0400

    Automatically retry failed MIRI runs to work around intermittent failures 
(#922)
    
    * Move MIRI checks into a shell script
    
    * add retry loop
---
 .github/workflows/miri.sh   | 26 ++++++++++++++++++++++++++
 .github/workflows/miri.yaml |  7 +------
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/miri.sh b/.github/workflows/miri.sh
new file mode 100755
index 0000000..27c6f5e
--- /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 136b0e1..373f24c 100644
--- a/.github/workflows/miri.yaml
+++ b/.github/workflows/miri.yaml
@@ -52,9 +52,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

Reply via email to