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 \
|
xz-utils \
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
# dependencies where we want a specific version
|
# dependencies where we want a specific version
|
||||||
export LIBDRM_VERSION=libdrm-2.4.100
|
export LIBDRM_VERSION=libdrm-2.4.100
|
||||||
|
|
||||||
@@ -78,4 +80,4 @@ apt-get purge -y \
|
|||||||
python3-distutils \
|
python3-distutils \
|
||||||
wget
|
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 update
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -35,6 +36,8 @@ apt-get -y install \
|
|||||||
wget \
|
wget \
|
||||||
zlib1g
|
zlib1g
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
############### Build dEQP runner
|
############### Build dEQP runner
|
||||||
|
|
||||||
. .gitlab-ci/build-cts-runner.sh
|
. .gitlab-ci/build-cts-runner.sh
|
||||||
@@ -46,8 +49,11 @@ apt-get -y install \
|
|||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
|
ccache --show-stats
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
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 \
|
xz-utils \
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
# Cross-build Mesa deps
|
# Cross-build Mesa deps
|
||||||
for arch in $CROSS_ARCHITECTURES; do
|
for arch in $CROSS_ARCHITECTURES; do
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
@@ -219,10 +221,6 @@ make -j4
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Remove ccache directory, useless for the build jobs
|
|
||||||
rm -rf $(ccache --get-config=cache_dir)
|
|
||||||
|
|
||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
@@ -237,4 +235,4 @@ apt-get purge -y \
|
|||||||
unzip \
|
unzip \
|
||||||
wget
|
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 \
|
xz-utils \
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
############### Uninstall unused packages
|
############### 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 \
|
apt-get install -y --no-remove \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -75,6 +76,7 @@ apt-get install -y --no-remove \
|
|||||||
xvfb \
|
xvfb \
|
||||||
zlib1g
|
zlib1g
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
############### Build piglit
|
############### Build piglit
|
||||||
|
|
||||||
@@ -98,9 +100,12 @@ apt-get install -y --no-remove \
|
|||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
|
ccache --show-stats
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
|
@@ -28,6 +28,7 @@ EOF
|
|||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
|
|
||||||
apt-get install -y --no-remove \
|
apt-get install -y --no-remove \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -66,6 +67,7 @@ apt-get install -y --no-remove \
|
|||||||
xauth \
|
xauth \
|
||||||
xvfb
|
xvfb
|
||||||
|
|
||||||
|
. .gitlab-ci/container/container_pre_build.sh
|
||||||
|
|
||||||
############### Build dEQP runner
|
############### Build dEQP runner
|
||||||
|
|
||||||
@@ -89,7 +91,10 @@ apt-get install -y --no-remove \
|
|||||||
|
|
||||||
############### Uninstall the build software
|
############### Uninstall the build software
|
||||||
|
|
||||||
|
ccache --show-stats
|
||||||
|
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
|
Reference in New Issue
Block a user