From 702d2fcf537033d8fb73cc42d2ea1cd4d117e632 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Wed, 28 Mar 2018 11:44:20 +0200 Subject: [PATCH] Problem: no CI for cppzmq Solution: add travis-ci --- .travis.yml | 34 ++++++++++++++++++++++++++++++++++ ci_build.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .travis.yml create mode 100644 ci_build.sh 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"