Skip to content

ci: skip TheRock build CI for tooling-only changes (tools/**)#8781

Closed
amd-chrissosa wants to merge 1 commit into
developfrom
users/chrisosa/pr-bot-ci-skip-tools-path
Closed

ci: skip TheRock build CI for tooling-only changes (tools/**)#8781
amd-chrissosa wants to merge 1 commit into
developfrom
users/chrisosa/pr-bot-ci-skip-tools-path

Conversation

@amd-chrissosa

Copy link
Copy Markdown
Contributor

Summary

therock_configure_ci.py fell back to running all build subtrees when modified files didn't match any known subtree. For PRs that only touch tools/ (bot scripts, utilities like tools/systems_pr_bot/) 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 build CI entirely.

JIRA ID : N/A

Test plan

  • PRs touching only tools/** will skip the full build matrix
  • PRs touching real subtrees (e.g. projects/clr/) are unaffected — the skip only applies when all changed files are in skip paths
  • pre-commit passes

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 17, 2026 18:48
@amd-chrissosa
amd-chrissosa requested a review from a team as a code owner July 17, 2026 18:48
@github-actions github-actions Bot added the github actions Pull requests that update GitHub Actions code label Jul 17, 2026
@therock-pr-bot

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ❌ Fail Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: .github/scripts/therock_configure_ci.py; no test file found
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 2 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description
  • ❌ Unit Test

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description
  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +90 to +106
# 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)
@amd-chrissosa

Copy link
Copy Markdown
Contributor Author

Closing — the CI skip logic is better handled separately. The bot PR (#8782) is the priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code Not ready to Review organization: ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants