From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>
Subject: [PULL 7/7] gitlab-ci: Determine the number of jobs dynamically
Date: Thu, 28 May 2020 12:10:39 +0200 [thread overview]
Message-ID: <20200528101039.24600-8-thuth@redhat.com> (raw)
In-Reply-To: <20200528101039.24600-1-thuth@redhat.com>
Some people might want to run the gitlab CI pipelines in an environment
where multiple CPUs are available to the runners, so let's rather get
the number for "-j" from the "nproc" program (increased by 1 to compensate
for jobs that wait for I/O) instead of hard-coding it.
Message-Id: <20200525131823.715-7-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
.gitlab-ci.yml | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 559ec2ab4d..349c77aa58 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,12 +7,14 @@ include:
- apt-get update -qq
- apt-get install -y -qq git gcc libglib2.0-dev libpixman-1-dev make
genisoimage
+ - JOBS=$(expr $(nproc) + 1)
.update_dnf_template: &before_script_dnf
before_script:
- dnf update -y
- dnf install -y bzip2 diffutils gcc git genisoimage findutils glib2-devel
make python3 perl-podlators perl-Test-Harness pixman-devel zlib-devel
+ - JOBS=$(expr $(nproc) + 1)
build-system1:
image: ubuntu:19.10
@@ -25,8 +27,8 @@ build-system1:
- ../configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu
cris-softmmu hppa-softmmu lm32-softmmu moxie-softmmu microblazeel-softmmu
mips64el-softmmu m68k-softmmu ppc-softmmu riscv64-softmmu sparc-softmmu"
- - make -j2
- - make -j2 check
+ - make -j"$JOBS"
+ - make -j"$JOBS" check
build-system2:
image: fedora:latest
@@ -40,8 +42,8 @@ build-system2:
- ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu
microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu
sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-softmmu"
- - make -j2
- - make -j2 check
+ - make -j"$JOBS"
+ - make -j"$JOBS" check
build-disabled:
image: fedora:latest
@@ -56,8 +58,8 @@ build-disabled:
--disable-qom-cast-debug --disable-spice --disable-vhost-vsock
--disable-vhost-net --disable-vhost-crypto --disable-vhost-user
--target-list="i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user"
- - make -j2
- - make -j2 check-qtest SPEED=slow
+ - make -j"$JOBS"
+ - make -j"$JOBS" check-qtest SPEED=slow
build-tcg-disabled:
image: centos:8
@@ -67,7 +69,7 @@ build-tcg-disabled:
- mkdir build
- cd build
- ../configure --cc=clang --enable-werror --disable-tcg --audio-drv-list=""
- - make -j2
+ - make -j"$JOBS"
- make check-unit
- make check-qapi-schema
- cd tests/qemu-iotests/
@@ -86,7 +88,7 @@ build-user:
- cd build
- ../configure --enable-werror --disable-system --disable-guest-agent
--disable-capstone --disable-slirp --disable-fdt
- - make -j2
+ - make -j"$JOBS"
- make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user
build-clang:
@@ -100,8 +102,8 @@ build-clang:
- ../configure --cc=clang --cxx=clang++ --enable-werror
--target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user"
- - make -j2
- - make -j2 check
+ - make -j"$JOBS"
+ - make -j"$JOBS" check
build-tci:
image: centos:8
@@ -112,7 +114,7 @@ build-tci:
- cd build
- ../configure --enable-tcg-interpreter
--target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
- - make -j2
+ - make -j"$JOBS"
- make run-tcg-tests-x86_64-softmmu
- make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
- for tg in $TARGETS ; do
--
2.18.1
next prev parent reply other threads:[~2020-05-28 10:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 10:10 [PULL 0/7] Gitlab CI fixes and improvements Thomas Huth
2020-05-28 10:10 ` [PULL 1/7] linux-user: limit check to HOST_LONG_BITS < TARGET_ABI_BITS Thomas Huth
2020-05-28 10:10 ` [PULL 2/7] MAINTAINERS: Add Philippe, Alex and Wainer to the Gitlab-CI section Thomas Huth
2020-05-28 10:10 ` [PULL 3/7] gitlab-ci: Remove flex/bison packages Thomas Huth
2020-05-28 10:10 ` [PULL 4/7] GitLab CI: avoid calling before_scripts on unintended jobs Thomas Huth
2020-05-28 10:10 ` [PULL 5/7] gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder Thomas Huth
2020-10-12 13:44 ` Philippe Mathieu-Daudé
2020-10-12 14:01 ` Daniel P. Berrangé
2020-10-13 14:18 ` Philippe Mathieu-Daudé
2020-11-10 10:59 ` Philippe Mathieu-Daudé
2020-05-28 10:10 ` [PULL 6/7] gitlab-ci: Do not use the standard container images from gitlab Thomas Huth
2020-06-06 10:06 ` Sam Eiderman
2020-06-06 11:49 ` Alex Bennée
2020-06-06 12:38 ` Sam Eiderman
2020-06-07 5:39 ` Thomas Huth
2020-06-07 7:03 ` Sam Eiderman
2020-05-28 10:10 ` Thomas Huth [this message]
2020-05-28 16:05 ` [PULL 0/7] Gitlab CI fixes and 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=20200528101039.24600-8-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=crosa@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).