ci(build): run pull request jobs only when their files change #4405
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4405"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T09:35:45Z.
What
Fixes a regression: since the path filter of #1704 was replaced by the
eligibilityjob,register-context(#1499) andwrite-watch(#1686) went in withoutneeds: eligibility, so their 6 runners (Ubuntu and macOS) run on every event of every pull request, documentation included, and the relinker matrix runs on every pull request whose author has a commit inmain. Runs were queueing behind them (59 queued when this was written).eligibilitylists the pull request files (pulls.listFiles, paginated, renames counted by both names) and sets one output per job:relinker: the author rule stays, and the pull request must also change a file the relinker-only build uses:core/relinker/,core/libs/prx/libc/(VabiMacros.hpp, Windows specifics),core/libs/prx/libkernel/AppMetadata/andcore/libs/tests/ParamJsonParser.cpp, the two shader cache files the top-levelCMakeLists.txtbuilds beforeANYPS5_RELINKER_ONLYreturns,tools/(its ctest runs thetools/testssuites),cmake/,CMakeLists.txtorbuild.yml.register-context: its directory,RegisterContext.cpp,core/libs/prx/libc/(it includeslibc/src/specifics/x86_64/RegisterContext.cpp) orbuild.yml.write-watch: its directory,WriteWatch.cpp,core/libs/prx/libc/(GuestWriteWatch.cpp) orbuild.yml.main, manual runs and pull requests of 3000 files or more (thelistFileslimit) run everything, as before.ci-gateso this cannot happen again: a job in a workflow triggered bypull_requestfails the check unless the trigger haspaths/paths-ignore, or the job hasneeds: eligibilityand anifonneeds.eligibility.outputs.*. Multi-lineneeds/ifare read. On today'smainit reports exactlyregister-contextandwrite-watch.The rule only applies once merged (Conventions runs the base branch checker).
Tested
tools/tests/test_check_conventions_ci_gate.py(registered in ctest asconventions_ci_gate): ungated job,needswithoutif,ifon another condition, gated job, gate over several lines,pathsfilter,pathsof another trigger, inlineon: [push, pull_request], other triggers, and every workflow in the repository passing. Mutation check: replacing theregister-contextcondition withsedmakes the repository case fail, restoring it passes.eligibilityscript run in node with a mockedgithub: docs-only pull request → nothing runs;libcchange → all three;write_watch/CMakeLists.txt→ only write watch;tools/→ only relinker; author without commits → no relinker;CMakeLists.txt.bak/core/relinkerx/→ nothing (exact names and prefixes); 3000 files and push → everything.test_registrationpass;python3 tools/check_conventions.py --base upstream/mainpasses.@oneandonlydean this is the path filter regression after the 2026-10-09 change, merging it now since runs are queueing; say if a path is missing and I'll add it.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)