Commit b577df77 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

gitlab-ci: Use ccache

Meson picks it up automatically.

Based on:

* mesa/mesa!240
* https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
* https://stackoverflow.com/questions/53659419/ccache-no-hits-in-gitlab-ci

v2 based on the corresponding Mesa change:
* Quote CCACHE_(BASE)DIR environment variables.
* Clear ccache stats in before_script.
* Move cache stanza to the build-and-test job, the cache isn't used in
  the docker-image job.

Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
parent 537f06e2
......@@ -59,10 +59,19 @@ build-and-test:
when: on_failure
paths:
- build/test/piglit-results/
cache:
paths:
- ccache/
variables:
LC_ALL: C.UTF-8
PIGLIT_DIR: /root/piglit
XTEST_DIR: /root/xts
before_script:
- export CCACHE_BASEDIR="$PWD"
- export CCACHE_DIR="$PWD/ccache"
- export CCACHE_COMPILERCHECK=content
- ccache --zero-stats
- ccache --show-stats
script:
- meson -Dprefix=/usr build/
- |
......@@ -74,3 +83,5 @@ build-and-test:
cat build/meson-logs/testlog.txt
cat build/test/piglit-results/xvfb/long-summary || :
exit $status
after_script:
- CCACHE_DIR="$PWD/ccache" ccache --show-stats
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment