From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org
Subject: [PATCH 2/3] ci: do not use #processors+1 jobs, #processors is enough
Date: Tue, 18 May 2021 10:41:38 +0200 [thread overview]
Message-ID: <20210518084139.97957-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20210518084139.97957-1-pbonzini@redhat.com>
I could not reconstruct the origin of the $(($(nproc) + 1)) idiom,
but I suspect it was there only to have a sensible result when nproc
or getconf do not exist. This can be achieved also with an "||".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitlab-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4bd1a91aa8..3f0d86cf0a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,7 +17,7 @@ include:
stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
before_script:
- - JOBS=$(expr $(nproc) + 1)
+ - JOBS=$(nproc || echo 1)
script:
- if test -n "$LD_JOBS";
then
--
2.31.1
next prev parent reply other threads:[~2021-05-18 8:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 8:41 [PATCH 0/3] Small CI improvements Paolo Bonzini
2021-05-18 8:41 ` [PATCH 1/3] cirrus-ci: test installation Paolo Bonzini
2021-05-18 13:50 ` Alex Bennée
2021-05-19 14:44 ` Paolo Bonzini
2021-05-18 8:41 ` Paolo Bonzini [this message]
2021-05-18 8:56 ` [PATCH 2/3] ci: do not use #processors+1 jobs, #processors is enough Philippe Mathieu-Daudé
2021-05-18 10:49 ` Thomas Huth
2021-05-18 12:30 ` Paolo Bonzini
2021-05-18 12:43 ` Daniel P. Berrangé
2021-05-18 12:48 ` Paolo Bonzini
2021-05-18 8:41 ` [PATCH 3/3] ci: add -j to all "make" jobs Paolo Bonzini
2021-05-18 8:58 ` Philippe Mathieu-Daudé
2021-05-19 15:28 ` [PATCH 0/3] Small CI improvements Alex Bennée
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=20210518084139.97957-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--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 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).