Hey everyone, one of the authors here. This is a "small" improvement that has saved us a LOT of developer time over the last few months. It's actually quite crazy to me that the default actions/setup-go simply does not work well if you want to have more than one golang action running at the same time.
The blogpost has a lot of technical details, but you can also just read the code and try it yourself:
We recently did similar work for our pipelines, heavily based on Better GitHub Actions caching for Go [0]. Were you aware of that article, or did you (re-)discover things like the cache trimming?
What's the best way to contribute? I'd like to expose the "go-version-file" input for the setup-go action instead of setting a Go version directly. Open an issue in the repo?
Also, have you considered this potential optimization: the module cache doesn't care about architecture, it's just downloaded code. Would it make sense to cache module and build cache separately, and use an architecture-free cache key for the module cache?
We hadn't seen that post before --- very similar, but completely independent.
Reasonable suggestions, but we've mostly published our action as reference for others. I'd suggest forking or creating your own setup-go action and implementing whatever behavior you'd like. Nothing wrong with either idea!
peterldowns · · focus · HN ↗
The blogpost has a lot of technical details, but you can also just read the code and try it yourself:
<a href="https://github.com/cloudx-io/setup-go" rel="nofollow">https://github.com/cloudx-io/setup-go
bewuethr · · focus · HN ↗
What's the best way to contribute? I'd like to expose the "go-version-file" input for the setup-go action instead of setting a Go version directly. Open an issue in the repo?
Also, have you considered this potential optimization: the module cache doesn't care about architecture, it's just downloaded code. Would it make sense to cache module and build cache separately, and use an architecture-free cache key for the module cache?
[0]: <a href="https://danp.net/posts/github-actions-go-cache/" rel="nofollow">https://danp.net/posts/github-actions-go-cache/
peterldowns · · focus · HN ↗
Reasonable suggestions, but we've mostly published our action as reference for others. I'd suggest forking or creating your own setup-go action and implementing whatever behavior you'd like. Nothing wrong with either idea!