Yuuki-Discord / Yuuki-Bot

Free and open-source general-purpose bot for Discord.
MIT License
37 stars 7 forks source link

actions: Add caching for Docker layers #80

Closed Erisa closed 3 years ago

Erisa commented 3 years ago

Though their build processes may be different, I tested with Lykos and it brought a 2m30s build down to 34s with no code changes.

The benefit may be marginal at times but it should avoid wasted time for frequent commits that change little.

spotlightishere commented 3 years ago

Out of curiosity, I rebuilt this specific PR to check what times we might be able to expect from cache. The initial build took approximately 6m 46s, and unfortunately the rebuild seems to be similar. It did appear to finish in 5m 6s - unclear if this is a faster runner or caching helped out with some base layers, but bundle install appeared to be largely similar.

I'd hope in the future if we ever add other components this would help out, so +1 from me - thank you for integrating!

Erisa commented 3 years ago

Not sure why the results would show that little difference, according to logs it did receive the cache but from some scrolling (on mobile) I couldn't see anywhere it was actually used. On Lykos builds there was a bunch of "CACHED" build steps but none here. Oh well.