collector icon indicating copy to clipboard operation
collector copied to clipboard

ROX-26272 Enable ccache for faster builds

Open robbycochran opened this issue 1 year ago • 1 comments

Description

  • Use ccache for local and remote ansible builds for both builder libraries and collector binaries.
  • Optimized s390x git checkout by disabling recursive submodule checkout
  • Settings: ccache enabled by default on all CI jobs. It is off by default locally. It can be disabled with no-ccache label on PRs.

Total speed ~3x comparing recent runs for Main Collector CI (~3-4hrs to ~1.5hr). The bulk coming from the very slow buildx builds. The running times below are from representative builds (not avg) and show the time for the the entire job, including set up and teardown.

  Without ccache With ccache Speedup
amd64 builder 14m 55s 7m 45s 1.92x
arm64 builder 2h 22m 35m 13s 4.03x
ppc64  builder 2h 33m 37m 55s 4.04x
s390x builder 31m 41s 14m 57s 2.12x
amd64 6m 22s 2m 38s 2.42x
arm64 52m 14s 7m 32s 6.93x
ppc64 50m 52s 8m 37s 5.90x
s390x 22m 39s 10m 52s 2.08x

Prior art from @Molter73

  • https://github.com/stackrox/collector/pull/1382
  • https://github.com/stackrox/collector/pull/1360

Checklist

  • [x] Investigated and inspected CI test results
  • [ ] Updated documentation accordingly

Automated testing

  • [ ] Added unit tests
  • [ ] Added integration tests
  • [ ] Added regression tests

Testing Performed

Inspected CI.

robbycochran avatar Sep 10 '24 21:09 robbycochran

@sourcery-ai review

robbycochran avatar Mar 25 '25 16:03 robbycochran