pkl-community / setup-pkl

Apache License 2.0
3 stars 2 forks source link

Cache downloaded `pkl` binary #7

Open StefMa opened 3 months ago

StefMa commented 3 months ago

Maybe it make sense to save the downloaded pkl binary to the cache so it doesn't have to be re-downloaded (but restored from cache) on another runner.

For a key the pkl-version option could be used.

What do you think? Is it worth it? 🤔

jasongwartz commented 3 months ago

Nice idea! We're already using the actions toolkit's tool-cache utility here: https://github.com/pkl-community/setup-pkl/blob/main/src/main.ts#L47 but it's possible there's more caching abilities (though I think @actions/cache is more for caching content than tool binaries).

That said, this is going to be pretty well-optimised already I'd think (since we're pulling the binaries from GitHub itself), and I'm seeing the pull step take ~1s so far, eg: https://github.com/pkl-community/setup-pkl/actions/runs/8223555858/job/22486390636