diff --git a/.github/workflows/miri.sh b/.github/workflows/miri.sh index 317b2db18d48..b1307ec30571 100755 --- a/.github/workflows/miri.sh +++ b/.github/workflows/miri.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script # @@ -7,13 +7,40 @@ set -e -export MIRIFLAGS="-Zmiri-disable-isolation" -cargo miri setup -cargo clean +setup_miri() { + export MIRIFLAGS="-Zmiri-disable-isolation" + cargo miri setup + cargo clean +} -echo "Starting Arrow MIRI run..." -cargo miri nextest run \ - -p arrow-buffer -p arrow-data \ - -p arrow-schema -p arrow-ord \ - -p arrow-array -p arrow-arith \ - --features ffi --no-fail-fast \ No newline at end of file + +case $# in + 0) + setup_miri + + echo "Starting Arrow MIRI run..." + cargo miri nextest run \ + -p arrow-buffer -p arrow-data \ + -p arrow-schema -p arrow-ord \ + -p arrow-array -p arrow-arith \ + --features ffi --no-fail-fast + ;; + 2) + setup_miri + + partition=$1 + total=$2 + + echo "Starting Arrow MIRI run partition ${partition} out of ${total}..." + cargo miri nextest run \ + --partition slice:"${partition}"/"${total}" \ + -p arrow-buffer -p arrow-data \ + -p arrow-schema -p arrow-ord \ + -p arrow-array -p arrow-arith \ + --features ffi --no-fail-fast + ;; + *) + echo "usage: $0 [partition total]" >&2 + exit 1 + ;; +esac diff --git a/.github/workflows/miri.yaml b/.github/workflows/miri.yaml index bf5b63027b24..14a03d5ee946 100644 --- a/.github/workflows/miri.yaml +++ b/.github/workflows/miri.yaml @@ -46,6 +46,9 @@ jobs: miri-checks: name: MIRI runs-on: ubuntu-latest + strategy: + matrix: + partition: [1, 2, 3, 4] steps: - uses: actions/checkout@v6 with: @@ -62,4 +65,4 @@ jobs: env: RUST_BACKTRACE: full RUST_LOG: "trace" - run: bash .github/workflows/miri.sh + run: bash .github/workflows/miri.sh ${{ matrix.partition }} 4