chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
72 stars 17 forks source link

Better CI caching #81

Closed chshersh closed 2 years ago

chshersh commented 2 years ago

This PR caches more directories on CI. These new directories are based on the following suggestions:

The rust-cache explains some more details on why some directories should be cached and not others.

Probably in the future, we will use rust-cache directly. But for now, I believe it should be good enough to just cache extra few directories.

I've noticed that cargo spends lots of time downloading the registry and sometimes even fails with spurious network errors. I believe this caching should address this problem.

chshersh commented 2 years ago

Wow, 22s on Ubuntu instead of 1m and cargo build now takes only 5s. I take it as a win 😅

MitchellBerend commented 2 years ago

I don't think I have a lot to add here since I don't have ci experience with rust beyond running tests. The speed up definitely seems nice though!