gitlab-ci: Use ccache
Meson picks it up automatically.
Based on:
* https://gitlab.freedesktop.org/mesa/mesa/merge_requests/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
(Cherry picked from commit b577df7745
)
This commit is contained in:
parent
37ad8dd978
commit
de6d87b619
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user