Skip to content

Commit 6775428

Browse files
authored
[ci] Only run Miri tests in merge queue (#1313)
Comparing [1] (run with the parent commit) and [2] (run with this commit), we see an overall speedup of 19m33s -> 6m53s, or ~65%. These gains will only be realized during PR development; the CI test execution time in the merge queue will remain unchanged. [1] https://github.com/google/zerocopy/actions/runs/9149347472 [2] https://github.com/google/zerocopy/actions/runs/9149505999?pr=1313
1 parent 7329607 commit 6775428

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,20 @@ jobs:
268268
# Only nightly has a working Miri, so we skip installing on all other
269269
# toolchains.
270270
#
271+
# We skip Miri tests on pull request, but run them in the merge queue.
272+
# Miri tests are far and away the most expensive aspect of our CI tests,
273+
# but they rarely surface issues (ie, tests that pass `cargo test` but
274+
# fail `cargo miri test`). Skipping them during PR development
275+
# significantly speeds up our development flow, while still ensuring that
276+
# Miri can catch any errors before a PR is merged into main.
277+
#
271278
# TODO(#22): Re-enable testing on riscv64gc-unknown-linux-gnu and/or
272279
# wasm32-wasi once those work.
273-
if: matrix.toolchain == 'nightly' && matrix.target != 'riscv64gc-unknown-linux-gnu' && matrix.target != 'wasm32-wasi'
280+
if: |
281+
matrix.toolchain == 'nightly' &&
282+
matrix.target != 'riscv64gc-unknown-linux-gnu' &&
283+
matrix.target != 'wasm32-wasi' &&
284+
github.event_name != 'pull_request'
274285
275286
- name: Clippy check
276287
run: ./cargo.sh +${{ matrix.toolchain }} clippy --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --tests --verbose

0 commit comments

Comments
 (0)