Commit Graph
64 Commits
Author SHA1 Message Date
Adrià FranchandClaude e5b31e0728 ci(windows): cache only the submodule git dirs
The cached tar held the 3rdparty work trees too, and its extraction fails on
the dangling symlink 3rdparty/zstd/tests/cli-tests/bin/unzstd, which Git Bash
tar can't create. Cache .git/modules alone and let git submodule update check
the work trees out from it, as a clean checkout does.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 21:31:16 +02:00
Adrià f474fb7768 Merge pull request #6900 from adriadam10/ci/select-tests
ci: build and run only the tests a change reaches on request
2026-10-16 21:06:09 +02:00
Adrià FranchandClaude 262de6ab19 ci: cache the submodules, FFmpeg and configure checks of the Windows job
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 19:23:16 +02:00
Adrià FranchandClaude bca62ea696 ci: let a push to main cancel the build of the previous one
Push builds of main ran one after another, so a merge waited for the
builds of every earlier merge before main got a result for its tree; a
fix of a red main sat behind a build of the tree it fixes. The newest
push now cancels the build in progress, like pull request and dispatched
builds already do. The merge queue's baselines already skip cancelled
main builds and use the nearest completed ones.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 19:14:07 +02:00
Adrià FranchandClaude 13f6191b75 ci: build and run only the tests a change reaches on request
A new select input of the Build workflow limits the Linux and Windows jobs
to the test executables and tests whose build inputs the merged pull
requests change. Push builds of main always build and run everything and
save the test graph of their tree; dispatched runs with select restore the
latest graph and fall back to a full run without one.

