summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-03-29 17:20:32 +0200
committerAndreas Schneider <asn@cryptomilk.org>2020-04-01 07:25:33 +0000
commit963a99f1d823f2b62697464381778b21a62887c7 (patch)
treea0be78b8681e91a3697990445ad8600333fd1df8 /.gitlab-ci.yml
parent13bddfcab61485137423049dbd8fa22657330a71 (diff)
downloadsamba-963a99f1d823f2b62697464381778b21a62887c7.tar.gz
gitlab-ci: Use a shared ccache for the runners
https://docs.gitlab.com/ee/ci/caching/ Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Apr 1 07:25:33 UTC 2020 on sn-devel-184
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 12b76028aa5..27a8dea47c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,6 +58,10 @@ include:
tags:
- docker
- shared
+ cache:
+ key: ccache.${CI_JOB_NAME}
+ paths:
+ - ccache
before_script:
- uname -a
- lsb_release -a
@@ -76,11 +80,18 @@ include:
- echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
- diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
- diff -u bootstrap/sha1sum.txt /sha1sum.txt
+ - export CCACHE_BASEDIR="${PWD}"
+ - export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR"
+ - export CC="ccache cc"
+ - export CXX="ccache c++"
+ - ccache -z -M 500M
+ - ccache -s
after_script:
- mount
- df -h
- cat /proc/swaps
- free -h
+ - CCACHE_BASEDIR="${PWD}" CCACHE_DIR="${PWD}/ccache" ccache -s -c
artifacts:
expire_in: 1 week
paths: