goto-bus-stop / setup-zig

use a @ziglang compiler in your github actions workflows
Other
147 stars 19 forks source link

Caching #44

Closed leecannon closed 1 year ago

leecannon commented 1 year ago

It would be great if this action cached the zig install so if the version has not changed no download is required.

andrewrk commented 1 year ago

Hi, our AWS bandwidth bill is pretty high. Would be super nice if a mirror was used or caching was in place.

goto-bus-stop commented 1 year ago

yikes, sorry about that :S the action does use github's tool caching but it seems to not work and I couldn't really figure out why that is when i looked last week. I'll give it another shot today...

goto-bus-stop commented 1 year ago

I think I misunderstood what the tool cache is for. It just looks up tools in the preinstalled images. It might be worthwhile to ask github to include zig releases in that, but that could take a while (and they might not agree that it's popular enough). i just made this action quickly when i tried out zig back then and am not the biggest actions expert 😅

So using the separate gh actions caching might be required, I aaaaalso thought that that costs users money, but afaict github will just evict caches past a given size limit, so it could be fine to add it by default in a minor release. I can experiment with that over the weekend

andrewrk commented 1 year ago

Thanks for looking into it!

goto-bus-stop commented 1 year ago

Apologies that it took a while. I published new versions on the v1 and v2 branch so anyone using @v1 or @v2 in their workflows now automatically gets caching by default. This time it should have a pretty significant impact.

leecannon commented 1 year ago

Just checked and it looks like this is working :+1: