Commit Graph

62 Commits

Author SHA1 Message Date
Adrià Franch 14f585a439 ci(pr): limit open pull requests by the author's merged count
Authors with no merged pull requests can have 1 open, with at least 1
merged 20, and from 20 merged there is no limit. Reopening a pull
request runs the check again.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 11:28:43 +02:00
boykopovar f4b6e1011d ci(pr): set min intake pr count to 10 2026-10-10 18:37:56 +03:00
Adrià 00d4e3a540
Merge pull request #976 from Saibamen/ci/release-parity
ci(release): match PR CI Vulkan and Windows SSL setup
2026-10-10 11:29:15 +02: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 3e3290dc03
Merge pull request #2360 from Aerovity/ci/labels-skip-existing
ci(labels): create unforced labels only when they are missing
2026-10-10 11:39:22 +13: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
Adam Stachowicz 95073bc45a ci(release): match PR CI Vulkan and Windows SSL setup
Install lavapipe on Linux release builds and set ANYPS5_REQUIRE_VULKAN and GALLIUM_OVERRIDE_CPU_CAPS for ctest so GPU execution tests run instead of skipping. Scope SSL_CERT_FILE to Windows winlibs download and CMake configure steps only so Linux FFmpeg fetch is not broken. Leave release ctest as a single strict run.
2026-10-10 00:20:59 +02:00
Saibamen 94ee5e5f91 ci(labels): checkout before area labeler on scheduled runs
Check out the repo when labeling open PRs so actions/labeler reads .github/labeler.yml locally instead of fetching it from the API once per pull request.
2026-10-09 22:44:08 +02: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
boykopovar e6e92e7402 refactor(ci): simplify pr intake closure message 2026-10-09 20:16:05 +03:00
boykopovar 9a03dad6fb ci(prs): require 20 merged prs for pr intake 2026-10-09 20:12:52 +03:00
boykopovar af39aac1a2 ci(prs): close prs from new contributors while intake is paused 2026-10-09 19:46:43 +03:00
Aerovity 1a2ca5678d ci(labels): create unforced labels only when they are missing
gh label create exits non-zero for a label that already exists, and the
step runs with bash -e, so the first existing unforced label stopped the
job. Skip labels that already exist, keeping hand-set colors.

Fixes #2320

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:12:45 +02: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
Adrià Franch 34026e88f9 ci: check pull requests against the contributing rules
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 17:03:37 +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
boykopovar d2754f6f56
Merge pull request #189 from adriadam10/ci/label-colors
ci: give labels colors and descriptions
2026-09-30 19:16:28 +03:00
boykopovar 407a1f4a66
ci(labels): set colors only for some 2026-09-30 19:15:51 +03:00
boykopovar 1dfdd708e9
Merge pull request #149 from adriadam10/ci/pr-overlap
ci: comment on pull requests that overlap other open pull requests
2026-09-30 19:12:31 +03:00
Adrià Franch b17c536fbd ci: give labels colors and descriptions
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-30 18:07:17 +02:00
Adrià Franch 1440c525a2 docs: fix pull request template links
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-30 16:53:17 +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
Adrià Franch 8d02448525 ci: comment on pull requests that overlap other open pull requests
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-29 16:24:47 +02:00
Adrià Franch 2c5a8e2037 ci: keep GitHub Actions up to date with Dependabot
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-29 10:12:03 +02:00
boykopovar b01e0bbf52 fix(build): use portable save paths and validate all PRX libraries in CI 2026-09-29 02:24:56 +03:00
boykopovar 141b7d7ff0 fix(ci): use git bash for windows release 2026-09-29 00:38:21 +03:00
boykopovar 64066b6e9a
Merge pull request #103 from boykopovar/feat/provide-release
Feat/provide release
Added a release workflow for v* tags: build Windows and Linux, run tests, and publish only if both platforms are successful. The release contains PRX archives, relinker executables, and documentation from docs/user. The build cache is reused.

- `prx-windows-v0.1.0.zip`
- `prx-windows-v0.1.0.tar.gz`
- `prx-linux-v0.1.0.zip`
- `prx-linux-v0.1.0.tar.gz`
- `relinker-v0.1.0.exe`
- `relinker-v0.1.0`
- `COMPATIBILITY.md`
- `INPUT_MAPPING.md`
2026-09-29 00:25:39 +03:00
boykopovar 1bc7f01511 feat(ci): add version to release file names 2026-09-29 00:22:44 +03:00
boykopovar 1071c9e09c feat(ci): add release workflow + update readme 2026-09-29 00:15:21 +03:00