[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 43/44] .gitlab-ci.d: Split build and test in cross build job templ
From: |
Thomas Huth |
Subject: |
[PULL 43/44] .gitlab-ci.d: Split build and test in cross build job templates |
Date: |
Wed, 25 Sep 2024 13:10:24 +0200 |
From: Peter Maydell <peter.maydell@linaro.org>
In the native_build_job_template we have separate steps in the script
for the build and the test steps. This is helpful because then
gitlab will give separate timestamps in the log view for each, and
you can see how long it took to compile vs how long to test. In the
templates in crossbuild-template.yml, however, we do both the build
and test in a single 'make' invocation, and so we don't get the
separate timing information.
Split the build and test, in the same way we do in the native build
template.
This will also give us a place to separate out how parallel we want
to do the build by default from how parallel we want to do the tests
by default, which might be helpful in future.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240918125449.3125571-2-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.d/crossbuild-template.yml | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.d/crossbuild-template.yml
b/.gitlab-ci.d/crossbuild-template.yml
index 2ce0432eb7..d1cb7a35db 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -9,6 +9,7 @@
when: always
timeout: 80m
before_script:
+ - JOBS=$(expr $(nproc) + 1)
- cat /packages.txt
script:
- export CCACHE_BASEDIR="$(pwd)"
@@ -24,7 +25,11 @@
i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu
sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
- - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+ - make -j"$JOBS" all check-build
+ - if test -n "$MAKE_CHECK_ARGS";
+ then
+ $MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
+ fi
- if grep -q "EXESUF=.exe" config-host.mak;
then make installer;
version="$(git describe --match v[0-9]* 2>/dev/null || git rev-parse
--short HEAD)";
@@ -46,6 +51,8 @@
paths:
- ccache/
key: "$CI_JOB_NAME"
+ before_script:
+ - JOBS=$(expr $(nproc) + 1)
script:
- export CCACHE_BASEDIR="$(pwd)"
- export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
@@ -55,7 +62,11 @@
- cd build
- ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
--disable-tools --enable-${ACCEL:-kvm} $EXTRA_CONFIGURE_OPTS
- - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+ - make -j"$JOBS" all check-build
+ - if test -n "$MAKE_CHECK_ARGS";
+ then
+ $MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
+ fi
.cross_user_build_job:
extends: .base_job_template
@@ -65,6 +76,8 @@
paths:
- ccache/
key: "$CI_JOB_NAME"
+ before_script:
+ - JOBS=$(expr $(nproc) + 1)
script:
- export CCACHE_BASEDIR="$(pwd)"
- export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
@@ -76,7 +89,11 @@
alpha-linux-user m68k-linux-user microblazeel-linux-user
or1k-linux-user ppc-linux-user sparc-linux-user
xtensa-linux-user $CROSS_SKIP_TARGETS"
- - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+ - make -j"$JOBS" all check-build
+ - if test -n "$MAKE_CHECK_ARGS";
+ then
+ $MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
+ fi
# We can still run some tests on some of our cross build jobs. They can add
this
# template to their extends to save the build logs and test results
--
2.46.0
- [PULL 37/44] hw/ppc: remove return after g_assert_not_reached(), (continued)
- [PULL 37/44] hw/ppc: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 44/44] .gitlab-ci.d: Make separate collapsible log sections for build and test, Thomas Huth, 2024/09/25
- [PULL 40/44] qom: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 39/44] qobject: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 31/44] fpu: remove break after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 36/44] hw/pci: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 38/44] migration: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 32/44] tcg/loongarch64: remove break after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 41/44] tests/qtest: remove return after g_assert_not_reached(), Thomas Huth, 2024/09/25
- [PULL 42/44] scripts/checkpatch.pl: emit error when using assert(false), Thomas Huth, 2024/09/25
- [PULL 43/44] .gitlab-ci.d: Split build and test in cross build job templates,
Thomas Huth <=
- Re: [PULL 00/44] Functional test conversion, and assert(0) cleanup, Pierrick Bouvier, 2024/09/25
- Re: [PULL 00/44] Functional test conversion, and assert(0) cleanup, Peter Maydell, 2024/09/28