-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add caching to CI #168
Add caching to CI #168
Conversation
I wonder, is it possible to do caching without using dependencies? From what I can tell, you can do it with just 1-2 lines as well. The issue about dependencies is that you have to upgrade them and they also sometimes can become unmaintained. |
The Swatinem action has been around for a long time and is widely used (IIRC it's already in use in some of the other rustls repositories?). For updates you can enable Dependabot for the Actions your workflows depend on. The actions-rs stuff was painful, but I feel like caching ends up complicated enough that taking a dependency for this is probably the right solution. |
Hmm, I don't think so? I grepped across my local checkouts and didn't come up with any YAML hits. It looks like Quinn, H3 and Reqwest are, but nothing in the Rustls org. I had been playing around with caching in an old CI cleanup branch using Would using the 1st party Cache action dependency be more palatable to you @est31 ? |
FWIW that's already in place. |
Mhh that looks pretty good. Of course, if a pull request is not sped up by it while using |
I'll have to page the context back in, but I believe the issue wasn't the action being used, but the fact that the |
Okay @cpu let's go with your branch then, try it out on main, and if it has problems, then we can always come back to this PR. It is a little bit noisier but is lower in terms of supply chain risk, which I like. |
PTAL: #172 Just to be explicit; I agree strongly that speeding up CI is a worthwhile direction no matter which approach we end up taking. Thanks for getting the ball rolling @thomaseizinger |
FWIW, I have very good experiences with this action. We use it extensively in quite a big workspace here: https://github.com/libp2p/rust-libp2p. The setup is quite elaborate in that we only write to caches on master: https://github.com/libp2p/rust-libp2p/blob/master/.github/workflows/cache-factory.yml and then use them in PRs: https://github.com/libp2p/rust-libp2p/blob/399eaa39156f756956f38fab20083293da826fdd/.github/workflows/ci.yml#L44 I've also add interactions with the maintainer and they were very responsive :) I don't mind which way you go, personally, I just prefer not to maintain these configs if I can do it with a one-liner. For example, the action also automatically cleans your target directory of workspace artifacts which are usually useless. |
Closing in favour of #172. As I've said above, if the approach chosen by #172 turns out to cause major issues or limitations, we can always reconsider this one, but for now i'd like to go with #172. @thomaseizinger thanks for getting the ball rolling! |
botan-sys
is quite a heavy dependency to build. To accelerate CI times, add some caching of build artifacts.