From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [NOTFORMERGE PATCH v2 3/3] gitlab-ci-edk2.yml: Use ccache
Date: Tue, 7 Jan 2020 16:31:54 +0100 [thread overview]
Message-ID: <20200107153154.21401-4-philmd@redhat.com> (raw)
In-Reply-To: <20200107153154.21401-1-philmd@redhat.com>
By using ccache we reduce the job duration from
36 minutes 28 seconds: https://gitlab.com/philmd/qemu/-/jobs/395823729
to
29 minutes 15 seconds: https://gitlab.com/philmd/qemu/-/jobs/395840851
Running after script...
$ ccache --show-stats
cache hit (direct) 6604
files in cache 12090
cache size 335.5 MB
For now downloading this cache takes 16 seconds, archiving
it 44 seconds.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
We prefer to not use ccache to build the EDK2 firmware binaries, see:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg668616.html
.gitlab-ci-edk2.yml | 13 +++++++++++--
.gitlab-ci.d/edk2/Dockerfile | 3 +++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci-edk2.yml b/.gitlab-ci-edk2.yml
index 088ba4b43a..50b8aee6b7 100644
--- a/.gitlab-ci-edk2.yml
+++ b/.gitlab-ci-edk2.yml
@@ -10,7 +10,7 @@ docker-edk2:
- docker:19.03.1-dind
variables:
GIT_DEPTH: 3
- IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build
+ IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build-ccache
# We don't use TLS
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
@@ -38,12 +38,21 @@ build-edk2:
- pc-bios/edk2-licenses.txt
- edk2-stdout.log
- edk2-stderr.log
- image: $CI_REGISTRY_IMAGE:edk2-cross-build
+ image: $CI_REGISTRY_IMAGE:edk2-cross-build-ccache
variables:
GIT_DEPTH: 3
+ CCACHE_DIR: ${CI_PROJECT_DIR}/.ccache
+ cache: # Use the same cache for all EDK2 jobs
+ key: edk2-cross-build-ccache
+ paths:
+ - ${CCACHE_DIR}
+ before_script:
+ - ccache --zero-stats
script: # Clone the required submodules and build EDK2
- git submodule update --init roms/edk2
- git -C roms/edk2 submodule update --init
- export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
- echo "=== Using ${JOBS} simultaneous jobs ==="
- make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2
+ after_script:
+ - ccache --show-stats
diff --git a/.gitlab-ci.d/edk2/Dockerfile b/.gitlab-ci.d/edk2/Dockerfile
index b4584d1cf6..350b4df240 100644
--- a/.gitlab-ci.d/edk2/Dockerfile
+++ b/.gitlab-ci.d/edk2/Dockerfile
@@ -13,6 +13,7 @@ RUN apt update \
apt install --assume-yes --no-install-recommends \
build-essential \
ca-certificates \
+ ccache \
dos2unix \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabi \
@@ -25,3 +26,5 @@ RUN apt update \
&& \
\
rm -rf /var/lib/apt/lists/*
+
+ENV PATH /usr/lib/ccache:$PATH
--
2.21.1
prev parent reply other threads:[~2020-01-07 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 15:31 [PATCH v2 0/3] gitlab-ci: Add jobs to build the EDK2 firmware binaries Philippe Mathieu-Daudé
2020-01-07 15:31 ` [PATCH v2 1/3] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian Philippe Mathieu-Daudé
2020-01-07 15:31 ` [PATCH v2 2/3] gitlab-ci.yml: Add jobs to build the EDK2 firmware binaries Philippe Mathieu-Daudé
2020-01-07 19:16 ` Laszlo Ersek
2020-01-13 16:17 ` Thomas Huth
2020-01-07 15:31 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200107153154.21401-4-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).