Crow CI on ci.codefloe.com can now cache files between pipeline runs, for example dependencies or compiler output.
Add a cache section to a workflow, and Crow restores the listed paths before your steps and saves them after a successful run:
cache:
- key: go-{{ arch }}-{{ checksum "go.sum" }}
restore_keys: ['go-{{ arch }}-']
paths: [.cache/go]
steps:
build:
image: golang:1.27
environment:
GOMODCACHE: ${CI_WORKSPACE}/.cache/go
commands: [go build ./...]
Every user and organization gets 20 GiB of caches, with up to 10 GiB per repository, and can restore 1 TB per month.
When a save does not fit, the least recently used caches make room, and caches that were not restored for 30 days are removed.
The caches live on a dedicated HDD disk in our own infrastructure, so restores do not cost us per gigabyte and we can keep these limits generous.
If you need more, let us know, or connect an S3 bucket of your own in the Caches tab of your organization’s settings, where our limits do not apply.
If the cache is unavailable, the step logs a warning and your build carries on without it.
Each cache belongs to the branch, tag or pull request it was saved from, and a run falls back to the target branch and then the default branch when its own has none.
Pull requests from forks can restore caches but never save them, so nobody can poison the cache of your default branch.
Keys never change once saved, so put a checksum of your lock file into the key to get a fresh cache when dependencies change.
The Caches tab of a repository’s settings shows its caches and their hit rate.
Key templates, save: always and everything else are explained in the Crow docs.
