From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PULL 7/9] gitlab-ci.yml: Avoid recompiling the sources in the test jobs
Date: Wed, 27 Jan 2021 10:54:42 +0100 [thread overview]
Message-ID: <20210127095444.114495-8-thuth@redhat.com> (raw)
In-Reply-To: <20210127095444.114495-1-thuth@redhat.com>
Currently, our check-system-* jobs are recompiling the whole sources
again. This happens due to the fact that the jobs are checking out
the whole source tree and required submodules again, and only try
to use the "build" directory with the binaries and object files as an
artifact from the previous stage - which simply does not work right
anymore (with the current version of meson). Due to some changed
time stamps, meson/ninja are always trying to rebuild the whole tree.
In the long run, we could likely use "meson test --no-rebuild", but
there is still some work going on in that area to improve the user
experience. So until this has been done, simply avoid recompiling the
sources with a trick: pass NINJA=":" to the make process in the test
jobs. Also check out the submodules manually before updating the
timestamps in the build folder, so that the binaries are definitely
newer that all the source files.
This saves ca. 10 - 15 minutes of precious CI cycles in each run.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210126065757.403853-1-thuth@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d0d8914bff..7c0db64710 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,9 +38,12 @@ include:
stage: test
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
script:
+ - scripts/git-submodule.sh update
+ $(grep GIT_SUBMODULES build/config-host.mak | sed 's/GIT_SUBMODULES=//')
- cd build
- find . -type f -exec touch {} +
- - make $MAKE_CHECK_ARGS
+ # Avoid recompiling by hiding ninja with NINJA=":"
+ - make NINJA=":" $MAKE_CHECK_ARGS
.acceptance_template: &acceptance_definition
cache:
--
2.27.0
next prev parent reply other threads:[~2021-01-27 10:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 9:54 [PULL 0/9] Gitlab-CI and testing improvements Thomas Huth
2021-01-27 9:54 ` [PULL 1/9] tests/docker: Install static libc package in CentOS 7 Thomas Huth
2021-01-27 9:54 ` [PULL 2/9] gitlab-ci: Test building linux-user targets on " Thomas Huth
2021-01-27 9:54 ` [PULL 3/9] gitlab-ci.yml: Avoid some submodules to speed up the CI a little bit Thomas Huth
2021-01-27 9:54 ` [PULL 4/9] configure: Only check for audio drivers if system-mode is selected Thomas Huth
2021-01-27 9:54 ` [PULL 5/9] meson: Do not build optional libraries by default Thomas Huth
2021-01-27 9:54 ` [PULL 6/9] gitlab-ci.yml: Exclude some redundant targets in build-without-default-features Thomas Huth
2021-01-27 9:54 ` Thomas Huth [this message]
2021-01-27 9:54 ` [PULL 8/9] docs/devel: Explain how acceptance tests can be skipped Thomas Huth
2021-01-27 9:54 ` [PULL 9/9] libqtest: Rework qtest_rsp() Thomas Huth
2021-01-28 10:46 ` [PULL 0/9] Gitlab-CI and testing improvements Peter Maydell
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=20210127095444.114495-8-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@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).