Repository navigation
Runtime: cache the SDL3 fetch and build in the Windows job - #7885
Closed
danyx67800 wants to merge 2 commits into
Closed
danyx67800 wants to merge 2 commits into
danyx67800 wants to merge 2 commits into
Conversation
The shim's SDL3 is C, so sccache does not cover it and every windows run compiled it from the pinned tarball. Cache the fetched sources and build tree, keyed on the tarball, the build-option salt and the cl/CMake/Ninja versions, and read cl's version from its FileVersion because its merged usage/banner lines sometimes put the usage first. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Author
|
Closing as the duplicate of #7882, which HQasper opened first (17:42:45Z) from the branch they wrote and which carries the same cache steps including the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claim: #7804 (comment) (carries the SDL3 cache entry HQasper found unclaimed, from closed #7179 /
HQasper:gameinput-ci-sdl3atef61fe846)What changed and why
The GameInput shim builds SDL3 from the pinned tarball when
-DLEONIDA_SDL3_FETCH=ON(#7113). SDL3 is C, sosccachedoes not cover it and the Runtimewindowsjob would compile it on every push. This caches the fetched sources and the build tree:.github/workflows/runtime.yml: the two job env values (SDL3_TARBALL_SHA256, the same SHA-256 asURL_HASHinruntime/CMakeLists.txt, andSDL3_CACHE_SALTfor build-option changes), the toolset step that reads thecl/CMake/Ninja versions, and theactions/cachestep forruntime/build/_deps/sdl3-{src,subbuild,build}.cl'sVersionInfo.FileVersioninstead of(& cl 2>&1 | Select-Object -First 1).clwith no arguments writes its usage and its banner on different streams, and the merged first line was sometimesusage: cl [ option... ] file...; that produced a key with no compiler version (HQasper saw both orders on one unchanged installation), so a compiler update would not have invalidated the tree.tests/test_runtime_workflow_sdl3_cache.pyreads the workflow (not a copy of it) and pins the cached paths, the three key inputs, the step ordering, and that the merged-stream form does not come back. It also checks the pinned SHA-256 againstruntime/CMakeLists.txtso a repin cannot drift.Depends on: #7113 (without its
-DLEONIDA_SDL3_FETCH=ONthe cached paths are not created, so the cache is a no-op until it lands).Tests run
python -I tests/test_runtime_workflow_sdl3_cache.py-> 5 tests, OK.python -m compileall -q tests/test_runtime_workflow_sdl3_cache.py-> OK.python -I tests/test_ci_registration.py-> OK (the new file is selected by the stdlib loop).python -I tests/test_no_game_data_workflow.py-> OK.python -I scripts/check_no_game_data.py-> OK.python -I make_game.py --help-> OK.jobs.windows.stepsholds the cache step with the expected key.cl.exe(a copy ofcmd.exe, so a real PE with a FileVersion),cmake.cmdandninja.cmd:version=10.0.26100.9818-WinBuild.160101.0800-cmake-version-4.4.5-1.13.1.Not checked, and only a hosted run can show it: the cache restore and save themselves. No GPU or driver was used; CPU only.
AI-assisted.