Add cache for built Rust crates
swh-graph takes 6-7 minutes to build and test, 4 of which are spent building Rust crates, mostly dependencies. It would be great if the built dependencies could be reused across jobs.
It's not as easy as mounting $CWD/target/
as a volume on the host like we do with ~/.cache
because Cargo takes an exclusive lock on it while building.
@olasd suggests looking into https://github.com/mozilla/sccache which is packaged in Debian and offers several storage options, both remote and local.