Commit Graph

34 Commits

Author SHA1 Message Date
PrintOrb 9c007805d6
Merge branch 'main' into fix/videoout-high-frame-rate 2026-10-12 11:15:48 -05:00
Adrià Franch 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 Guzman 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à Franch 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à Franch 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à Franch 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à Franch 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
Adrià Franch 377535261d ci: skip jobs unrelated to the changed paths
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 19:02:18 +02:00
Adrià Franch e197a5455e ci: run ctest in parallel
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 18:57:28 +02:00
Adrià 63c57d2222
Merge pull request #1432 from ToyuAU/build/standalone-relinker
build(relinker): add a dependency-free conversion build mode
2026-10-08 15:43:51 +02:00
Dextroid17 dd5c052dc5 ci: fail when a test executable is built that no test runs
A test executable can be declared with add_test_executable and never
registered with add_test. It is then built and never run, and ctest
reports a full pass over what it knows, so nothing in CI says so.

Measured on main, five test executables are in this state: the driver's
mesh and recorder tests, the guest formatting tests, the video out flip
tests and the BDA device tests.

tools/check_test_registration.py compares the test executables CMake
builds, read from the build graph, against the add_test calls in the
generated CTestTestfile.cmake files, which are written at configure time
and so do not depend on the build having finished. It fails on a test
executable that nothing runs, and records those five by name so the job
stays green until they are dealt with.

Both jobs run it right after configure, before anything is built.
2026-10-08 11:40:34 +02:00
ToyuAU 2d59fffdb7 build(relinker): add a dependency-free conversion build mode 2026-10-08 18:21:30 +11:00
Adrià Franch ac61a95378 ci: enable SPIRV-Tools on the linux job only 2026-10-08 07:41:12 +02:00
Dextroid17 d386818579 ci: build with SPIRV-Tools so the shader tests validate their output
CI configures without ANYPS5_ENABLE_SPIRV_TOOLS, so the shader recompiler never validates or
optimizes the SPIR-V it emits - Recompiler.cpp guards the ValidateAndOptimizeSpirv call on that
macro - and the shader tests lose the blocks that exercise it:

- ShaderMemory.cpp guards five blocks on the macro, including three expectFailure cases that are
  the only coverage for rejecting invalid SPIR-V and for rejecting an unsupported Vulkan or SPIR-V
  target.
- SpirvOptimizer.cpp includes the SPIRV-Tools headers, so the file is not built at all.
- README.md gives the Spirv-Tools validation as how the recompiler is known to produce valid
  SPIR-V, and no job exercises it.

Add the flag to CONFIGURE. Verified with the CI command and the CI device (lavapipe, subgroup 8,
ANYPS5_REQUIRE_VULKAN=1, GALLIUM_OVERRIDE_CPU_CAPS=avx): the full suite passes 371/371 with the
flag on, with the same 20 skips, and agc_shader_memory passes.

SPIRV-Tools is a submodule built from source, so this adds build time to the job. I have not
measured how much; if it is too much, the flag can go on one job instead of the shared CONFIGURE.
2026-10-08 07:41:05 +02:00
Dean Galvin 1e945e7615 ci: run lavapipe at the AVX level on every Linux runner
agc_driver_vopc_compare failed on every Linux runner with an
AVX512-FP16 Xeon (Sapphire, Emerald and Granite Rapids) and passed on
AMD EPYC and Ice Lake runners. Ubuntu 24.04's lavapipe compiles with
LLVM 20.1.2, which on these CPUs merges a masked fcmp ult/uge on half
vectors with the same compare of swapped operands, so v_cmp_nle_f16,
v_cmp_nlt_f16 and v_cmpx_nle_f16 return the result of their mirror.
The recompiler's SPIR-V is the same on every device and correct.

GALLIUM_OVERRIDE_CPU_CAPS=avx keeps LLVM off AVX-512, so every runner
compiles the tests the same way.
2026-10-04 06:08:37 +13:00
boykopovar 0032decb6a ci(tests): run build tests three times 2026-10-02 22:02:20 +03:00
Adrià Franch 8ed454d2fa ci: run the shader execution tests on lavapipe
MixPrecision and SdwaDestination dispatch hand-assembled RDNA through the
recompiler and compare every lane with a CPU model, but were never in ctest.
Move them to tests/execution/, which is globbed into one test per file with
the same target names, so new execution tests add a file and no CMake lines.
They exit 77 (skipped) when the host has no Vulkan device; the Linux runner
installs lavapipe and sets ANYPS5_REQUIRE_VULKAN=1 so they cannot skip there.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 22:45:25 +02:00
STL1te 5cf8ffa090 ci(windows): the WinLibs CMake gets a CA bundle for the FFmpeg download
WinLibs puts its own cmake.exe (4.3, OpenSSL) first in PATH and ships no
CA certificates, so file(DOWNLOAD) of the FFmpeg package failed with
curl error 60. SSL_CERT_FILE points it at the bundle of Git for Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:34:56 +03:00
boykopovar b01e0bbf52 fix(build): use portable save paths and validate all PRX libraries in CI 2026-09-29 02:24:56 +03:00
Adrià Franch 682fb3d73c ci: time out hung tests 2026-09-28 16:40:34 +02:00
adriadam10 5ad7c5793a ci: build and test on Linux and Windows
Builds with tests enabled and runs ctest on every push to main and every
pull request: GCC on Linux, and on Windows the MinGW-w64 winlibs GCC
15.2.0 toolchain required by the README. ccache and the toolchain are
cached, and only pushes to main save the ccache, so pull requests reuse
it without evicting it.

Windows build steps run in cmd because Git Bash puts its own mingw64 DLLs
first in PATH, which breaks build tools such as nid_patcher that link
libstdc++ dynamically.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 16:40:34 +02:00