summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-10-04 10:50:37 +0100
committerSimon McVittie <smcv@collabora.com>2018-10-04 16:58:13 +0100
commitc5d71a1889ee1edfb648903bcee561c5fbadd82d (patch)
tree26faa55aeac905c72a85f221acb7c54e82ef459f
parent5c204a9ee559b12c2ec72a7b3dfe9e35cc4166ad (diff)
ci: Use ccache to speed up repeated builds
Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d0728fd06e5a2302e7596e3df56b68b0a0834fd7)
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml10
-rwxr-xr-xtools/ci-install.sh1
3 files changed, 12 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 6398e77c..04c276c1 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 2c042aa2..96d632d6 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 2e2946fc..30d4abe0 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 \