Repository navigation
ci(build): run test jobs only for the parts of build.yml a change touches - #7227
Merged
Merged
Conversation
…ches A change to build.yml ran the relinker, register-context and write-watch jobs whatever it touched. The patch's lines are now mapped to the job sections of the workflow at the head, and a test job runs only if its own section, the eligibility job or the shared part outside jobs changed; without a patch every job runs as before. Co-Authored-By: Claude <noreply@anthropic.com>
12 tasks done
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.
What
Any change to
build.ymlran the relinker (3 hosts), register-context (4) and write-watch (2) jobs, even when it only touched thewindowsorlinuxjob (#7222 waited 7.5 min for relinker on Windows to change a ccache key).A change to
build.ymlnow runs a test job only if its hunks touch one of these:jobs:(triggers,env, permissions)The job sections come from the workflow at the head, with jobs at two-space indent under
jobs:. Hunk lines are mapped through the patch line numbers. A deleted line counts for the jobs on both sides of it.If the patch is missing (very large diffs), the file was renamed, or the content can't be read, every job runs, as before.
Tested
The mapping was run in node on the real patches of the open PRs that touch
build.yml, against each PR's head:windowslinuxrelinkereligibility relinkerrelinker-asan(a new job)Two synthetic cases:
envedit gives the shared section, so every job runs.relinkergivesrelinker.actionlintpasses. This PR touches the eligibility job, so its own run takes the "every job" path and exercises the content read against the API.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)