On Thu, 2020-03-26 at 12:35 +0000, Daniel P. Berrangé wrote: > For any given job there is a high liklihood that ccache will be able to *likelihood [...] > .native_build_default_job_template: &native_build_default_job_definition > stage: native_build > + cache: > + paths: > + - ccache/ > + key: "$CI_JOB_NAME" > + before_script: > + - mkdir -p ccache > + - export CC="ccache gcc" > + - export CCACHE_BASEDIR=${PWD} > + - export CCACHE_DIR=${PWD}/ccache Having to set this up at the job level is kinda gross, and specifically the export CC="ccache gcc" trick is 1) not going to work for FreeBSD and 2) going to break Go builds. Ultimately I think we need to take a cue from what lcitool does when configuring VMs and generate a simple environment file that is baked into images and can be sourced from jobs with a single line. Anyway, that's a cleanup that we can easily perform later, so for the time being this will do. [...] > @@ -63,10 +81,14 @@ x64-debian-sid: > x64-centos-7: > <<: *native_build_default_job_definition > image: quay.io/libvirt/buildenv-libvirt-centos-7:latest > + # ccache isn't available > + before_script: > > x64-centos-8: > <<: *native_build_extra_job_definition > image: quay.io/libvirt/buildenv-libvirt-centos-8:latest > + # ccache isn't available > + before_script: Updated CentOS images that include ccache have already been generated, so this hunk is no longer necessary and should be dropped before pushing. Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx> -- Andrea Bolognani / Red Hat / Virtualization