Skip to content

Enable ccache in GitHub Actions cmake builds (#5157)#5157

Closed
mnorris11 wants to merge 1 commit into
facebookresearch:mainfrom
mnorris11:export-D102926935
Closed

Enable ccache in GitHub Actions cmake builds (#5157)#5157
mnorris11 wants to merge 1 commit into
facebookresearch:mainfrom
mnorris11:export-D102926935

Conversation

@mnorris11
Copy link
Copy Markdown
Contributor

@mnorris11 mnorris11 commented Apr 29, 2026

Summary:

Add ccache to the build_cmake composite action to speed up CI builds. Uses hendrikmuhs/ccache-action@v1 to install ccache, restore/save caches keyed by build configuration (OS, arch, opt level, GPU, cuVS, ROCm, SVS), and set a 2GB max cache size. Passes CMAKE_C_COMPILER_LAUNCHER, CMAKE_CXX_COMPILER_LAUNCHER, and CMAKE_CUDA_COMPILER_LAUNCHER to cmake so all C, C++, and CUDA compilations go through ccache.

On first run the cache will be cold and there is no speedup. Subsequent runs on the same branch (or PRs against main) will see cache hits for unchanged translation units, which should significantly reduce build times for incremental CI runs.

Differential Revision: D102926935

@meta-cla meta-cla Bot added the CLA Signed label Apr 29, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 29, 2026

@mnorris11 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102926935.

Summary:

Add ccache to the `build_cmake` composite action to speed up CI builds. Uses `hendrikmuhs/ccache-action@v1` to install ccache, restore/save caches keyed by build configuration (OS, arch, opt level, GPU, cuVS, ROCm, SVS), and set a 2GB max cache size. Passes `CMAKE_C_COMPILER_LAUNCHER`, `CMAKE_CXX_COMPILER_LAUNCHER`, and `CMAKE_CUDA_COMPILER_LAUNCHER` to cmake so all C, C++, and CUDA compilations go through ccache.

On first run the cache will be cold and there is no speedup. Subsequent runs on the same branch (or PRs against main) will see cache hits for unchanged translation units, which should significantly reduce build times for incremental CI runs.

Differential Revision: D102926935
@meta-codesync meta-codesync Bot changed the title Enable ccache in GitHub Actions cmake builds Enable ccache in GitHub Actions cmake builds (#5157) Apr 29, 2026
@meta-codesync meta-codesync Bot closed this in 44c1972 Apr 29, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 29, 2026

This pull request has been merged in 44c1972.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant