]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
ci: Use ccache to speed up repeated builds
authorSimon McVittie <smcv@collabora.com>
Thu, 4 Oct 2018 09:50:37 +0000 (10:50 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 4 Oct 2018 15:58:13 +0000 (16:58 +0100)
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d0728fd06e5a2302e7596e3df56b68b0a0834fd7)

.gitignore
.gitlab-ci.yml
tools/ci-install.sh

index 6398e77c35ac4bcd960283be4c4d09bf45f6505c..04c276c1facbb01de8f7b54f2bcc28c73fab6286 100644 (file)
@@ -3,6 +3,7 @@
 *.rej
 *.o
 *~
+/.ccache/
 /build-aux/
 compile
 config.cache
index 2c042aa28ea7af3864c4687bf4afccc00760c166..96d632d63fa437bc574c2011704ef737ef8e2642 100644 (file)
@@ -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"
index 2e2946fc5202cc9089c60790eda65e70b2f07df5..30d4abe0a4724e0531b6aca2c3d465b281f9b165 100755 (executable)
@@ -126,6 +126,7 @@ case "$ci_distro" in
             autoconf-archive \
             automake \
             autotools-dev \
+            ccache \
             cmake \
             debhelper \
             dh-autoreconf \