Since #462, tools/rdna2spirv.py imports rdna2_decode, which imports rdna2_isa_tables. Neither module was in the
three lists that track what the translator reads: LEONIDA_TRANSLATOR_DEPS (runtime/cmake/translator_deps.cmake),
TRANSLATION_SOURCES (make_game.py) and the runtime workflow's path filters. So test_cmake_translator_deps,
test_shader_stage_resume and test_runtime_paths fail on main, and an edit to the decoder neither rebuilds the GPU
test shaders, nor reruns translation, nor starts the runtime workflow.
Every pull request is reviewed by hand, and with over a hundred open the
reviewer has no quick way to skip the ones that cannot merge as they
stand. tools/pr_conflict_label.py asks the GitHub API for each open pull
request's `mergeable` and labels the conflicting ones `needs rebase`,
removing the label once they merge cleanly again; an answer GitHub has
not computed yet is asked again a few times and otherwise left for the
next run. .github/workflows/conflict-label.yml runs it on a push to main
(all open pull requests), on a pull request being opened, reopened or
pushed to (that one), and hourly.
The job uses pull_request_target so a fork's pull request can be
labeled, and is safe with it: it checks out main, never the pull
request, and the tool reads only the API, so no pull request code runs.
Its token can read contents and write pull requests, nothing else;
tests/test_pr_conflict_label.py checks that, and the tool against a fake
API.
The pull request template also asks for `Fixes: #N` and `GPUs tested:`
lines and has checklist items for "based on current main" and "one
topic"; tests/test_docs_pr_template.py checks the new prompts, and
CONTRIBUTING.md gets a short Pull requests section. The process is
modelled on AnyPS5's (boykopovar/AnyPS5); the code is written here, not
copied.
Twelve test files failed on main at 2d53a8055 (CI's check and semantic-tests steps, run locally): most are a test
and the code it checks changed by different pull requests in the same merge round. Each fix below is either taken
from a closed pull request that already had it, or restores what an earlier merged change intended.
From closed pull requests:
- test_make_game_resume: FakeProc gets poll(), which translate() now calls (#7018)
- test_make_game_empty_translation: the Exited stub gets poll() and the failed-shard path is checked (#7214)
- test_shader_checks: stub table_fetch_test in the Wave64Checks harness and count it (#7433)
- test_runtime_paths: runtime.yml's path filter lists tools/replace_retry.py, which rdna2spirv.py imports (#7029)
- test_psin_names: patch the same_report_path helpers that report_paths now calls (#8719)
- test_report_source_collision: the fixture is a real Bink 2 header; bink_index refuses other files (#7408)
- test_missing_input_exit_codes: tile_probe checks its inputs before it asks for numpy (#4771)
Restored:
- merge_check: a failed `git show` is an error again (5b88d58); 21016cf brought back the lenient read that
treated it as a new file, while new files are already left out when the diff is read
- rpf_probe: a symlinked --out updates its target again (44d3595); 55d21cc's staged write replaced the link
Updated to the code:
- test_shader_stage_resume: TRANSLATION_SOURCES lists fssm_unpack.py and shader_stage_manifest.py, which the
translator imports; existing work folders translate once more after this
- test_tool_stdout_encoding: the 15 programs merged without the stdout guard get the same block as the others
- test_rdna2spirv_decode: drop the test of decode_any_format, which SHADER-849 replaced with the table decode
that tests/semantic/test_format_decode_table.py checks
Co-authored-by: jewmaster1337 <102986566+jewmaster1337@users.noreply.github.com>
Co-authored-by: TanmaySatyam <248538550+TanmaySatyam@users.noreply.github.com>
Co-authored-by: evilclanker9000 <45567075+evilclanker9000@users.noreply.github.com>
Co-authored-by: slint6614-dev <359954236+slint6614-dev@users.noreply.github.com>
Co-authored-by: BlackNife <108077267+Poussistar@users.noreply.github.com>
Co-authored-by: fiestorra <65175643+fiestorra@users.noreply.github.com>
Co-authored-by: fearkov <289226582+fearkov@users.noreply.github.com>
Co-authored-by: DoubleD17 <48109637+DoubleD17@users.noreply.github.com>
The generated page was already out of step with this round's rows (test_design_contracts), and the PR also
changes AGENTS.md, the PR template, ci.yml and adds an agent skill. docs/design.md keeps its current rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The account's 20 concurrent GitHub-hosted jobs have been saturated since
11-22 10:00 UTC and the queue wait grows by about an hour per hour. Three
jobs take about 40% of pull request runner time and never failed alone in
sampled pull request runs: wine (ubuntu) and wine (winehq-stable), 0 of
188, and semantic-tests (windows-latest), 0 of 914.
Pull requests now skip them; pushes to main and workflow_dispatch still
run them. Pull requests keep the native Windows build, its CTest run and
the runtime-windows artifact testers download.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges that each passed alone but clash together:
- v_cmp_class_f64: the earlier cmp_class_f64 (685d16ed9) (operand-form checks, test_cmp_class_f64) and the later f64 branch
in cmp_class both handled the opcode; f64 goes to cmp_class_f64 again, f16 stays in cmp_class.
- rdna2spirv CLI tests: spirv-as/spirv-val now run in the output folder with the staging file's bare name, so
the test doubles resolve it against cwd; assemble_spirv decodes the output only when it is bytes. (The doubles
had been writing .spirv-*.tmp files into the repository root.)
- ps_w64 fixtures (TEST-722): an 18th fixture (ps_w64_a_discard) landed; its killed lanes export nothing and
keep the clear value.
- first_light: a run without an OBJ removes mesh.bin, and harness_env reads manifest["files"]; batch_glb's stats
name failures and dropped textures; run_gpu_tests reports a frame never written as a missing readback
(TEST-837).
- make_game TRANSLATION_SOURCES and runtime.yml's paths include spirv_opt.py and report_paths.py (and
wave64_emulate_opt.py), which the translator imports.
Repo rules: stdout guard on six tools; encoding on two opens (gen_gdk_runtime_classes' helper is read_utf8);
newline on one write; anim_skeleton_match's joaat encodes like hashdict.joaat; test_feature_scan's new test is
listed with the others its globals() runner reaches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- In .github/workflows/runtime.yml, add a sanity check step ensuring /usr/lib/llvm-19/bin/llvm-mc has amdgcn target support after package installation.
- In docs/testing.md, retain the note that older llvm-mc (18+) supports valu_fuzz.py --family mem and lds_fuzz.py, while stock CI fixtures need 19+ and full f16 fuzzing requires 21+.
The check job runs the standard-library loop only on windows-latest, which has neither
SPIRV-Tools nor numpy, and translator-tests (the one job that installs them) picks only the
pytest files. So the spirv-val checks of test_split_big_switch (the 37 220-case switch),
test_image_load_typed, test_mesh_compute_vs and test_bary_fallback_gs, the numpy path of
test_skinned_glb and the POSIX-only tests skipped in CI and ran nowhere; desc_cache,
f64_transcendentals, spirv_asm and spirv_stubs validate only when spirv-val is present.
Add stdlib-tests-linux at the end of ci.yml: ubuntu-24.04, spirv-tools from apt as the
semantic-tests job installs it, tests/requirements.txt for numpy and Pillow, then the same
loop as check. test_ci_registration.py now fails when a stdlib file that calls spirv-as or
spirv-val has no job that installs spirv-tools and runs that loop; it fails with the job removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wine job wrote https://dl.winehq.org/wine-builds/winehq.key straight
into /etc/apt/keyrings and the translator-tests job piped
https://apt.llvm.org/llvm-snapshot.gpg.key into gpg --dearmor, so apt
trusted whatever key those URLs served that day. Every other download in
CI is pinned (actions by commit, glslang by SHA-256, the Vulkan headers
by commit).
scripts/check_apt_key.py (standard library, gpg --show-keys) requires
the downloaded file to hold exactly one primary key with the given
fingerprint; both steps now download to a temporary file, check it
against the fingerprint each project publishes (WineHQ D43F6401...672F,
apt.llvm.org 6084F3CF...7421) and only then install it.
tests/test_check_apt_key.py: the parser and the check with a stand-in
gpg (the key, another key, two primary keys, subkeys, an unreadable
file, no gpg), the command line, and a scan of .github/workflows that
fails for a key download not checked right after (both of today's
downloads fail it on the old workflows).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The linux-gpu-tools job on ubuntu-24.04 uses the system's libvulkan-dev,
whose headers are too old for VK_KHR_pipeline_binary (vk_harness.cpp uses
VkPhysicalDevicePipelineBinaryFeaturesKHR unconditionally). Add the same
Vulkan headers cache + sparse checkout that the windows job uses and pass
VULKAN_SDK during configure, so the pinned vulkan-sdk-1.4.363.0 release
shadows the system headers.
This job was added in #144; the vulkan-headers cache step was left out.
`git ls-files` prints a name with a byte outside printable ASCII in double quotes with octal escapes
("\303\274n\303\257.spvasm"), so the step's `\.spvasm$` anchor never matched it. Text formats such as
.spvasm and .obj have no magic, so scripts/check_no_game_data.py did not catch them either: a shader
disassembly with an accented letter in its name passed both checks. The step now reads NUL-separated
names (`-z`, which never quotes) and turns them back into lines for the report.
tests/test_no_game_data_workflow.py runs the step's own `run:` script, taken from the workflow, with
bash in a throwaway repository: an accented .spvasm and .obj fail it, a plain one too, a clean tree
passes. With the old line the accented case exits 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In .github/workflows/runtime.yml, the `linux-gpu-tools` job pinned `llvm-18`'s
`llvm-mc`, which rejects the new `ps_sdwa_f16_const` fixture
(`v_cvt_f16_u16_sdwa v5, 1.0` inline float constant on an integer-source SDWA op)
introduced in d78546fc, causing scripts/run_gpu_tests.py to abort before
reporting GPU test results.
Upgrade the pinned assembler path from `llvm-18` to `llvm-19` across package
installation and the native & wave64 emulation test steps. Also update
documentation in docs/testing.md to reflect that llvm-18 rejects
ps_sdwa_f16_const and that llvm-19+ is required.
Claim: https://github.com/ItsNotRexed/Leonida/issues/3047#issuecomment-7084706031
Fixes: BUILD-923
runtime.yml gets a macos job on macos-26: Homebrew's MoltenVK, Vulkan headers and
loader, llvm-mc, SPIRV-Tools and glslang; the runtime built through sccache; ctest
and run_gpu_tests.py on MoltenVK. ci.yml gets macos-python: the standard-library
loop, the semantic suite alongside it, and the pytest files with Homebrew's llvm-mc.
The hosted runner's Metal device is Apple Paravirtual device (family Mac2), which
MoltenVK runs on; KosmicKrisp finds no device there. macos-15 can't build the
runtime (Xcode 16's libc++ has no floating-point std::from_chars).
The two tests that fail on MoltenVK today, also on an M3 Max, are listed with the
pull requests that fix them (xdxr_build_check: #2423, ps_ssharp: #1845);
scripts/ci_expected_failures.py fails the step on any other failure and notes an
expected one that passes.
ilammy/msvc-dev-cmd@v1.13.0 still runs on Node 20 and has had no releases
since January 2024, triggering the Node.js 20 deprecation warning on every
Windows Runtime run.
Set up the x64 MSVC developer environment directly in PowerShell via
vswhere.exe and VC\Auxiliary\Build\vcvars64.bat (matching
scripts/build_runtime.ps1), verify cl.exe and the x64 environment, and
export changed environment variables to GITHUB_ENV.
The docs-only step of change-scope ran tests/test_docs_links.py and
tests/test_i18n_index.py by name. tests/test_docs_design_rows.py,
test_docs_list_items.py and test_docs_repo_paths.py read only Markdown and
the tracked file list as well, but ran only in `check`, which is skipped when
only documents changed: a docs-only pull request that duplicates a design.md
contract row or names a path that does not exist was green and failed on
main after the merge.
The step now runs tests/test_docs_*.py and the i18n test in a loop, and
tests/test_ci_registration.py fails when a document test is not run there
or the step names a file that does not exist.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The check job ran each tests/test_*.py with `python -I "$t" || exit 1`, so
the first failing file stopped the loop and every file sorted after it went
unrun. While main was red on test_cf_ref.py, nothing after test_cf* ran on
Windows. The loop now collects the failures, prints one ::error annotation
per failed file and exits 1 at the end.
tests/test_ci_registration.py takes that step's script out of ci.yml and
runs it under bash (Git for Windows' on Windows) on a synthetic tree with two
failing files, a passing one, a pytest file and a semantic file: all three
loop files must run and both failures must be named. It skips without bash,
except on a GitHub runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/test_runtime_paths.py recomputes the tools/ files the Runtime jobs read (named by runtime/, the
workflow's steps and the scripts it runs, then sibling imports, modules and files named in strings, and
tools/ subdirectories, to a fixed point) and fails when one is not listed, when the push and pull_request
lists differ, or when a listed tool no longer exists. Without it, a new import in the translator would
leave the new module outside the list, and a later change to that module alone would skip the GPU tests.
.gitattributes joins the list: it decides the line endings of every file the build checks out.
docs/testing.md no longer says the llvmpipe suite runs on every pull request, and says that a commit on
main has a runtime-windows artifact only if it touched what the workflow builds or reads.
@Desamodeth's dependency check found three single-file changes that must keep triggering this workflow and that a
.py-only scan misses: `tools/gfx10_formats.json` (a table `rdna2spirv.py` loads, so `--help` fails without it),
`tools/lane_masks.py` (same) and `tools/mc_command.py` (imported by `scripts/run_gpu_tests.py`). My first list had
only the tools the workflow's files name *by path*, which is neither the full import closure nor the data files.
Recomputed with ast over the tools in that set, following sibling imports and the file names those tools load from
their own directory: 27 files plus the `hw_oracle` directory, instead of 11 files. Over-including costs a run on a
rare change; under-including silently loses the build for a tool the workflow reads, which is the failure this item
exists to prevent.
Checked: both path lists are 32 entries and identical, the jobs are unchanged, and the recomputation reports nothing
needed that is absent.
`paths-ignore` cannot express "everything under `tools/` except the files the runtime reads", so the event now
lists what triggers this workflow instead: `runtime/**`, `third_party/**`, `scripts/**`, the workflow itself, and
the eleven `tools/*.py` that CMake, ctest and the job scripts call - `gen_d3d12_stubs.py` at configure time,
`xdxr_bvh.py` and `rdna2spirv.py` from CMake and ctest, `bary_fallback_gs.py`, `mesh_compute_vs.py` and
`vk_subgroup_info.py` from `scripts/run_gpu_tests.py`, and `shader_meta.py`, `spirv_stubs.py`, `cf_diff.py`,
`f32_fuzz.py` and `fssm_unpack.py` through those and their imports.
A tool-only pull request no longer starts a full Windows and Wine build it cannot break. The runner queue is
about 2,000 runs deep against 8 in progress, and each such run takes a slot that a change needing it could use.
`tools/first_light.py` and `tools/fspx_unpack.py` appear only in comments and in a test that skips without
`LEONIDA_FIRST_LIGHT_DIR`, so they stay out.
Checked: the file parses, both lists have 15 entries and are identical, and the jobs are unchanged. A comment in
the workflow says a new tool the runtime reads has to be added there. This pull request touches `runtime.yml`
itself, which is in the list, so it is also a live check that the workflow still triggers.
BUILD-856.
llvmpipe has no VK_KHR_fragment_shader_barycentric, so the native llvmpipe run skips ps_bary,
ps_uniform_branch and ps_scc_mask32, and nothing in CI drew a pixel shader through the --bary-fallback
geometry shader (tools/bary_fallback_gs.py). A third llvmpipe run sets LEONIDA_BARY_FALLBACK=1 and fails
unless every shader that got a fallback geometry shader passes, not just runs: a run where the fallback
builds no geometry shader, or one of them skips, is an error.
docs/testing.md: list the third run, and correct the f16 tests' line: with the f16 interpolation
fallback (on by itself without the extension) ps_interp_f16_high and ms_f16_pack run under the bary
fallback too, and natively on llvmpipe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>