Commit dcb62b58 authored by ciody's avatar ciody

restructure travis configuration

parent 6e3bb2c3
language: cpp language: cpp
sudo: required
dist: trusty
script:
- mkdir build
- cd build
- cmake -DPISTACHE_BUILD_EXAMPLES=true -DPISTACHE_BUILD_TESTS=true ..
- make all test ARGS="-V"
compiler:
- clang
- gcc-5
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-get install -qq libyajl-dev libxml2-dev libxqilla-dev
- if [ "$CXX" = "clang++" ]; then sudo apt-get install -qq libstdc++-5-dev; fi
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-5; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
branches: branches:
only: only:
- master - master
matrix:
include:
- os: linux
compiler: clang
addons:
apt:
packages: ['clang-3.8', 'libstdc++-6-dev']
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
env: COMPILER='clang++-3.8' CPP14=1
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
which cmake || brew install cmake;
fi
before_script:
- export CXX=${COMPILER}
- cd ${TRAVIS_BUILD_DIR}
# Regenerate single header file, so it is tested in the examples...
- python scripts/generateSingleHeader.py
# Use Debug builds for building and running examples
- cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -DPISTACHE_BUILD_EXAMPLES=true -DPISTACHE_BUILD_TESTS=true
# Release build
- cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release
script:
- # Go to debug build
- cd Build-Debug
- make -j 2 all test ARGS="-V"
- # Go to release build
- cd ../Build-Release
- make -j 2
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment