diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fb1269d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +# Travis CI script + +language: c + +os: +- linux +#- osx + +dist: trusty + +cache: ccache + +env: + matrix: +# - BUILD_TYPE=cmake DRAFT=enabled + - BUILD_TYPE=cmake + +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 + +sudo: required + +# Build and check this project according to the BUILD_TYPE +script: + - chmod +x ci_build.sh + - ./ci_build.sh diff --git a/ci_build.sh b/ci_build.sh new file mode 100644 index 0000000..d10224d --- /dev/null +++ b/ci_build.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -x + +install_zeromq() { + pushd . + + mkdir libzmq + cd libzmq + curl -L https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz >zeromq.tar.gz + tar -xvzf zeromq.tar.gz + cd zeromq-${ZMQ_VERSION} + + mkdir build + cd build + cmake .. + sudo make -j4 install + + popd +} + +# build zeromq first + +if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi + +# build cppzmq + +mkdir build +cd build +cmake .. +sudo make -j4 install + +# build cppzmq tests +# cd tests +# mkdir build +# cd build +# cmake .. +# make -j5 test ARGS="-V"