ci: Enable ccaching of CMake builds as well.
authorEric Anholt <eric@anholt.net>
Wed, 11 Mar 2020 18:11:19 +0000 (11:11 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 17 Mar 2020 17:44:39 +0000 (10:44 -0700)
They ignore $PATH for unknown reasons, so you have to force the ccache
wrapping yourself.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4099>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4099>

.gitlab-ci/container/container_pre_build.sh

index daae18fccb934ca4a643d53f2a1fb2a2273c3bc9..725a8b5ed4ad781fafbf5f41dee7c81898b290dc 100755 (executable)
@@ -5,4 +5,9 @@ export CCACHE_COMPRESS=true
 export CCACHE_DIR=/cache/mesa/ccache
 export PATH=/usr/lib/ccache:$PATH
 
+# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
+# Watch out, you can't have spaces in here because the renderdoc build fails.
+export CC="/usr/lib/ccache/gcc"
+export CXX="/usr/lib/ccache/g++"
+
 ccache --show-stats