Skip to content

Include ccache in Salsa-CI images?

Hello!

The tool ccache is a C/C++ tool that evaluates stores all built objects in a cache directory, and on new builds evaluates which source files have been changed and reuses the objects that have already been built for files that have no new changes.

I have been using this in MariaDB builds for years on my local laptop and on remote build systems. I have also tested ccache with Gitlab-CI at https://gitlab.com/mariadb/server where you can see that the build time dropped from 1h+ to 15 minutes when ccache was deployed.

The build image used in the above mentioned tests is defined at https://gitlab.com/mariadb/mariadb.org-build-containers/blob/master/Dockerfile.template

I have not tested it yet for Salsa-CI, but I am willing to test and make a MR if you like this idea. Basically the salsa-ci-image would need to have ccache installed and these lines run at the end in the dockerfile:

RUN update-ccache-symlinks
RUN mkdir -p ccache
RUN ccache -s

What to you recon about this?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information