tools/select_tests.py dump walks the ninja graph of every test executable
(order-only dependencies included, so prx libraries loaded at run time are
in it) plus the header dependencies of its objects, the CMake files that
register each test, the source files its command line names, and its
fixtures. select picks the tests whose closure, registration or arguments
contain a changed file, and every test that is not a native executable of
the tree; files no build reads select the tests under their directory;
changes to the root build, cmake/, 3rdparty/, the workflow or the tool run
everything. Tests added since the graph was written always run. ctest gets
the selection as -I indices through the tool, which keeps the cmd shell on
Windows and stays under its command line limit.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 19:10:16 +02:00
Adrià FranchandClaude 88687e19eb ci(linux): size build and tests to the host, cap cold compiles by memory
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 17:52:29 +02:00
Adrià FranchandClaude b066940d4f ci(linux): link with wild
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 16:44:10 +02:00
Adrià FranchandClaude 20c11e7334 Revert "ci(linux): link with wild" (#6861)
The runner cannot create directories under /var/cache/anyps5 (mkdir: Permission denied), so the install step failed
and the linux job built nothing.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 16:40:52 +02:00
Adrià FranchandClaude 94775df2b2 ci(linux): link with wild
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 16:35:37 +02:00
Adrià FranchandClaude f7e767add9 ci(linux): size build and test parallelism to what the shared host has free
The self-hosted runners share one 32-thread host and were fixed at one job each, so
a build with many ccache misses compiled them one after another (686 misses took 37 min).
Pick jobs from the free CPUs and available memory (1 to 8, ctest at most 4) and pass a
load limit to ninja so a busy host backs off.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-16 12:14:07 +02:00
Adrià FranchandClaude e0b9572e3b ci(windows): find the CA bundle of Git for Windows under ucrt64 too
Git for Windows 2.56 (runner image 20261002) moved from mingw64 to ucrt64,
so the fixed SSL_CERT_FILE path no longer exists and the WinLibs CMake
fails the FFmpeg download with status 60 on every Windows build. Take the
bundle from whichever of ucrt64 and mingw64 exists.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 15:20:44 +02:00
Adrià FranchandClaude b139ac9b9f ci(build): build up to 40 pull requests together
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-15 14:59:51 +02:00
NikoandClaude Opus 5.5 b9c91c89ba ci(build): accept merged pull requests in the relinker author check
The eligibility job enabled the relinker matrix for a pull request only
when repos.listCommits on main with the author's login returned a
commit. That filter misses authors whose commits in main are not
matched to their login. On 2026-10-13 it found no commit for 26 authors
of open pull requests who have 1 to 44 pull requests merged into main,
so their pull requests skip the relinker, against CONTRIBUTING.md ("if
its author already has a commit in main").

When listCommits finds nothing, the job now also searches for the
author's merged pull requests into main, with the query pr-intake.yml
uses. Incomplete search results count as none. A failed search, such as
the search API's own rate limit, skips the relinker with a warning
instead of failing the job. Both requests now run only when the pull
request changes a relinker file, so other pull requests make neither.

test_build_eligibility.py runs the step's script in node with a mocked
github object and skips when node is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:18:25 +02:00
Dean Galvin a0d71c8917 ci(build): let a pull request's ref be replaced after it is force-pushed 2026-10-15 14:37:21 +13:00
Adrià FranchandClaude abfdd4b834 ci(build): add a dispatch input that runs only the relinker matrix
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:57:22 +02:00
LeandroLP23andClaude Opus 5.5 c692334e00 ci(build): keep the Linux relinker tests when a manual build skips Linux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 20:07:18 +02:00
LeandroLP23andClaude Opus 5.5 8087908232 ci(build): skip test jobs a push to main does not touch, and duplicate 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>
2026-10-14 20:07:06 +02:00
boykopovar f74b8e2d87 ci(linux): limit build and test parallelism to one 2026-10-14 16:18:17 +03:00
boykopovar 069537d1c5 ci(linux): move builds to self-hosted runner with persistent caches 2026-10-14 15:31:22 +03:00
Adrià FranchandClaude e53b574782 ci(build): skip the pull request build of a pull request already closed
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 13:50:34 +02:00
Adrià FranchandClaude 15503d11fe ci(build): build several pull requests together
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 13:41:55 +02:00
Adrià FranchandClaude fe4831f350 ci(build): check out nested submodules
3rdparty/mbedtls (#3897) has its own framework submodule. The PR build
fetched it in its merge step, but push builds on main skipped that step
and failed at configure.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 13:13:22 +02:00
alfalfa-starandClaude Opus 5.5 040873f9dc feat(videoout): use native Wayland on Linux
Build SDL's Wayland backend next to X11 and ask SDL for "wayland,x11"
on Linux, so the window runs natively under a Wayland compositor instead
of through XWayland. SDL loads libwayland, xkbcommon and libdecor at run
time, so systems without them, or sessions without WAYLAND_DISPLAY, keep
using X11. SDL_VIDEODRIVER still overrides the choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 07:24:34 +02:00
Dean Galvin 8702de1e6f ci(build): key the Mesa shader cache by the runner's CPU model too
Since #5263 the Linux job restores a lavapipe shader cache keyed by the
runner's /proc/cpuinfo flags. llvmpipe compiles shaders with LLVM's host
CPU *name* (from vendor, family and model) plus the detected feature bits,
and keys its cache only by the feature bits, so two runners with the same
flags but different models share cached code. A hull shader JIT-compiled
on a znver4/znver5 or Ice Lake class host uses GFNI (vgf2p8affineqb);
loaded on a Zen 3 host with the same flags it raises SIGILL, which is what
agc_driver_tessellation has been hitting on main and on dispatched builds
since the first main build after #5234 saved that hull variant.

Hash vendor_id, cpu family, model and flags into the key, so a runner only
restores code compiled for its own CPU model, and print the model name so a
future mismatch can be read off the log.
2026-10-14 17:11:46 +13:00
Adrià FranchandClaude 32accfa938 ci(build): key the Mesa shader cache by the runner's CPU flags
The cache from #5107 was keyed by Mesa version only, so a runner restored
llvmpipe code compiled on another runner's CPU and about 85 agc tests died
with SIGILL (Illegal instruction) on main.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 17:57:49 +02:00
Adrià FranchandClaude 71f98dd746 ci(build): let a dispatched build skip the Linux job
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 17:03:50 +02:00
Adrià FranchandClaude 5181b30d79 ci(windows): build the f16 unpack execution test, it runs without a device
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 14:18:28 +02:00
Adrià FranchandClaude aef5972ff5 ci(linux): keep lavapipe's shader cache between builds
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 13:51:10 +02:00
Adrià FranchandClaude 1137c57572 ci(windows): build only the execution tests that run without a Vulkan device
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 13:44:08 +02:00
Adrià FranchandClaude 3c273e7081 ci(build): run relinker and context matrices on dispatch only when touched
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 13:39:04 +02:00
PrintOrb 9c007805d6 Merge branch 'main' into fix/videoout-high-frame-rate 2026-10-12 11:15:48 -05:00
Adrià FranchandClaude d9d00f0e34 ci(build): run pull request jobs only when their files change
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 11:35:11 +02:00
PrintOrb 5c19601a12 fix(videoout): require bundled SDL XRandR support on Linux 2026-10-11 17:36:12 -05:00
marshmll 3d83999350 fix(build): require an SDL audio backend on Linux
The bundled SDL builds its PipeWire, PulseAudio and ALSA drivers only
when their development files are found, and otherwise keeps just the
silent dummy and disk drivers without an error. The Linux CI and
release jobs install none of them, so the v0.1.1 Linux libraries
(libSceAudioOut, libSceAgcDriver, libfmod) contain no audible driver.

Fail configuration on Linux when SDL found none of the three, install
the Debian development packages in the Linux build and release jobs,
and list the packages in the build instructions.
2026-10-11 10:34:29 -03:00
Adrià e0526f57cd Merge pull request #1686 from Cloud-Multiplayer/feat/macos-write-watch
feat(libc): write watch on macOS hosts
2026-10-10 08:03:40 +02:00
Dean Galvin 079f3b759d ci(build): save the compiler cache from main builds
No job saved its ccache, so every build restored a day-old cache and
recompiled about half the tree (971/2038 hits). Main push builds now
save it, and they no longer cancel each other, so one finishes and
refreshes it. Pull request builds still only restore, so PR code never
writes the shared cache.
2026-10-10 16:50:01 +13:00
Elijah De GuzmanandClaude Opus 5.5 80b0bab279 feat(libc): write watch on macOS hosts
macOS has no counterpart to userfaultfd write-protect or
MEM_WRITE_WATCH, so GuestWriteWatch had no backend there and the driver
re-read every guest buffer on each use.

The macOS backend write-protects watched pages. The first write to a
page faults, the SIGBUS/SIGSEGV handler records the page and restores
its protection, and Collect reports the recorded pages and protects
them again. A page is protected before its record is cleared, under the
lock the handler takes, so a write that lands in between is recorded.
The lock hands out turns in order: an unfair one starved writers under
Rosetta.

The protection is real, which adds three entry points:
- GuestWriteWatchBeginHostWrite/EndHostWrite lift it around a system
  call that writes guest memory, which would otherwise fail with
  EFAULT. GuestArena::HostWrite calls them, as it calls the Windows
  equivalent.
- GuestWriteWatchProtectionChanged tells the watch the protection given
  to watched pages by mprotect or a new mapping.
- GuestWriteWatchProtection reports that protection, since a watched
  page is read-only between a collection and the next write.

Register keeps the recorded protection of a page it already watches:
read from the kernel it would be the watch's own read-only protection,
and the page would never be watched again.

The tests build without the prx libraries and run natively and through
Rosetta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:11:40 -04:00
Adrià 0eb7f098dd Merge pull request #1499 from yabanana/codex/macos-unwind-register-context
feat(libc): support x86-64 unwind register contexts on macOS
2026-10-10 03:04:54 +02:00
Dean 96ce3acdd0 Merge pull request #1028 from Dextroid17/ci/guard-against-new-skips
ci: fail when a test skips that the job's device is not expected to skip
2026-10-10 11:33:15 +13:00
Dean Galvin 4a53177bc5 ci(build): build pull requests merged into current main
GitHub refreshes merge_commit_sha only when the pull request's branch
changes, so a manual build could test the pull request against a main
from days earlier. Each job now checks out main as it is when the build
starts and merges the pull request head into it.
2026-10-10 07:36:18 +13:00
Dextroid17 1924e18f6f ci: fail when a test skips that the job's device is not expected to skip
The Linux job reports "100% tests passed out of 371" with 20 agc_driver execution tests skipped
(llvmpipe reports subgroup size 8, so the tests that need a wider wave exit 77), and the Windows
job reports "100% tests passed, 0 tests failed out of 368" with 143 skipped - the runner has no
Vulkan driver and ANYPS5_REQUIRE_VULKAN is not set there, so 143 of the 147 GPU execution tests
silently do not run. ctest counts a skip as a pass, so neither job notices when the set grows.

Add tools/check_skips.py. It reads the file ctest writes with --output-junit and fails when a test
skips for a reason that is not expected:

- linux: a skip is expected only when the test's own output reports that the device's subgroups
  are too narrow for it, so adding a wave32 test does not need the rule edited;
- windows: any agc_driver test, since the runner has no driver for them, while a skip of anything
  else fails.

Both jobs now pass --output-junit and run the check after ctest. The JUnit file needs no
redirection, so the console output stays visible and no pipe can hide a failing ctest.

Verified here with the CI command and the CI device (lavapipe, subgroup 8): the real run reports
20 skipped, all expected; a 21st wave32 test skipping for the same reason passes; a skip whose
reason is something else exits 1; a file with 143 agc_driver skips passes with --job windows and
one non-agc skip in it exits 1.
2026-10-09 07:00:35 -04:00
Daniele Giovane fbce671015 test(libc): verify register contexts on Linux and macOS 2026-10-09 12:22:14 +02:00
Dean Galvin 5994806a8b ci(build): build pull requests merged into current main 2026-10-09 23:00:01 +13:00
boykopovar 10d52b69f3 fix(ci): restore all builds and tests on main pushes 2026-10-09 12:20:50 +03:00
boykopovar 0ab2a04dd7 ci(build): require manual full builds and auto-test relinker for contributors 2026-10-09 11:58:02 +03:00
Adrià FranchandClaude 8adb7db88e ci: repeat the tests three times on main only
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 22:31:54 +02:00
Adrià FranchandClaude fe7e0e6098 ci: save the compiler cache before the tests
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 21:35:13 +02:00
Adrià FranchandClaude bc02b80c18 ci: warn about tests that take more than 30 s
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 20:19:08 +02:00
Adrià FranchandClaude f8402dcdff ci: drop the relinker job's custom name so a skipped job shows a plain name
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 19:21:03 +02:00
Adrià 7995d6578d Merge pull request #1704 from adriadam10/ci/path-filters
ci: skip jobs unrelated to the changed paths
2026-10-08 19:06:48 +02:00