Problem: not all cores used on Travis

Solution: As Travis enables 2 cores let's use them both
This commit is contained in:
Pawel Kurdybacha 2018-05-13 16:32:01 +01:00
parent 3807107f56
commit 6cd57fad17

View File

@ -5,6 +5,8 @@ set -e
LIBZMQ=${PWD}/libzmq-build
CPPZMQ=${PWD}/cppzmq-build
# Travis machines have 2 cores
JOBS=2
if [ "$DRAFT" = "1" ] ; then
# if we enable drafts during the libzmq cmake build, the pkgconfig
@ -21,7 +23,7 @@ install_zeromq() {
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
${ZEROMQ_CMAKE_FLAGS}
cmake --build ${LIBZMQ}
cmake --build ${LIBZMQ} -- -j${JOBS}
}
# build zeromq first
@ -31,13 +33,13 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
# build cppzmq
pushd .
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
cmake --build ${CPPZMQ}
cmake --build ${CPPZMQ} -- -j${JOBS}
cd ${CPPZMQ}
ctest -V
ctest -V -j${JOBS}
popd
# build cppzmq demo
ZeroMQ_DIR=${LIBZMQ} cppzmq_DIR=${CPPZMQ} cmake -Hdemo -Bdemo/build
cmake --build demo/build
cd demo/build
ctest
ctest -V