ci: run the Zephyr tests only when a change can reach them - #11327
Merged
Merged
Conversation
zephyr-tests has no condition, so it runs on every pull request and takes about 30 minutes, on the critical path. Of the last 60 merged pull requests 23 changed nothing it builds: another port, a translation, a frozen library or a board definition. Gate it the way mpy-cross is gated on the board matrix. The tests build native_sim and the two bsim boards out of the shared sources, so a change confined to docs, locale, frozen, the unix test suite or another port cannot reach them; anything else, including an unknown path, runs them as before. A previously failed zephyr-tests run also forces it, as with docs.
tannewt
approved these changes
Sep 9, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Frozen is fine for now. Thanks!
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.
A first attempt at not running the Zephyr tests on pull requests that don't need them.
zephyr-tests has no condition, so it runs on every pull request, and takes about 30 minutes. Of the last 60 merged pull requests 23 changed nothing it builds - another port, a translation, a frozen library, a board definition.
The rule is written as what cannot reach the tests:
docs/,frozen/,locale/,tests/and ports other than zephyr-cp. Everything else runs them, so an unknown path never turns them off. A zephyr-tests failure on an earlier commit of the PR also runs them.frozen/is the one I'm least sure about - the port has no frozen modules today, but that could change.