diff options
author | Simon McVittie <smcv@collabora.com> | 2018-10-04 10:50:37 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-10-04 16:58:13 +0100 |
commit | c5d71a1889ee1edfb648903bcee561c5fbadd82d (patch) | |
tree | 26faa55aeac905c72a85f221acb7c54e82ef459f | |
parent | 5c204a9ee559b12c2ec72a7b3dfe9e35cc4166ad (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-- | .gitignore | 1 | ||||
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rwxr-xr-x | tools/ci-install.sh | 1 |
3 files changed, 12 insertions, 0 deletions
@@ -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 \ |