[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] ci: do not use #processors+1 jobs, #processors is enough
From: |
Paolo Bonzini |
Subject: |
[PATCH 2/3] ci: do not use #processors+1 jobs, #processors is enough |
Date: |
Tue, 18 May 2021 10:41:38 +0200 |
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
[PATCH 3/3] ci: add -j to all "make" jobs, Paolo Bonzini, 2021/05/18
[PATCH 1/3] cirrus-ci: test installation, Paolo Bonzini, 2021/05/18