Problem: no CI for cppzmq

Solution: add travis-ci
This commit is contained in:
Simon Giesecke 2018-03-28 11:44:20 +02:00
parent 52c606ed86
commit 702d2fcf53
2 changed files with 72 additions and 0 deletions

34
.travis.yml Normal file
View File

@ -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

38
ci_build.sh Normal file
View File

@ -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"