summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2020-07-16 11:42:57 -0400
committerJonathan Lebon <jonathan@jlebon.com>2020-07-16 15:44:34 -0400
commit92284f9b8107078d93423f772929bed0ab15e75b (patch)
treea2bee80c92fe0938257f968cf5ad06768cd2f540 /ci
parent4752dd02cfddd3f7c102e7fdd4dcca9a1aeee1a1 (diff)
downloadostree-92284f9b8107078d93423f772929bed0ab15e75b.tar.gz
ci: Constrain parallel build jobs
The default `_NPROCESSORS_ONLN` heuristic we have isn't cgroups aware. So it thinks it has e.g. 40 CPUs when running in a k8s pod. This can then blow through our allocated resource limits. Declare some modest amount of RAM and CPU resources and override `make` parallelism. This matches what rpm-ostree now does in https://github.com/coreos/rpm-ostree/pull/2155.
Diffstat (limited to 'ci')
-rw-r--r--ci/libbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/libbuild.sh b/ci/libbuild.sh
index a8ade0d7..dece8d09 100644
--- a/ci/libbuild.sh
+++ b/ci/libbuild.sh
@@ -10,7 +10,7 @@ pkg_upgrade() {
}
make() {
- /usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
+ /usr/bin/make -j ${MAKE_JOBS:-$(getconf _NPROCESSORS_ONLN)} "$@"
}
build() {