ci: expand Travis-CI build matrix and use two parallel build jobs
Change-Id: I7dbba5bcd63274daa9b0da2ee9d631a55c1eca9e
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index eb4e968..6448fbe 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -24,12 +24,12 @@
if has Ubuntu $NODE_LABELS; then
sudo apt-get -qq update
- sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
+ sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
libcrypto++-dev libsqlite3-dev libssl-dev \
libpcap-dev
if [[ $JOB_NAME == *"code-coverage" ]]; then
- sudo apt-get -qq install lcov libgd-perl python-setuptools
+ sudo apt-get -qy install lcov libgd-perl python-setuptools
sudo easy_install --upgrade gcovr
fi
fi
diff --git a/.jenkins.d/01-ndn-cxx.sh b/.jenkins.d/01-ndn-cxx.sh
index e25dd2a..7a42b5a 100755
--- a/.jenkins.d/01-ndn-cxx.sh
+++ b/.jenkins.d/01-ndn-cxx.sh
@@ -35,15 +35,16 @@
sudo rm -Rf ndn-cxx-latest
fi
-sudo rm -Rf /usr/local/include/ndn-cxx
+sudo rm -f /usr/local/bin/ndnsec*
+sudo rm -fr /usr/local/include/ndn-cxx
sudo rm -f /usr/local/lib/libndn-cxx*
-sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
+sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx.pc
pushd ndn-cxx >/dev/null
-./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain
-./waf -j1 --color=yes
-sudo ./waf install -j1 --color=yes
+./waf configure --color=yes --enable-shared --disable-static --without-osx-keychain
+./waf build --color=yes -j${WAF_JOBS:-1}
+sudo ./waf install --color=yes
popd >/dev/null
popd >/dev/null
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index a9c3446..1c310a0 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -11,34 +11,34 @@
git submodule update
# Cleanup
-sudo ./waf -j1 --color=yes distclean
+sudo ./waf --color=yes distclean
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
# Configure/build in optimized mode with tests
- ./waf -j1 --color=yes configure --with-tests
- ./waf -j1 --color=yes build
+ ./waf --color=yes configure --with-tests
+ ./waf --color=yes build -j${WAF_JOBS:-1}
# Cleanup
- sudo ./waf -j1 --color=yes distclean
+ sudo ./waf --color=yes distclean
# Configure/build in optimized mode without tests
- ./waf -j1 --color=yes configure
- ./waf -j1 --color=yes build
+ ./waf --color=yes configure
+ ./waf --color=yes build -j${WAF_JOBS:-1}
# Cleanup
- sudo ./waf -j1 --color=yes distclean
+ sudo ./waf --color=yes distclean
fi
# Configure/build in debug mode with tests and without precompiled headers
if [[ $JOB_NAME == *"code-coverage" ]]; then
COVERAGE="--with-coverage"
-elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
+elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then
ASAN="--with-sanitizer=address"
fi
-./waf -j1 --color=yes configure --debug --with-tests --without-pch $COVERAGE $ASAN
-./waf -j1 --color=yes build
+./waf --color=yes configure --debug --with-tests --without-pch $COVERAGE $ASAN
+./waf --color=yes build -j${WAF_JOBS:-1}
# (tests will be run against debug version)
# Install
-sudo ./waf -j1 --color=yes install
+sudo ./waf --color=yes install
diff --git a/.jenkins.d/README.md b/.jenkins.d/README.md
index 085e383..41812aa 100644
--- a/.jenkins.d/README.md
+++ b/.jenkins.d/README.md
@@ -32,3 +32,5 @@
- `CACHE_DIR`: the variable defines a path to folder containing cached files from previous builds,
e.g., a compiled version of ndn-cxx library. If not set, `/tmp` is used.
+
+- `WAF_JOBS`: number of parallel build jobs used by waf, defaults to 1.