Skip to content

Commit 6cd57fa

Browse files
committed
Problem: not all cores used on Travis
Solution: As Travis enables 2 cores let's use them both
1 parent 3807107 commit 6cd57fa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ci_build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set -e
55

66
LIBZMQ=${PWD}/libzmq-build
77
CPPZMQ=${PWD}/cppzmq-build
8+
# Travis machines have 2 cores
9+
JOBS=2
810

911
if [ "$DRAFT" = "1" ] ; then
1012
# if we enable drafts during the libzmq cmake build, the pkgconfig
@@ -21,7 +23,7 @@ install_zeromq() {
2123
-DZMQ_BUILD_TESTS=OFF \
2224
-DCMAKE_BUILD_TYPE=Release \
2325
${ZEROMQ_CMAKE_FLAGS}
24-
cmake --build ${LIBZMQ}
26+
cmake --build ${LIBZMQ} -- -j${JOBS}
2527
}
2628

2729
# build zeromq first
@@ -31,13 +33,13 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
3133
# build cppzmq
3234
pushd .
3335
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
34-
cmake --build ${CPPZMQ}
36+
cmake --build ${CPPZMQ} -- -j${JOBS}
3537
cd ${CPPZMQ}
36-
ctest -V
38+
ctest -V -j${JOBS}
3739
popd
3840

3941
# build cppzmq demo
4042
ZeroMQ_DIR=${LIBZMQ} cppzmq_DIR=${CPPZMQ} cmake -Hdemo -Bdemo/build
4143
cmake --build demo/build
4244
cd demo/build
43-
ctest
45+
ctest -V

0 commit comments

Comments
 (0)