From 12a917a14fb3cb01538c7e85d4569cd97f272281 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 26 Jan 2021 07:57:57 +0100 Subject: [PATCH] gitlab-ci.yml: Avoid recompiling the sources in the test jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20210126065757.403853-1-thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- .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: