From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 4/6] gitlab: pull ccache setup into .base_meson_ccache_job_template
Date: Wed, 24 Jun 2026 13:46:55 +0100 [thread overview]
Message-ID: <20260624124657.2725376-5-berrange@redhat.com> (raw)
In-Reply-To: <20260624124657.2725376-1-berrange@redhat.com>
This provides a consistent ccache setup across all build jobs.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
.gitlab-ci.d/base.yml | 16 +++++++++++++
.gitlab-ci.d/buildtest-template.yml | 14 ++---------
.gitlab-ci.d/crossbuild-template.yml | 35 +++++-----------------------
3 files changed, 24 insertions(+), 41 deletions(-)
diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml
index dc36a1ca11..6289c7e5c3 100644
--- a/.gitlab-ci.d/base.yml
+++ b/.gitlab-ci.d/base.yml
@@ -143,3 +143,19 @@ variables:
- build/meson-logs
reports:
junit: build/meson-logs/*.junit.xml
+
+.base_meson_ccache_job_template:
+ extends: .base_meson_job_template
+ cache:
+ paths:
+ - ccache
+ key: "$CI_JOB_NAME"
+ when: always
+ script:
+ - export CCACHE_BASEDIR="$(pwd)"
+ - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
+ - export CCACHE_MAXSIZE="500M"
+ - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
+ - ccache --zero-stats
+ after_script:
+ - ccache --show-stats
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 0fa2351d87..8dfd17a0b5 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -1,13 +1,8 @@
.native_build_job_template:
- extends: .base_meson_job_template
+ extends: .base_meson_ccache_job_template
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
- cache:
- paths:
- - ccache
- key: "$CI_JOB_NAME"
- when: always
before_script:
- source scripts/ci/gitlab-ci-section
- section_start setup "Pre-script setup"
@@ -15,14 +10,10 @@
- cat /packages.txt
- section_end setup
script:
- - export CCACHE_BASEDIR="$(pwd)"
- - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
- - export CCACHE_MAXSIZE="500M"
- - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
+ - !reference [.base_meson_ccache_job_template, script]
- du -sh .git
- mkdir build
- cd build
- - ccache --zero-stats
- section_start configure "Running configure"
- ../configure --enable-werror --disable-docs --enable-fdt=system
--disable-debug-info
@@ -43,7 +34,6 @@
$MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
fi
- section_end test
- - ccache --show-stats
# We jump some hoops in common_test_job_template to avoid
# rebuilding all the object files we skip in the artifacts
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 36bb9a405c..aadae26844 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -1,12 +1,7 @@
.cross_system_build_job:
- extends: .base_meson_job_template
+ extends: .base_meson_ccache_job_template
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
- cache:
- paths:
- - ccache
- key: "$CI_JOB_NAME"
- when: always
timeout: 80m
before_script:
- source scripts/ci/gitlab-ci-section
@@ -15,13 +10,9 @@
- cat /packages.txt
- section_end setup
script:
- - export CCACHE_BASEDIR="$(pwd)"
- - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
- - export CCACHE_MAXSIZE="500M"
- - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
+ - !reference [.base_meson_ccache_job_template, script]
- mkdir build
- cd build
- - ccache --zero-stats
- section_start configure "Running configure"
- ../configure --enable-werror --disable-docs --enable-fdt=system
--disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS
@@ -46,7 +37,6 @@
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
fi
- section_end installer
- - ccache --show-stats
# Job to cross-build specific accelerators.
#
@@ -54,22 +44,15 @@
# KVM), and set extra options (such disabling other accelerators) via the
# $EXTRA_CONFIGURE_OPTS variable.
.cross_accel_build_job:
- extends: .base_meson_job_template
+ extends: .base_meson_ccache_job_template
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
timeout: 60m
- cache:
- paths:
- - ccache/
- key: "$CI_JOB_NAME"
before_script:
- source scripts/ci/gitlab-ci-section
- JOBS=$(expr $(nproc) + 1)
script:
- - export CCACHE_BASEDIR="$(pwd)"
- - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
- - export CCACHE_MAXSIZE="500M"
- - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
+ - !reference [.base_meson_ccache_job_template, script]
- mkdir build
- cd build
- section_start configure "Running configure"
@@ -87,20 +70,14 @@
- section_end test
.cross_user_build_job:
- extends: .base_meson_job_template
+ extends: .base_meson_ccache_job_template
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
- cache:
- paths:
- - ccache/
- key: "$CI_JOB_NAME"
before_script:
- source scripts/ci/gitlab-ci-section
- JOBS=$(expr $(nproc) + 1)
script:
- - export CCACHE_BASEDIR="$(pwd)"
- - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
- - export CCACHE_MAXSIZE="500M"
+ - !reference [.base_meson_ccache_job_template, script]
- mkdir build
- cd build
- section_start configure "Running configure"
--
2.54.0
next prev parent reply other threads:[~2026-06-24 12:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 12:46 [PATCH v2 0/6] gitlab: expose more info about CI runner environment as artifacts Daniel P. Berrangé
2026-06-24 12:46 ` [PATCH v2 1/6] gitlab: remove unused .cross_test_artifacts template Daniel P. Berrangé
2026-06-24 13:03 ` Philippe Mathieu-Daudé
2026-06-24 16:56 ` Pierrick Bouvier
2026-06-24 12:46 ` [PATCH v2 2/6] gitlab: move .meson_job_template into base.yaml Daniel P. Berrangé
2026-06-24 16:56 ` Pierrick Bouvier
2026-06-24 12:46 ` [PATCH v2 3/6] gitlab: use .base_meson_job_template from crossbuild jobs Daniel P. Berrangé
2026-06-24 16:56 ` Pierrick Bouvier
2026-06-24 12:46 ` Daniel P. Berrangé [this message]
2026-06-24 16:57 ` [PATCH v2 4/6] gitlab: pull ccache setup into .base_meson_ccache_job_template Pierrick Bouvier
2026-06-24 12:46 ` [PATCH v2 5/6] gitlab: pull before_script logic into .base_meson_job_template Daniel P. Berrangé
2026-06-24 16:58 ` Pierrick Bouvier
2026-06-24 12:46 ` [PATCH v2 6/6] gitlab: greatly expand captured info about CI runner environment Daniel P. Berrangé
2026-06-24 16:58 ` Pierrick Bouvier
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=20260624124657.2725376-5-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.