[go: up one dir, main page]

Skip to content

Add ccache to build

What does this MR do?

While Omnibus caching provides caching for entire software definitions, a cache invalidation can trigger a lot of the same work for Gitaly, native gems, etc. Use ccache to speed up these builds.

This requires gitlab.com/gitlab-org/gitlab-omnibus-builder/-/merge_requests/426 for AmazonLinux 2023.

Example from the AlmaLinux-9-fips-branch in https://gitlab.com/gitlab-org/omnibus-gitlab/-/jobs/11175693787:

     [Builder: ruby-grpc] I | 2025-08-28T20:41:11+00:00 | re-install grpc gem with system OpenSSL: 83.7865s
     [Builder: ruby-grpc] I | 2025-08-28T20:41:11+00:00 | Build ruby-grpc: 83.7922s

Compared to https://gitlab.com/gitlab-org/omnibus-gitlab/-/jobs/11172235727:

     [Builder: ruby-grpc] I | 2025-08-28T15:33:06+00:00 | re-install grpc gem with system OpenSSL: 301.6407s
     [Builder: ruby-grpc] I | 2025-08-28T15:33:06+00:00 | Build ruby-grpc: 301.6461s

ccache --show-stats show 95% hit rate:

Summary:
  Hits:            2906 / 3051 (95.25 %)
    Direct:        2837 / 3165 (89.64 %)
    Preprocessed:    69 /  286 (24.13 %)
  Misses:           145
    Direct:         328
    Preprocessed:   217
  Uncacheable:      756
Primary storage:
  Hits:            5743 / 6288 (91.33 %)
  Misses:           545
  Cache size (GB): 0.39 / 1.00 (38.65 %)

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is labeled workflowready for review per the Distribution MR workflow.

For GitLab team members

If you don't have access to this, the reviewer should trigger these jobs for you during the review process.

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job within the Trigger:ee-package downstream pipeline succeeded.
  • If you are changing anything SSL related, then the Trigger:package:fips manual job within the Trigger:ee-package downstream pipeline must succeed.
  • If CI configuration is changed, the branch must be pushed to dev.gitlab.org to confirm regular branch builds aren't broken.

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation created/updated.
  • Tests added.
  • Integration tests added to GitLab QA.
  • Equivalent MR/issue for the GitLab Chart opened.
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Stan Hu

Merge request reports

Loading