Buildless + CCache
Cache your C-like artifacts with Buildless
Using CCache with Buildless
CCache is one of the original build caching tools to reach wide adoption; it is released open-source under GNU GPLv3 and designed primarily for use with C, C++, and similar toolchains.
What do you mean by C-like toolchains?
Any toolchain which involves calling a series of tools via the command-line, with file inputs and command-line flags, can typically be handled well by CCache. The process goes roughly like this:
- Collect compiler version and variant info
- Collect all command-line flags for a given compiler command
- Hash all flags and file-based inputs to the command
- Fetch from the cache at that hash, considering the result a hit if available
- Optional: Push to the cache if no hit was encountered, and the object had to be rebuilt
Supported Backends
You can use CCache with Buildless in several different ways, depending on your needs.
Buildless as CCache HTTP storage backend
Buildless provides a compliant API endpoint which can be used with CCache's HTTP backend; in this case, you should use the following information:
Setting | Value |
---|---|
Hostname/Endpoint | https://ccache.less.build/cache/generic |
TLS | Active; certificate verification on |
Auth mode | HTTP Basic |
Username | apikey |
Password | Your API key |
In HTTP mode, CCache submits store requests as PUT
calls, and fetches keys with GET
calls. Pretty straight forward and easy.
Buildless as Redis-based Backend
The Buildless API can speak Redis; it is supported to use CCache's Redis backend with our API endpoints:
redis-cli --user apikey --pass "$BUILDLESS_APIKEY" -h redis.less.build --tls
Find full connection configuration info on our Buildless + Redis page.
Updated about 1 year ago