Hasty Briefsbeta

Bilingual

Scaling Golang CI by Replacing actions/setup-go

3 hours ago
  • CloudX replaced GitHub's default actions/setup-go with a custom cloudx-io/setup-go action to speed up CI, achieving a 69% reduction in median runtime for parallel jobs.
  • The default actions/setup-go causes parallel jobs to interfere by using incomplete cache keys, leading to stale caches and unnecessary rework; 86% of test runs were found to be unnecessary.
  • Go's toolchain caches (module, build, test) work efficiently on persistent filesystems but perform poorly in ephemeral CI environments due to GitHub Actions cache limitations.
  • cloudx-io/setup-go improves caching by including job identity and run ID in cache keys, ensuring separate caches for different jobs and saving cache after every run to maintain freshness.
  • Downsides of the new approach include larger, faster-growing cache blobs requiring automatic pruning and potentially expanded GitHub Actions cache capacity, though these are offset by faster runtimes.