File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -244,14 +244,23 @@ jobs:
244244
245245 - name : Run tests under Miri
246246 run : |
247+ set -eo pipefail
248+
247249 # Work around https://github.com/rust-lang/miri/issues/3125
248250 [ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ] && cargo clean
249-
251+
252+ # Spawn twice the number of workers as there are CPU cores.
253+ THREADS=$(echo "$(nproc) * 2" | bc)
254+ echo "Running Miri tests with $THREADS threads" | tee -a $GITHUB_STEP_SUMMARY
255+
256+ cargo install cargo-nextest
257+
250258 # Run under both the stacked borrows model (default) and under the tree
251259 # borrows model to ensure we're compliant with both.
252260 for EXTRA_FLAGS in "" "-Zmiri-tree-borrows"; do
253261 MIRIFLAGS="$MIRIFLAGS $EXTRA_FLAGS" ./cargo.sh +${{ matrix.toolchain }} \
254- miri test \
262+ miri nextest run \
263+ --test-threads "$THREADS" \
255264 --package ${{ matrix.crate }} \
256265 --target ${{ matrix.target }} \
257266 ${{ matrix.features }}
@@ -464,6 +473,7 @@ jobs:
464473 cargo metadata &> /dev/null &
465474 cargo install cargo-readme --version 3.2.0 &> /dev/null &
466475 cargo install --locked kani-verifier &> /dev/null &
476+ cargo install cargo-nextest &> /dev/null &
467477 cargo kani setup &> /dev/null &
468478
469479 wait
You can’t perform that action at this time.
0 commit comments