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:
@@ -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
|
||||
|
@@ -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 \
|
||||
|
5
.gitlab-ci/container/container_post_build.sh
Executable file
5
.gitlab-ci/container/container_post_build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
apt-get autoremove -y --purge
|
||||
|
||||
ccache --show-stats
|
8
.gitlab-ci/container/container_pre_build.sh
Executable file
8
.gitlab-ci/container/container_pre_build.sh
Executable 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
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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 \
|
||||
|
@@ -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 \
|
||||
|
Reference in New Issue
Block a user