On Wed, Jun 24, 2020 at 03:04:45PM +0100, Alex Bennée wrote: > These can be quite big so lets cache them. I couldn't find any nots on > ccache in the gitlab docs so I've just ignored it for now.
There's no built-in support for ccache, but you can enable it reasonably easily. In libvirt we add "ccache" to the dockerfile as a package to be installed in the container image. Then in the dockerfile again we add mkdir -p /usr/libexec/ccache-wrappers ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc) export CCACHE_WRAPPERSDIR=/usr/libexec/ccache-wrappers And in .gitlab-ci.yml, in each job we set before_script: export CCACHE_BASEDIR="$(pwd) export CCACHE_DIR="$CCACHE_BASEDIR/ccache" export CCACHE_MAXSIZE="500M" export PATH="$CCACHE_WRAPPERSDIR:$PATH" cache: paths: - ccache/ key: "$CI_JOB_NAME" Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|