From: Simon McVittie Date: Thu, 4 Oct 2018 09:50:37 +0000 (+0100) Subject: ci: Use ccache to speed up repeated builds X-Git-Tag: dbus-1.12.12~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5d71a1889ee1edfb648903bcee561c5fbadd82d;p=thirdparty%2Fdbus.git ci: Use ccache to speed up repeated builds Signed-off-by: Simon McVittie (cherry picked from commit d0728fd06e5a2302e7596e3df56b68b0a0834fd7) --- diff --git a/.gitignore b/.gitignore index 6398e77c3..04c276c1f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.rej *.o *~ +/.ccache/ /build-aux/ compile config.cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c042aa28..96d632d63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,16 @@ stages: before_script: - ./tools/ci-install.sh + - mkdir -p .ccache + - export CCACHE_BASEDIR="$(pwd)" + - export CCACHE_DIR="$CCACHE_BASEDIR/.ccache" + # Debian's ccache package creates symlinks here for all supported + # compilers + - export PATH="/usr/lib/ccache:$PATH" + +cache: + paths: + - .ccache/ variables: ci_in_docker: "yes" diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 2e2946fc5..30d4abe0a 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -126,6 +126,7 @@ case "$ci_distro" in autoconf-archive \ automake \ autotools-dev \ + ccache \ cmake \ debhelper \ dh-autoreconf \