GitHub Actions: Consider setting up a cache for build artifacts
uint opened this issue · comments
This would speed up the CI a bit. Mostly what's needed is to just cache the /target
directory and potentially $CARGO_HOME
.
As an added perk, if we integrate criterion, this should let us see performance diffs in CI (criterion saves statistics from its last run under /target
).
https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
Thanks @uint. I've implemented dependency caching in the CI and code coverage jobs. Caching spans ~/.cargo/registry
, ~/.cargo/git
, and target
. Do you know if we need separate caches for stable vs. beta vs. nightly channels? Or can we use a single cache across the three channels?
I think they're all going to produce separate artifacts, so dividing them up might help keep the caches smaller. I don't know if that will affect build times much in practice though.
Released in v0.6.0
https://github.com/ndebuhr/sim/releases/tag/v0.6.0