Skip to content

CI: use pinned Vulkan headers in the linux-gpu-tools job - #4983

Open
tupacfan04 wants to merge 1 commit into
ItsNotRexed:mainfrom
tupacfan04:fix/runtime-linux-vulkan-headers
Open

tupacfan04 wants to merge 1 commit into
ItsNotRexed:mainfrom
tupacfan04:fix/runtime-linux-vulkan-headers

Conversation

@tupacfan04

@tupacfan04 tupacfan04 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: BUILD-1501 (claim).

What and why

The Runtime workflow's linux-gpu-tools job installed Ubuntu 24.04's libvulkan-dev, whose Vulkan headers are
1.3.275. They do not declare VkPipelineBinaryDataInfoKHR, VkPipelineBinaryKeyKHR or
VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR, so runtime/test/vk_harness.cpp:755-770 fails to compile on every PR that
runs the job. The Windows job already builds against the pinned vulkan-sdk-1.4.363.0 headers, which is why only
Linux failed.

This applies the same pattern to linux-gpu-tools:

  • Cache and check out KhronosGroup/Vulkan-Headers at 6802bb47 (vulkan-sdk-1.4.363.0), the same commit the
    Windows job and runtime/CMakeLists.txt already pin.
  • Set VULKAN_SDK on the Linux Configure step so find_package(Vulkan) / the header fallback uses those headers.
  • Keep the apt libvulkan-dev package for the loader library; the pinned checkout supplies headers only.

No runtime behaviour changes: the tools still load Vulkan dynamically, and llvmpipe remains the test device.

Tested

  • python -I -m pytest tests/test_cmake_vulkan_missing.py tests/test_runtime_paths.py -q: 8 passed, 3 skipped
    (the skipped cases need a CMake toolchain that is not on this Windows host).
  • actionlint 1.7.12 .github/workflows/runtime.yml: clean.
  • Fetched vulkan_core.h at 6802bb47: it defines VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR and
    VkPipelineBinaryDataInfoKHR, the declarations Ubuntu 24.04's 1.3.275 header lacks.
  • git diff --check: clean.
  • The Windows job already compiles the same sources against these exact headers, so the missing declarations are
    covered. The new Linux job run is the end-to-end check.

Docs/CI only. No game data, no GPU, no runtime changes.

AI-assisted: the change and this description were written by an AI coding agent (OpenCode) and checked by the
commands above.

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. (Not a
    translator change.)

Depends on: nothing.

@tupacfan04

Copy link
Copy Markdown
Contributor Author

Windows-side check of the CI change at 5be6f640.

  • py -I -B -m pytest tests/test_cmake_vulkan_missing.py tests/test_runtime_paths.py -q: 8 passed, 3 skipped (the CMake-toolchain cases).
  • py -I -B -m compileall -q make_game.py tools tests: clean.
  • git diff --check 3faac557 5be6f640: clean.
  • Workflow read: cache key/path match the pinned 6802bb47 checkout, sparse-checkout: include and persist-credentials: false are set, VULKAN_SDK points at .vulkan-headers for the Configure step, and -DLEONIDA_REQUIRE_VULKAN=ON makes a missing header tree fail the configure instead of silently dropping the tools.
  • actionlint is not installed here, so the YAML lint itself was not rerun; the Linux job is the end-to-end check.

No game data or GPU involved. AI-assisted.

@tomgamer22 tomgamer22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent CPU review of commit 5be6f64099aed395f6fe9332fe99dc29335022ec:

  • Diff & scope: Checked git diff origin/main...HEAD and git diff --check origin/main...HEAD (clean). Only .github/workflows/runtime.yml and tests/test_cmake_vulkan_missing.py are modified.
  • Pinned headers verification: Confirmed via KhronosGroup/Vulkan-Headers tag vulkan-sdk-1.4.363.0 that 6802bb4733b63ed5efd3adb308a6c885ef180ea1 is the exact commit SHA. The actions/cache (path: .vulkan-headers/include, keyed on the commit SHA), actions/checkout (sparse-checkout: include, persist-credentials: false), and VULKAN_SDK: ${{ github.workspace }}/.vulkan-headers env var on Configure are consistent.
  • Tests:
    • python -I tests/test_cmake_vulkan_missing.py: Ran 6 tests in 0.004s - OK (skipped=3) (CMakeListsUsesTheModuleTest 3/3 passed; VulkanMissingMessageTest 3 skipped because cmake is not on PATH on this Windows machine).
    • Temporarily reverted .github/workflows/runtime.yml to origin/main and confirmed test_linux_gpu_tools_builds_against_pinned_headers fails (FAILED (failures=1, skipped=3)), then restored it.

AI-assisted (Antigravity).

Generated by Antigravity (Gemini).

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 5be6f6409 on Windows 11: pytest tests/test_cmake_vulkan_missing.py -q -> 6 passed; git diff --check clean.

The linux-gpu-tools job now uses pinned Vulkan headers, and the CMake test covers the "headers missing" configure path so the job cannot silently build without Vulkan; the added case checks the message and the non-built targets. I cannot run the CI job itself here. No blocking issue.

@AirKyzzZ

Copy link
Copy Markdown
Contributor

Tested 5be6f640 (0 behind main 3faac557) on Apple M3 Pro, macOS 27.0.1, Python 3.14, CMake from Homebrew: pass on the diff and the CMake side. The Linux job itself isn't run here.

Ran python3 -I tests/test_cmake_vulkan_missing.py and tests/test_runtime_paths.py (both OK), and actionlint on runtime.yml (clean). Negative control: with main's runtime.yml, test_linux_gpu_tools_builds_against_pinned_headers fails.

The part I wanted to check is whether VULKAN_SDK really wins over the system headers, since libvulkan-dev stays installed. I configured runtime/ with VULKAN_SDK pointing at a sparse checkout of Vulkan-Headers 6802bb47, while the system headers were also installed (Homebrew's /opt/homebrew/include, standing in for apt's /usr/include). Vulkan_INCLUDE_DIR resolves to the checkout and the targets get -isystem <checkout>/include. Without VULKAN_SDK it goes back to the system copy. So the hint is picked first, as the PR expects. The new linux-sanitizers job in #3014 uses the same steps, so the two don't conflict. AI-assisted.

@Atomic258

Copy link
Copy Markdown
Contributor

Tested 5be6f64 on Windows Server 2022, CPython 3.13.12: pass

  • python -I tests/test_cmake_vulkan_missing.py -> Ran 6 tests, OK (skipped=3)
  • Workflow + test change; the CI yaml edit itself not run (no GitHub runner).

git diff --check clean; python -m compileall -q exit 0. No game files, no GPU. AI-assisted (Devin).

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.

5 participants