Skip to content

CI: scope Runtime workflow by path, run Linux ctest, enable D3D12 shim test - #435

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
sombraSoft:ci/runtime-ctest-paths
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
sombraSoft:ci/runtime-ctest-paths

Conversation

@sombraSoft

@sombraSoft sombraSoft commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Part of #418 (step 7). Improves signal and cuts wasted runner time in .github/workflows/runtime.yml:

  • Path filtering: triggers push (main) and pull_request only when runtime/**, tools/gen_d3d12_stubs.py, or .github/workflows/runtime.yml change (workflow_dispatch stays unrestricted). Note: coordinated in CI: reduce walltime, remove duplicate work, and align runner toolchains with documented versions #418 with @NRXM's llvmpipe GPU test PR (CI: run the GPU tests on Mesa llvmpipe #430), which will add tools/** and scripts/run_gpu_tests.py to paths: when rebased.
  • Run Linux CPU tests: linux-gpu-tools previously built the GPU tools and CPU test binaries without executing ctest. Now runs ctest --test-dir runtime/build --output-on-failure and checks all 12 built Linux targets (including vk_bindless_test, descriptor_table_test, gfx10_descriptors_test, clear_color_test).
  • Enable Windows D3D12 shim test: passes -DLEONIDA_D3D12_SHIM_TESTS=ON on windows so d3d12_xs_root_signature_test builds and runs in ctest (CPU-only, no physical GPU needed).
  • Trim apt-get install on Linux: uses --no-install-recommends and only installs cmake, ninja-build, or g++ if not already present on ubuntu-24.04.

Action SHA verification

No new actions added; existing pinned actions unchanged:

Action Tag Pinned Commit SHA
actions/checkout v7.0.1 3d3c42e5aac5ba805825da76410c181273ba90b1
ilammy/msvc-dev-cmd v1.13.0 0b201ec74fa43914dc39ae48a89fd1d8cb592756

AI-assisted contribution.

Tested

  • CPU only, no game files or physical GPU required.
  • Green fork CI on GitHub-hosted Windows/Ubuntu (full runtime.yml stack): https://github.com/sombraSoft/Leonida/actions/runs/44964806953 (linux-gpu-tools 45s, ctest 5/5 passed in 0.02s; windows ctest 20/20 passed in 1.46s).
  • Windows MSVC 19.51 + Ninja configure (-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_D3D12_SHIM_TESTS=ON) + build + ctest --output-on-failure: 78/78 targets built, 15/15 tests passed (including d3d12_xs_root_signature).
  • Verified all Linux ctest targets under runtime/CMakeLists.txt (command_list_test, d3d12_state_map_test, gfx10_descriptors_test, clear_color_test, vk_bindless_test, descriptor_table_test) are CPU-only unit tests with no GPU requirement.
  • jactionlint v2.6.0 (shellcheck 0.11.0): --profile correctness and --profile default .github/workflows/runtime.yml -> exit 0, 0 findings.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (N/A — CI workflow only)

@kotorvr

kotorvr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Reviewed b8835b7: 1 finding

  • .github/workflows/runtime.yml:8-16: the path filter leaves out third_party/xtaskqueue/**. runtime/CMakeLists.txt:40 compiles ../third_party/xtaskqueue/Source/Task/*.cpp into gta6rt_xtaskqueue, and the xgameruntime ctest runs that code. A PR that changes only third_party/xtaskqueue/Source/Task/TaskQueue.cpp matches none of the patterns, so Runtime does not run. CI's check job still builds the runtime but never runs ctest. With CI: deduplicate runtime and pytest runs, add timeouts and rpf9dump diagnostics #434 merged, which drops that build, nothing would compile it at all. Fix: add third_party/xtaskqueue/**.
  • Merge note: this PR conflicts with CI: run the GPU tests on Mesa llvmpipe #430 in runtime.yml (git merge-tree). With this filter in place, CI: run the GPU tests on Mesa llvmpipe #430's llvmpipe GPU tests would also be skipped for translator-only changes (tools/rdna2spirv.py, tools/mc_command.py, scripts/run_gpu_tests.py). Whichever lands second should add those paths.

Ran: merged onto current main (clean). Built with MSVC 2022 + Ninja and -DLEONIDA_D3D12_SHIM_TESTS=ON; ctest --output-on-failure passed 16/16, including d3d12_xs_root_signature. Every name in the new Linux tool list is a target that CMake builds when Vulkan is found. The pinned SHAs match their tags. Not run anywhere: the new Linux ctest step. There is no fork run, and upstream CI is waiting for approval. OS = Windows 11, Python 3.13.
Review was AI-assisted (Claude Code).

@sombraSoft

Copy link
Copy Markdown
Contributor Author

Great catch on third_party/xtaskqueue/**, @kotorvr — checked all paths referenced by runtime/CMakeLists.txt and C++ #includes and that was the only external path missing alongside tools/gen_d3d12_stubs.py.

Added "third_party/xtaskqueue/**" to both push.paths and pull_request.paths in 1c06ea5 (and verified jactionlint --profile default passes with 0 findings).

Thanks @VictorJulianiR and @kotorvr for testing the Windows Ninja/MSVC build and reviewing the workflow!

@sombraSoft
sombraSoft force-pushed the ci/runtime-ctest-paths branch from 1c06ea5 to 3ef8f4f Compare November 22, 2026 00:28
@sombraSoft

Copy link
Copy Markdown
Contributor Author

Rebased onto main (91b36cf) in 3ef8f4f after #430 (llvmpipe GPU tests) merged:

  • Preserved #430's mesa-vulkan-drivers, vulkan-tools, spirv-tools, llvm-18 (now conditional with --no-install-recommends), and both GPU tests on llvmpipe steps untouched.
  • Expanded paths: to cover runtime/**, third_party/xtaskqueue/**, tools/**, scripts/run_gpu_tests.py, and .github/workflows/runtime.yml so translator and GPU-test changes still trigger Runtime.
  • Verified jactionlint --profile correctness passes with 0 findings.

PR is MERGEABLE again on 91b36cf.

@kotorvr

kotorvr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Re-checked 3ef8f4f: looks good. The earlier finding is fixed: third_party/xtaskqueue/** is in both paths: lists, and tools/** covers tools/gen_d3d12_stubs.py and tools/mc_command.py. scripts/run_gpu_tests.py imports its helpers from runtime/test/shaders, which runtime/** covers. No new actions were added, so the existing SHA pins are unchanged. git merge-tree against main (91b36cf) is clean, and #430 is merged.

Ran: checked that every listed path exists. Looked at the PR's CI: Windows built and passed d3d12_xs_root_signature_test, Linux ctest passed 6/6, and all 12 tools in the "Check GPU tools exist" step were built. The red linux-gpu-tools job comes from two llvmpipe failures, cs_w32_lane_wrap and cs_wqm_w32. main's own push run on 91b36cf (44966237303) fails on the same two, so this PR did not cause them. Windows 11.
Review was AI-assisted (Claude Code).

@ItsNotRexed
ItsNotRexed merged commit 2601f20 into ItsNotRexed:main Nov 22, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants