ci: auto-detect the OS instead of relying on NODE_LABELS
And remove WAF_JOBS: waf already defaults to the number of available
CPUs, which is appropriate in most cases, and we can always use the
built-in JOBS variable to override it where necessary.
Change-Id: I555dda0ccc48ee791271dbdaf4225cd1cfec4f3d
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index c514c3a..fa2c901 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -1,8 +1,5 @@
#!/usr/bin/env bash
-set -ex
-
-git submodule sync
-git submodule update --init
+set -eo pipefail
if [[ -z $DISABLE_ASAN ]]; then
ASAN="--with-sanitizer=address"
@@ -14,17 +11,19 @@
PCH="--without-pch"
fi
+set -x
+
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
# Build in release mode with tests and without precompiled headers
./waf --color=yes configure --with-tests --without-pch
- ./waf --color=yes build -j$WAF_JOBS
+ ./waf --color=yes build
# Cleanup
./waf --color=yes distclean
# Build in release mode without tests, but with "other tests"
./waf --color=yes configure --with-other-tests $PCH
- ./waf --color=yes build -j$WAF_JOBS
+ ./waf --color=yes build
# Cleanup
./waf --color=yes distclean
@@ -32,9 +31,9 @@
# Build in debug mode with tests
./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE $PCH
-./waf --color=yes build -j$WAF_JOBS
+./waf --color=yes build
# (tests will be run against the debug version)
# Install
-sudo_preserve_env PATH -- ./waf --color=yes install
+sudo ./waf --color=yes install