Repository navigation
CI: skip tests and mpy-cross jobs when changes can't affect them - #11916
Merged
Merged
Conversation
The tests job ran on every commit, and mpy-cross and mpy-cross-mac ran whenever any board was built, even though the board builds use the mpy-cross built by the scheduler. ci_set_matrix.py now sets tests and mpy-cross outputs. Each job is skipped only when every changed file matches its ignore list. mpy-cross still always builds on push, so each version's binaries reach S3. The ports job needs tests, so its if: now allows a skipped tests job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows builds were removed in 3d73831. Remove set_windows() and PATTERN_WINDOWS from ci_set_matrix.py, which set an output nothing reads, and the unused windows and windows-zephyr targets from ci_fetch_deps.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the one-line test changes used to check which CI jobs run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhalbert
marked this pull request as ready for review
November 19, 2026 15:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code by Claude, reviewed by @dhalbert.
I noticed that simple board changes were re-running a lot of unneeded jobs, so I had Claude change the CI so only necessary jobs were re-run.
Problem
testsjob (the unix coverage tests) ran on every commit, even when only another port's files changed.mpy-crossandmpy-cross-macjobs ran whenever any board was built. The board builds don't use them: they use the mpy-cross that theschedulerjob builds.Fix
tools/ci_set_matrix.pynow setstestsandmpy-crossoutputs, andbuild.ymlgates the jobs on them. A job is skipped only when every changed file matches its ignore list:tests:docs/, or any port exceptports/unix/.mpy-crossandmpy-cross-mac:docs/,frozen/,ports/ortests/.portsjob needstests, and a skippedtestswould skip it too. Itsif:now includes!failure() && !cancelled().Unrelated to this PR but a leftover:
set_windows()intools/ci_set_matrix.py, and thewindowsandwindows-zephyrtargets intools/ci_fetch_deps.py.Testing
Test commits in this PR, reverted in the last commit, each changed one file to check which jobs run. Each ran only the expected jobs:
ports/unix/Makefiletests/basics/int1.pydocs/index.rst