I wonder how to install it quickly and portably. If I run cargo install sccache it takes way longer than any savings from the cache itself.
Not the greatest solution but you could rely on caches
- cargo install sccache --version $SCCACHE_VERSION || echo "Reusing sccache from CI cache"
No need to
--force to upgrade; Travis flushes its caches when environment variables change.
- If the build takes too long, you could use
- You do need to keep your fresh builds under 50 minutes or so. From some past experience, somewhere around there is Travis’ hard cutoff for all steps within a build.
EDIT: This is the approach I’m using for clippy