ci: Enable ccache in the container builds.

This should reduce our container rebuild times, particularly on the
40-minute ARM build (which is split across only 2 runners and thus likely
to have a hot cache) when working on updating containers.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4099>
This commit is contained in:
Eric Anholt
2020-03-06 13:23:20 -08:00
parent af7dca3560
commit ba39cc5e85
8 changed files with 37 additions and 7 deletions

View File

@@ -52,6 +52,8 @@ apt-get -y install \
xz-utils \
zlib1g-dev
. .gitlab-ci/container/container_pre_build.sh
# dependencies where we want a specific version
export LIBDRM_VERSION=libdrm-2.4.100
@@ -78,4 +80,4 @@ apt-get purge -y \
python3-distutils \
wget
apt-get autoremove -y --purge
. .gitlab-ci/container/container_post_build.sh

View File

@@ -10,6 +10,7 @@ echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources
apt-get update
apt-get -y install \
bzip2 \
ccache \
cmake \
g++ \
gcc \
@@ -35,6 +36,8 @@ apt-get -y install \
wget \
zlib1g
. .gitlab-ci/container/container_pre_build.sh
############### Build dEQP runner
. .gitlab-ci/build-cts-runner.sh
@@ -46,8 +49,11 @@ apt-get -y install \
############### Uninstall the build software
ccache --show-stats
apt-get purge -y \
bzip2 \
ccache \
cmake \
g++ \
gcc \

View File

@@ -0,0 +1,5 @@
#!/bin/sh
apt-get autoremove -y --purge
ccache --show-stats

View File

@@ -0,0 +1,8 @@
#!/bin/sh
export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=true
export CCACHE_DIR=/cache/mesa/ccache
export PATH=/usr/lib/ccache:$PATH
ccache --show-stats

View File

@@ -84,6 +84,8 @@ apt-get install -y --no-remove \
xz-utils \
zlib1g-dev
. .gitlab-ci/container/container_pre_build.sh
# Cross-build Mesa deps
for arch in $CROSS_ARCHITECTURES; do
apt-get install -y --no-remove \
@@ -219,10 +221,6 @@ make -j4
popd
# Remove ccache directory, useless for the build jobs
rm -rf $(ccache --get-config=cache_dir)
############### Uninstall the build software
apt-get purge -y \
@@ -237,4 +235,4 @@ apt-get purge -y \
unzip \
wget
apt-get autoremove -y --purge
. .gitlab-ci/container/container_post_build.sh

View File

@@ -53,7 +53,8 @@ apt-get install -y --no-remove \
xz-utils \
zlib1g-dev
. .gitlab-ci/container/container_pre_build.sh
############### Uninstall unused packages
apt-get autoremove -y --purge
. .gitlab-ci/container/container_post_build.sh

View File

@@ -30,6 +30,7 @@ apt-get dist-upgrade -y
apt-get install -y --no-remove \
autoconf \
automake \
ccache \
cmake \
g++ \
gcc \
@@ -75,6 +76,7 @@ apt-get install -y --no-remove \
xvfb \
zlib1g
. .gitlab-ci/container/container_pre_build.sh
############### Build piglit
@@ -98,9 +100,12 @@ apt-get install -y --no-remove \
############### Uninstall the build software
ccache --show-stats
apt-get purge -y \
autoconf \
automake \
ccache \
cmake \
g++ \
gcc \

View File

@@ -28,6 +28,7 @@ EOF
apt-get dist-upgrade -y
apt-get install -y --no-remove \
ccache \
cmake \
g++ \
gcc \
@@ -66,6 +67,7 @@ apt-get install -y --no-remove \
xauth \
xvfb
. .gitlab-ci/container/container_pre_build.sh
############### Build dEQP runner
@@ -89,7 +91,10 @@ apt-get install -y --no-remove \
############### Uninstall the build software
ccache --show-stats
apt-get purge -y \
ccache \
cmake \
g++ \
gcc \