Skip to content

Find the pipeline checker in CMake configuration directories - #8156

Open
gautch29 wants to merge 1 commit into
ItsNotRexed:mainfrom
gautch29:codex/pipeline-check-multiconfig
Open

gautch29 wants to merge 1 commit into
ItsNotRexed:mainfrom
gautch29:codex/pipeline-check-multiconfig

Conversation

@gautch29

Copy link
Copy Markdown

Coordination claim

Depends on: #7223, #3468 (overlap in checker discovery only). This branch applies independently to main.

What changed

On POSIX, the pipelines preflight could build vk_pipeline_check in an existing CMake multi-config tree and then fail to find the executable. Look in the configuration directories named in CMakeCache.txt after checking the flat build directory. Keep the host executable checks and report the actual search locations if the checker is missing.

Verification

  • macOS with CMake 4.2.1 and Ninja Multi-Config. A synthetic project with a custom Verifier configuration built successfully on main, but preflight failed to find the checker. With the patch, preflight found and ran it.
  • All 16 preflight tests, 13 pipeline tests, and 7 checker path tests passed.

Synthetic project only. AI-assisted (Codex).

@leoleahy leoleahy 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.

AI-assisted.

Independently verified cdb66782 on Windows 11 (Python 3.14.8, CPU-only, no game data):

  • Clean merge check against upstream/main (dde82f27): git merge-tree --write-tree exit 0, git diff --check exit 0, python -I -m compileall -q make_game.py tests/test_make_game_pipeline_preflight.py tests/test_make_game_platform.py exit 0.
  • python -I tests/test_make_game_pipeline_preflight.py: 15 passed, 1 skipped (16 ran, OK) on HEAD cdb66782; negative control on base dde82f27 fails with 2 failures.
  • python -I tests/test_make_game_platform.py: 44 passed, 3 skipped (47 ran, OK; new test_pipeline_checker_in_cmake_configuration_subdirectory is skipped on Windows via @unittest.skipUnless(os.name == "posix", ...)).
  • Direct Windows 11 probe of make_game.cmake_output_dirs(d): yields [d] without CMakeCache.txt, and parses CMAKE_CONFIGURATION_TYPES:STRING=Release;Debug;..;.;bad/sub;RelWithDebInfo; into ['.', 'Release', 'Debug', 'RelWithDebInfo'], filtering traversal/invalid entries cleanly.

@AsgerCode

Copy link
Copy Markdown

Tested cdb6678 on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files, no CMake build): pass

What I ran:

  • python -I tests/test_make_game_platform.py: 47 tests, OK (3 skipped). The new test_pipeline_checker_in_cmake_configuration_subdirectory is one of them: it is POSIX-only, so it runs only in the Linux stdlib job. test_make_game_pipeline_preflight.py: 16 OK (1 skipped). test_make_game_pipelines.py: 13 OK. test_make_game_preflight.py 95 OK, test_make_game_pipeline_batches.py 15 OK, test_make_game_dry_run.py 24 OK.
  • Negative control, with the merge base's make_game.py: the 2 preflight tests fail (the message changed). The new platform test cannot fail here because it is skipped, so I checked the search by hand (below).
  • Merge with current main (a847309): clean. On the merge with 6dda063, which has make_game: --mesh-compute on by itself on Intel's Windows Vulkan driver, whose mesh draws crash (BUILD-2202) #6789 in make_game.py, the same test files pass and the table below gives the same results. The commits after that do not touch these files.
  • pipeline_check_exe() with os.name patched to posix and ROOT set to fake trees. On Windows os.access(X_OK) is true for any file, so this checks the search order only, not the execute bit:
Tree under runtime/build this PR main
single-config, linux/vk_pipeline_check linux/ linux/
Ninja Multi-Config cache (Debug;Release;RelWithDebInfo), file only in linux/Release, linux/Debug or linux/RelWithDebInfo that folder none
same, with an Xcode-style list, linux/Debug linux/Debug none
cache with CRLF line endings, linux/Release linux/Release none
linux/Release, but no CMakeCache.txt none none
file in linux/MinSizeRel, which the list does not name none none
list ../x;/abs;sub/dir;..;., with files at x and linux/sub/dir none none
fresh linux/Release and an older flat runtime/build/vk_pipeline_check linux/Release the flat file
older linux/Release and a fresh flat linux/ linux/ linux/
multi-config cache in runtime/build, file in runtime/build/Release Release/ none
linux/Debug 1 day old, fresh linux/RelWithDebInfo linux/Debug none
same, with CMAKE_DEFAULT_BUILD_TYPE:STRING=RelWithDebInfo in the cache linux/Debug none

The description makes no claim about freshness. The search takes the first listed configuration that has the file, and that is what the table shows.

Nit, not blocking:

  1. Look at the last row. In a Ninja Multi-Config tree, build_pipeline_check() runs cmake --build without --config, so it builds CMAKE_DEFAULT_BUILD_TYPE (or the first listed configuration when that is not set). The search ignores CMAKE_DEFAULT_BUILD_TYPE, so an older binary from an earlier-listed configuration wins over the one that make_game.py just built. Today preflight builds only when no checker exists, so this needs a leftover binary. make_game, first_light: rebuild vk_pipeline_check / vk_harness when the runtime sources are newer (#7148) #7223 rebuilds a stale checker; by its diff, its rebuild would go to the default configuration while this search still returns the older file. A possible fix: read CMAKE_DEFAULT_BUILD_TYPE from the cache and try it first, or pass --config with the first listed configuration to the build.

Overlap: #7223 (rebuild vk_pipeline_check when the runtime sources are newer) and #3468 (find the Windows checker after a Visual Studio build), both named in the description, each conflict with this PR in make_game.py (git merge-tree). Each merges cleanly with main on its own. #3468 also uses a different rule, a fixed order with RelWithDebInfo first on Windows, so the two lookups will need to agree when they meet.

AI-assisted (Claude Code).

@garuspl

garuspl commented Nov 23, 2026

Copy link
Copy Markdown

Tested cdb6678 on Windows 11 (CPU only, no GPU needed): pass

Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto main d9aa42a, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).

  • tests/test_make_game_pipeline_preflight.py: 15 passed, 1 skipped, 2 subtests passed on main and with the PR.
  • tests/test_make_game_platform.py: main 44 passed, 2 skipped, 7 subtests passed; with the PR 44 passed, 3 skipped, 7 subtests passed.

Skipped on this host in tests/test_make_game_platform.py (the tests' own guards, so not exercised on Windows): tests\test_make_game_platform.py:521: requires POSIX execute permissions.

AI-assisted (Claude Code, Claude Opus 5.5).

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.

4 participants