Cockatrice/.github/workflows
Lukas Brübach 8c38885b44 [CI] Cache the Windows compile results with sccache
A pull request that touches one file rebuilds it, but sccache can hand
back the objects for everything else, and the GitHub Actions cache keeps
them between runs, so the second build of a branch costs about what the
first one stored and nothing more.

sccache has to wrap the compiler, and cmake only wraps it for the
generators that run the compiler themselves: the Visual Studio
generator drives MSBuild, which would drop a launcher on the floor
without a word. The cache therefore goes on the Ninja job, and
compile.sh now refuses --sccache on any other generator instead of
pretending to cache, and prints the sccache statistics next to the
existing ccache ones so the hit rate is visible in the log.

For MSVC, a cacheable object has to carry its debug information
inside, which is /Z7 rather than /Zi; sccache cannot restore the
latter, it can only restore a whole object file. Ask CMake for the
format by name through CMP0141 and CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
instead of hardcoding /Zi in the flags, where it would end up next to
/Z7, and keep the format as it was for every build that does not
cache. The linker still gets /DEBUG, so the release PDBs are written
either way, which is what that flag is there for.

The policy is set before project(), since that is when it takes
effect, and behind an if(POLICY) guard because it does not exist
before CMake 3.25 - where the old defaults remain the only option.
2026-10-14 16:15:05 +02:00
..
codeql.yml Bump actions/checkout from 6 to 7 (#7210) 2026-08-29 18:23:45 +02:00
desktop-build.yml [CI] Cache the Windows compile results with sccache 2026-10-14 16:15:05 +02:00
desktop-lint.yml [CI] Minimal GitHub Actions permissions (#7165) 2026-08-23 11:42:47 +02:00
docker-release.yml Allow manually publishing a release image in docker workflow (#7392) 2026-10-04 02:44:54 +02:00
documentation-build.yml [Docs] Add app logo to main page + cleanup (#7471) 2026-10-10 23:48:37 +02:00
translations-pull.yml [CI] Fix permissions for automations around translations (#7394) 2026-10-04 20:20:28 +02:00
translations-push.yml [CI] Fix permissions for automations around translations (#7394) 2026-10-04 20:20:28 +02:00
vcpkg-cache-import.yml [CI] Key the vcpkg binary cache per ABI and let pull requests heal it (#7377) 2026-10-14 08:14:16 +02:00