jianmingyong/ccache action

Install ccache and handle caching from GH

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Mar 24, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: jianmingyong/ccache-action@c31f64380632d9caeed1385ac306c556c02325a8 # v1.4.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
pathLocation where ccache repository will be cloned if ccache is set to install. This has to be relative to github.workspace. (string)ccache
versionTarget ccache version to install. Follows the semver range specification. Defaults to latest version. (string)*
installWhether to install ccache first. (boolean)true
install-typeInstallation type: binary or source. By using binary, it will download from GH Releases instead of compiling from source. If binary is not available, it will fall back to source. (string: binary | source)binary
ccache-binary-key-prefixTarget key prefix to use for restoring/saving ccache binary. It will append the prefix with os, arch, and version to form the key.ccache_binary
ccache-key-prefixTarget key prefix to use for restoring/saving ccache caches. You will need to have different prefix per matrix to avoid potential cache issues.ccache_cache
save-cache-once-per-keyIf true, the action will only save cache once per ccache-key-prefix. You will have to manually delete the cache in order for it to save again.false
gh-tokenGH token for purging old cache. If this is empty, it will not do the purge stage. Required "Actions" repository permissions (write).${{ github.token }}
cache-dirThis option specifies where ccache will keep its cached compiler outputs..ccache
compiler-checkBy default, ccache includes the modification time (“mtime”) and size of the compiler in the hash to ensure that results retrieved from the cache are accurate. If compiler plugins are used, these plugins will also be added to the hash. This option can be used to select another strategy.mtime
compressionIf true, ccache will compress data it puts in the cache. However, this option has no effect on how files are retrieved from the cache; compressed and uncompressed results will still be usable regardless of this option. The default is true. Compression is done using the Zstandard algorithm. The algorithm is fast enough that there should be little reason to turn off compression to gain performance. One exception is if the cache is located on a compressed file system, in which case the compression performed by ccache of course is redundant.true
compression-levelThis option determines the level at which ccache will compress object files using the real-time compression algorithm Zstandard. It only has effect if compression is enabled (which it is by default). Zstandard is extremely fast for decompression and very fast for compression for lower compression levels. The default is 0.0
max-filesThis option specifies the maximum number of files to keep in the cache. Use 0 for no limit (which is the default).0
max-sizeThis option specifies the maximum size of the cache. Use 0 for no limit. The default value is 5G. Available suffixes: k, M, G, T (decimal) and Ki, Mi, Gi, Ti (binary). The default suffix is G.500M
sloppinessBy default, ccache tries to give as few false cache hits as possible. However, in certain situations it's possible that you know things that ccache can't take for granted. This option makes it possible to tell ccache to relax some checks in order to increase the hit rate.time_macros
namedescription
ccache-binary-pathThe location where Ccache file is stored. Example: $input.path/install/bin/ccache.exe
ccache-versionThe version of Ccache being installed in semver format.