mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-05-02 23:42:32 +02:00
Merge pull request #230 from kurdybacha/osx-build
Problem: OSX build not enabled in Travis
This commit is contained in:
commit
6fe3d54359
71
.travis.yml
71
.travis.yml
@ -2,35 +2,35 @@
|
||||
|
||||
language: cpp
|
||||
|
||||
os:
|
||||
- linux
|
||||
#- osx
|
||||
|
||||
dist: trusty
|
||||
|
||||
cache: ccache
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
env:
|
||||
matrix:
|
||||
# - BUILD_TYPE=cmake DRAFT=enabled
|
||||
- BUILD_TYPE=cmake ZMQ_VERSION=4.2.5
|
||||
- BUILD_TYPE=cmake ZMQ_VERSION=4.2.0
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
|
||||
# os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-trusty-5.0
|
||||
# packages:
|
||||
# - clang-5.0
|
||||
##########################################################
|
||||
# Clang on OSX
|
||||
# Travis takes longer to start OSX instances,
|
||||
# so leaving it first for the overall build to be faster.
|
||||
##########################################################
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode9.1
|
||||
compiler: clang
|
||||
env: ZMQ_VERSION=4.2.5 DRAFT=1
|
||||
|
||||
##########################################################
|
||||
# GCC on Linux
|
||||
##########################################################
|
||||
|
||||
# GCC default, draft disabled, latest libzmq
|
||||
- os: linux
|
||||
env: ZMQ_VERSION=4.2.5
|
||||
|
||||
# GCC default, draft disabled, older libzmq
|
||||
- os: linux
|
||||
env: ZMQ_VERSION=4.2.4
|
||||
|
||||
# GCC 7, draft enabled, latest libzmq
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
@ -39,17 +39,26 @@ matrix:
|
||||
packages:
|
||||
- g++-7
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" 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
|
||||
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=/usr/local/clang-5.0.0/bin/clang-format
|
||||
# os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-trusty-5.0
|
||||
# packages:
|
||||
# - clang-5.0
|
||||
|
||||
sudo: required
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- pip install --user cpp-coveralls
|
||||
|
||||
# Build and check this project according to the BUILD_TYPE
|
||||
script:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pip install --user cpp-coveralls; fi
|
||||
|
||||
# Build and check this project
|
||||
script:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- cmake --version
|
||||
- ./ci_build.sh
|
||||
|
||||
after_success:
|
||||
- coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/" -E ".*demo/" -E ".*libzmq/"
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then coveralls --root . -E ".*external.*" -E ".*CMakeFiles.*" -E ".*tests/" -E ".*demo/" -E ".*libzmq/"; fi
|
||||
|
@ -23,18 +23,18 @@ Supported platforms
|
||||
|
||||
- Only a subset of the platforms that are supported by libzmq itself are supported. Some features already require a compiler supporting C++11. In the future, probably all features will require C++11. To build and run the tests, cmake and googletest are required.
|
||||
- Tested libzmq versions are
|
||||
- 4.2.0 (without DRAFT API)
|
||||
- 4.2.4 (without DRAFT API)
|
||||
- 4.2.5 (with and without DRAFT API)
|
||||
- Platforms with full support (i.e. CI executing build and tests)
|
||||
- Ubuntu 14.04 x64 (with gcc 4.8.4) (without DRAFT API only)
|
||||
- Ubuntu 14.04 x64 (with gcc 7.3.0)
|
||||
- Visual Studio 2015 x86
|
||||
- Visual Studio 2017 x86
|
||||
- OSX (with clang xcode9.1) (without DRAFT API)
|
||||
- Additional platforms that are known to work:
|
||||
- We have no current reports on additional platforms that are known to work yet. Please add your platform here. If CI can be provided for them with a cloud-based CI service working with GitHub, you are invited to add CI, and make it possible to be included in the list above.
|
||||
- Additional platforms that probably work:
|
||||
- Any platform supported by libzmq that provides a sufficiently recent gcc (4.8.1 or newer) or clang (3.3 or newer)
|
||||
- MacOS X
|
||||
- Visual Studio 2012+ x86/x64
|
||||
|
||||
Contribution policy
|
||||
|
50
ci_build.sh
50
ci_build.sh
@ -3,28 +3,27 @@
|
||||
set -x
|
||||
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
|
||||
# data should set ZMQ_BUILD_DRAFT_API in dependent builds, but this
|
||||
# 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
|
||||
|
||||
install_zeromq() {
|
||||
pushd .
|
||||
|
||||
mkdir libzmq
|
||||
cd libzmq
|
||||
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
|
||||
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz \
|
||||
>zeromq.tar.gz
|
||||
tar -xvzf zeromq.tar.gz
|
||||
cd libzmq-${ZMQ_VERSION}
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. ${ZEROMQ_CMAKE_FLAGS}
|
||||
sudo make -j4 install
|
||||
|
||||
popd
|
||||
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}
|
||||
}
|
||||
|
||||
# build zeromq first
|
||||
@ -32,20 +31,15 @@ install_zeromq() {
|
||||
if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
|
||||
|
||||
# build cppzmq
|
||||
|
||||
pushd .
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. ${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build .
|
||||
sudo make -j4 install
|
||||
make test ARGS="-V"
|
||||
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build ${CPPZMQ} -- -j${JOBS}
|
||||
cd ${CPPZMQ}
|
||||
ctest -V -j${JOBS}
|
||||
popd
|
||||
|
||||
# build cppzmq demo
|
||||
cd demo
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
ctest
|
||||
ZeroMQ_DIR=${LIBZMQ} cppzmq_DIR=${CPPZMQ} cmake -Hdemo -Bdemo/build
|
||||
cmake --build demo/build
|
||||
cd demo/build
|
||||
ctest -V
|
||||
|
@ -12,7 +12,7 @@ add_executable(
|
||||
|
||||
target_link_libraries(
|
||||
demo
|
||||
libzmq
|
||||
cppzmq
|
||||
)
|
||||
|
||||
add_test(
|
||||
|
@ -33,11 +33,9 @@ add_executable(
|
||||
target_link_libraries(
|
||||
unit_tests
|
||||
gtest_main
|
||||
libzmq
|
||||
cppzmq
|
||||
)
|
||||
|
||||
target_include_directories(unit_tests PRIVATE ..)
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
unit
|
||||
|
Loading…
x
Reference in New Issue
Block a user