ci: skip TheRock build CI for tooling-only changes (tools/**)#8781
ci: skip TheRock build CI for tooling-only changes (tools/**)#8781amd-chrissosa wants to merge 1 commit into
Conversation
therock_configure_ci.py fell back to evaluating all build subtrees when modified files didn't match any known subtree. For PRs that only touch tools/ (bot scripts, utilities) this triggered a full Linux+Windows build matrix with no benefit. Add CI_SKIP_PATH_PREFIXES (initially ['tools/']) and check_only_ci_skip_paths() so that PRs whose every changed file is under a skip prefix produce an empty subtree list and skip the build CI entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
There was a problem hiding this comment.
Pull request overview
This PR updates TheRock CI project/subtree selection logic so that pull requests which only modify tooling under tools/** can skip the full build matrix, avoiding unnecessary Linux+Windows builds when there is no build-subtree impact.
Changes:
- Add
CI_SKIP_PATH_PREFIXES(initially["tools/"]) plus helpers to detect “CI-skip” path-only changes. - Update subtree selection logic to return an empty subtree list (skip CI) when all modified files are under CI-skip prefixes.
- Minor formatting/line-wrapping adjustments to a few generator/logging statements.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Paths that are never part of a build subtree and should not trigger CI when | ||
| # they are the only files changed. If ALL modified paths match one of these | ||
| # prefixes the subtree detection returns an empty set and CI is skipped. | ||
| CI_SKIP_PATH_PREFIXES = [ | ||
| "tools/", | ||
| ] | ||
|
|
||
|
|
||
| def is_ci_skip_path(path: str) -> bool: | ||
| """Return True if `path` belongs to a directory that never affects any build subtree.""" | ||
| return any(path.startswith(prefix) for prefix in CI_SKIP_PATH_PREFIXES) | ||
|
|
||
|
|
||
| def check_only_ci_skip_paths(paths: Optional[Iterable[str]]) -> bool: | ||
| """Return True if every modified path is a CI-skip path (i.e. no build impact).""" | ||
| path_list = list(paths or []) | ||
| return bool(path_list) and all(is_ci_skip_path(p) for p in path_list) |
|
Closing — the CI skip logic is better handled separately. The bot PR (#8782) is the priority. |
Summary
therock_configure_ci.pyfell back to running all build subtrees when modified files didn't match any known subtree. For PRs that only touchtools/(bot scripts, utilities liketools/systems_pr_bot/) this triggered a full Linux+Windows build matrix with no benefit.Add
CI_SKIP_PATH_PREFIXES(initially['tools/']) andcheck_only_ci_skip_paths()so that PRs whose every changed file is under a skip prefix produce an empty subtree list and skip build CI entirely.JIRA ID : N/A
Test plan
tools/**will skip the full build matrixprojects/clr/) are unaffected — the skip only applies when all changed files are in skip paths🤖 Generated with Claude Code