Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,16 @@ jobs:
# Only runs on merge queue / push to main — never blocks PR checks.
if: github.event_name == 'merge_group' || github.event_name == 'push'
runs-on: ubuntu-latest
name: miri
# A healthy run takes well under this; the per-test limit is in the
# Sharded: under Miri every test is its own interpreted process (about
# 30 s minimum each), so the ~1400 selected tests take 4-5 hours serial.
# The 2026-11-05 master run reached 590 tests in the 2-hour cap. Eight
# shards keep each well under the cap; the per-test limit is in the
# `miri` nextest profile (.config/nextest.toml).
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8]
name: miri/${{ matrix.shard }}
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
Expand All @@ -405,6 +412,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- run: ./scripts/miri-tests.sh
env:
MIRI_PARTITION: count:${{ matrix.shard }}/8

cross_test:
# Gated on merge_group only — cross-compile via docker (cross-rs) for
Expand Down
4 changes: 4 additions & 0 deletions scripts/miri-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ export RUSTFLAGS="-Zrandomize-layout"
# The polyfill is no longer the bottleneck — the missing piece is a
# `cfg(miri)` switch in `src/simd.rs` that re-exports from `simd_nightly`
# instead of `simd_avx*` under Miri.
# CI shards the run (MIRI_PARTITION=count:K/N, see ci.yaml § miri): under Miri
# each test is its own interpreted process, so the whole suite takes about
# 4-5 hours on one runner. Unset, the full suite runs in one go.
cargo +nightly miri nextest run -v --profile miri \
--no-fail-fast \
${MIRI_PARTITION:+--partition "$MIRI_PARTITION"} \
-p ndarray -p ndarray-rand \
--features approx,serde,nightly-simd \
-E '!(
Expand Down
Loading