From 6cd57fad17190b4e827286ed1746464f7f7a9b16 Mon Sep 17 00:00:00 2001 From: Pawel Kurdybacha Date: Sun, 13 May 2018 16:32:01 +0100 Subject: [PATCH] Problem: not all cores used on Travis Solution: As Travis enables 2 cores let's use them both --- ci_build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index 891fd1a..e3c7e83 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -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