Skip to content

ci(build): skip test jobs a push to main does not touch, and duplicate relinker hosts - #5228

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
LeandroLP23:ci/skip-redundant-jobs
Oct 14, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
LeandroLP23:ci/skip-redundant-jobs

Conversation

@LeandroLP23

@LeandroLP23 LeandroLP23 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Closes #5227.

  • Pushes to main: the eligibility gate reads the files of the push (compareCommitsWithBasehead, before...after) and applies the path rules that pull requests already use to relinker, register context and write watch. It falls back to running every job when it can't list the files: the first push of the branch, 300 or more files (the compare API's limit), or an API error, which is logged as a warning. The full Linux and Windows builds still run on every push.
  • Relinker hosts: a new relinker-hosts output feeds the relinker matrix. When the full builds run (push and manual builds), only macOS remains, because the Linux and Windows relinker tests are subsets of the full builds' tests (see CI: a push to main runs every test job, and the Linux/Windows relinker jobs repeat tests the full builds run #5227). A manual build with the linux input off has no full Linux build, so the Linux relinker job stays in it. Automatic pull request builds, which have no full build, keep all three hosts.
  • The path rules moved into one select() helper that both branches use, and are unchanged for pull requests.

Tested

  • node --check on the gate script, and a local harness that runs it against a mocked context/github. It produces these outputs:
Event full relinker hosts register context write watch
push, AGC file only true false macOS false false
push, libc file true true macOS true true
push, this workflow true true macOS true true
push, 300 files / compare error / first push true true macOS true true
manual build, relinker file true true macOS false false
manual build, docs only true false macOS false false
manual build, relinker file, linux: false true true ubuntu+macOS false false
automatic PR, relinker file false true ubuntu+windows+macOS false false
  • On my fork, with this workflow on main:
    • Run 38418854722: a large push (every file differs from the fork's old main) ran every test job, with the relinker matrix reduced to macOS.
    • Run 38419688801: a docs-only push ran only eligibility, linux and windows. Relinker, register context and write watch were skipped.
    • I cancelled both full builds after the job selection, since the build and test steps are unchanged.

Checklist

  • Based on current main; no other open PR implements the same functions (fix(agc): start the shader preparation threads at the first job #5196 edits a different line of this file)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 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.

I found one current-main behavior to preserve before merge. This PR is based on c422b57, while current main has advanced to bf8dc61. Since this branch was created, .github/workflows/build.yml gained a workflow_dispatch boolean input linux (default true), and the Linux job honors it with inputs.linux. This PR removes that guard, so a manual run that explicitly sets linux: false would still run Linux. Please rebase/update on current main and retain the input guard while applying the push-path filtering. The current PR checks pass, but they ran before this newer manual-run behavior was added.

@LeandroLP23
LeandroLP23 force-pushed the ci/skip-redundant-jobs branch from 23be61a to 958231f Compare October 13, 2026 22:26
@LeandroLP23

Copy link
Copy Markdown
Contributor Author

@MarcZX100 Thanks. Rebased onto main bf8dc610e. The branch never changed the Linux job's if; the guard looked dropped only because the branch predated it. The if now reads (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.linux)) && ..., the same as on main.

The new input did interact with this PR in one place, fixed in 958231f09. The relinker matrix drops the Linux host on manual builds because the full Linux build runs the same relinker tests. With linux: false that build is skipped, so the Linux relinker tests would have been lost. The gate now reads inputs.linux through the LINUX_BUILD environment variable, and a manual build with linux: false keeps the Linux relinker host (ubuntu and macOS). Pushes have no inputs and keep macOS only.

Checked the same way as before. I ran the gate script under Node against mocked contexts: the nine earlier cases are unchanged, a manual build with linux: false gives ubuntu and macOS, and a push with an empty LINUX_BUILD gives macOS. The workflow parses as YAML, and tools/check_conventions.py passes. The PR description has the new row.

@MarcZX10 MarcZX10 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.

Thanks for preserving the current workflow_dispatch Linux guard and keeping the Linux relinker host for manual runs with linux: false. I verified the updated host-selection logic and the current checks now pass across Linux, Windows, and macOS relinker jobs, plus the register-context and write-watch jobs. The Linux and Windows full-build jobs are intentionally skipped by this manual run. The original review concern is resolved.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@adriadam10 adriadam10 self-assigned this Oct 14, 2026
LeandroLP23 and others added 2 commits October 14, 2026 20:07
…e relinker hosts

A push to main ran every job: relinker on three hosts, register context
on four and write watch on two, next to the full Linux and Windows
builds. The eligibility gate now reads the files of the push (compare
before...after) and applies the same path rules as pull requests; when
it cannot (a first push, 300 or more files, an API error) every job runs
as before.

Whenever the full builds run (push and manual builds), the Linux and
Windows relinker jobs repeat tests the full builds already run: the
relinker-only ctest lists (150 and 145 tests) are subsets of the full
Linux and Windows ones (1052 and 1069) in run 38397922579. The relinker
matrix now keeps only macOS then; automatic pull request builds, which
have no full build, still run all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the ci/skip-redundant-jobs branch from 958231f to c692334 Compare October 14, 2026 18:09
@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased onto current main: the conflict with the multi-PR build change was in the eligibility script. select() now runs over the aggregated paths/truncated, and the linux input handling is kept. Checked the gate outputs with a mocked context/github for push (AGC file, libc file), manual with linux true/false and an automatic PR build; they match the table in the description. The Linux/Windows relinker tests are a subset of the full builds (ANYPS5_RELINKER_ONLY only adds core/relinker), so dropping those hosts when the full builds run is fine. Merging once the full Build is green.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5585 .github/workflows/build.yml L124-134, L147

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@adriadam10
adriadam10 merged commit 19fc5a8 into boykopovar:main Oct 14, 2026
13 checks passed
@LeandroLP23
LeandroLP23 deleted the ci/skip-redundant-jobs branch October 14, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci .github

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: a push to main runs every test job, and the Linux/Windows relinker jobs repeat tests the full builds run

3 participants