Skip to content
Snippets Groups Projects
Commit 4f1cb94c authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Use Gitlab-CI cache to keep ccache data

parent b80b6328
No related branches found
No related tags found
1 merge request!890Use Gitlab-CI cache to keep ccache data
......@@ -28,8 +28,12 @@ build:gcc8:opt:
artifacts:
paths:
- ${BUILDDIR}
- .ccache
expire_in: 1 week
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .ccache
build:gcc8:dbg:
stage: build
......@@ -43,8 +47,11 @@ build:gcc8:dbg:
artifacts:
paths:
- ${BUILDDIR}
- .ccache
expire_in: 1 week
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .ccache
check-formatting:
stage: build
......@@ -130,10 +137,10 @@ test_public_headers_build:
BUILDDIR: build-opt
script:
- ci-utils/test_public_headers_build
artifacts:
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .ccache
expire_in: 1 week
# see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details
# of the configuration
......
......@@ -2,14 +2,7 @@
. $(dirname $0)/env_setup.sh
if [ -n "${CI}" ] ; then
url="${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/download?job=${CI_JOB_NAME}"
echo "downloading '${url}'"
curl -o artifacts.zip --location "${url}"
unzip -q artifacts.zip '.ccache/*' || true
fi
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG}/bin/ccache -z -M 1G
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG}/bin/ccache -z -F 2000
echo 'set(CMAKE_USE_CCACHE ON CACHE BOOL "")' >> cache_preload.cmake
......
......@@ -2,12 +2,7 @@
. $(dirname $0)/env_setup.sh
if [ -n "${CI}" ] ; then
url="${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/download?job=${CI_JOB_NAME}"
echo "downloading '${url}'"
curl -o artifacts.zip --location "${url}"
unzip -q artifacts.zip '.ccache/*' || true
fi
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG}/bin/ccache -z -F 2000
# make sure we do not re-run cmake
find ${BUILDDIR} -type f -exec touch -d $(date +@%s) \{} \;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment