Skip to content

Commit

Permalink
Problem: Only one version of libzmq tested
Browse files Browse the repository at this point in the history
Solution: use libzmq 4.2.4, last two releases in use now.
  • Loading branch information
kurdybacha committed May 13, 2018
1 parent a5578a6 commit 21350a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ addons:

env:
matrix:
# - ZMQ_BUILD_TYPE=cmake DRAFT=enabled
- ZMQ_BUILD_TYPE=cmake ZMQ_VERSION=4.2.5
- ZMQ_BUILD_TYPE=pkgconf ZMQ_VERSION=4.2.0
- ZMQ_VERSION=4.2.5
- ZMQ_VERSION=4.2.4

matrix:
include:
# - env: ZMQ_BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
# os: linux
# addons:
# apt:
Expand All @@ -39,14 +38,14 @@ matrix:
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" ZMQ_BUILD_TYPE=cmake ZMQ_VERSION=4.2.5 DRAFT=1
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" ZMQ_VERSION=4.2.5 DRAFT=1

sudo: required

before_install:
- pip install --user cpp-coveralls

# Build and check this project according to the ZMQ_BUILD_TYPE
# Build and check this project
script:
- eval "${MATRIX_EVAL}"
- ./ci_build.sh
Expand Down
28 changes: 8 additions & 20 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,32 @@
set -x
set -e

LIBZMQ=${PWD}/libzmq-build
CPPZMQ=${PWD}/cppzmq-build

if [ "$DRAFT" = "1" ] ; then
# if we enable drafts during the libzmq cmake build, the pkgconfig
# data should set ZMQ_BUILD_DRAFT_API in dependent builds, but this
# does not appear to work (TODO)
export ZEROMQ_CMAKE_FLAGS="-DENABLE_DRAFTS=ON"
fi

LIBZMQ=${PWD}/libzmq-build
CPPZMQ=${PWD}/cppzmq-build
install_zeromq() {
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz \
>zeromq.tar.gz
tar -xvzf zeromq.tar.gz
if [ "${ZMQ_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}
elif [ "${ZMQ_BUILD_TYPE}" = "pkgconf" ] ; then
pushd .
cd libzmq-${ZMQ_VERSION}
./autogen.sh
./configure
sudo make VERBOSE=1 -j5 install
popd
else
echo "Unsupported build type ${ZMQ_BUILD_TYPE}."
exit 1
fi
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
${ZEROMQ_CMAKE_FLAGS}
cmake --build ${LIBZMQ}
}

# build zeromq first

if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi

# build cppzmq
# for pkgconf ZMQ_BUILD_TYPE ZeroMQ_DIR is invalid but it should still work
pushd .
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
cmake --build ${CPPZMQ}
Expand Down

0 comments on commit 21350a3

Please sign in to comment.