Skip to content

Commit

Permalink
Problem: libzmq pkg-config build not tested
Browse files Browse the repository at this point in the history
Solution: build and install libzmq using autogen tools.
  • Loading branch information
kurdybacha committed May 16, 2018
1 parent 6fe3d54 commit 8dfec11
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ matrix:
- os: linux
env: ZMQ_VERSION=4.2.5

# GCC default, draft disabled, older libzmq
# GCC default, draft disabled, older libzmq, libzmq with pkg-config
- os: linux
env: ZMQ_VERSION=4.2.4
sudo: true
env: ZMQ_VERSION=4.2.0 BUILD_TYPE=pkgconf

# GCC 7, draft enabled, latest libzmq
- os: linux
Expand All @@ -49,8 +50,6 @@ matrix:
# packages:
# - clang-5.0

sudo: false

before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pip install --user cpp-coveralls; fi

Expand Down
24 changes: 19 additions & 5 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -x
set -e

BUILD_TYPE=${BUILD_TYPE:-cmake}
LIBZMQ=${PWD}/libzmq-build
CPPZMQ=${PWD}/cppzmq-build
# Travis machines have 2 cores
Expand All @@ -19,11 +20,21 @@ install_zeromq() {
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz \
>zeromq.tar.gz
tar -xvzf zeromq.tar.gz
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
${ZEROMQ_CMAKE_FLAGS}
cmake --build ${LIBZMQ} -- -j${JOBS}
if [ "$BUILD_TYPE" = "cmake" ] ; then
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
${ZEROMQ_CMAKE_FLAGS}
cmake --build ${LIBZMQ} -- -j${JOBS}
elif [ "$BUILD_TYPE" = "pkgconf" ] ; then
pushd .
cd libzmq-${ZMQ_VERSION}
./autogen.sh &&
./configure &&
make VERBOSE=1 -j${JOBS}
sudo make install
popd
fi
}

# build zeromq first
Expand All @@ -34,6 +45,9 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
pushd .
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
cmake --build ${CPPZMQ} -- -j${JOBS}
if [ "$BUILD_TYPE" = "pkgconf" ] ; then
sudo cmake --build ${CPPZMQ} --target install
fi
cd ${CPPZMQ}
ctest -V -j${JOBS}
popd
Expand Down

0 comments on commit 8dfec11

Please sign in to comment.