Skip to content

CI: sccache for Visual Studio msbuild and CMake VS jobs - #8651

Draft
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:vs-sccache
Draft

danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:vs-sccache

Conversation

@danoli3

@danoli3 danoli3 commented Nov 5, 2026

Copy link
Copy Markdown
Member

MSVC CI was the wall clock (10–14 min per cell) and skipped ccache. This wires sccache through cl.exe for build-vs and build-cmake (vs-x64).

Why sccache

hendrikmuhs/ccache-action already installs ccache on Linux/macOS. Its own README recommends sccache on Windows. cl.exe does not read CC/CXX, so the action alone is not enough.

Change

  • scripts/ci/vs/setup_sccache_cl.ps1 writes a sccache-cl.cmd wrapper and exports msbuild properties:
    CLToolExe, CLToolPath, TrackFileAccess=false, UseMultiToolTask=true, DebugInformationFormat=OldStyle (/Z7, which sccache can hash).
  • build-vs: sccache per vsYear/platform/toolset, ilammy/msvc-dev-cmd so cl.exe is on PATH, then the four emptyExample / allAddons Debug+Release msbuilds.
  • build-cmake (vs-x64): same wrapper; scripts/ci/cmake/build.sh forwards CMAKE_VS_MSBUILD_ARGS to cmake --build.

emptyExample and allAddonsExample compile the same OF core, so allAddons should hit within a job on the first run. Later runs restore the Actions cache.

First CI run on this PR is a cold cache (similar wall clock, plus a short install). After it lands, look for sccache hit rates in the action post step.

@danoli3
danoli3 marked this pull request as draft November 5, 2026 06:07
MSVC jobs were the wall clock (10–14 min) and skipped ccache.
Use hendrikmuhs/ccache-action variant sccache, wrap cl.exe for
msbuild, and pass the same properties through cmake --build.

emptyExample and allAddonsExample share OF sources, so the second
project in a job should hit the cache even on a cold runner.
Subsequent runs restore the GitHub Actions cache per
vsYear/platform/toolset.
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.

1 participant