c30ee8631c
instead make sure that the Travis build uses Boost 1.68; also upgraded Google.Benchmark dependency to v1.2.0.
119 lines
3.7 KiB
YAML
119 lines
3.7 KiB
YAML
sudo: required
|
|
dist: trusty
|
|
language: cpp
|
|
script: cmake
|
|
|
|
matrix:
|
|
include:
|
|
# OSX
|
|
# - env: ASAN=on MAC_OSX=true
|
|
# os: osx
|
|
# osx_image: xcode7.3
|
|
# compiler: clang
|
|
#
|
|
# - env: ASAN=on MAC_OSX=true
|
|
# os: osx
|
|
# osx_image: xcode8
|
|
# compiler: clang
|
|
|
|
- env: ASAN=on MAC_OSX=true
|
|
os: osx
|
|
osx_image: xcode8.1
|
|
compiler: clang
|
|
|
|
- env: ASAN=on MAC_OSX=true
|
|
os: osx
|
|
osx_image: xcode8.2
|
|
compiler: clang
|
|
|
|
# Gcc
|
|
- env: GCC_VERSION=6 ASAN=off
|
|
os: linux
|
|
compiler: gcc-6
|
|
addons: &gcc6
|
|
apt:
|
|
packages:
|
|
- g++-6
|
|
- valgrind
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- env: GCC_VERSION=7 ASAN=off
|
|
os: linux
|
|
compiler: gcc-7
|
|
addons: &gcc7
|
|
apt:
|
|
packages:
|
|
- g++-7
|
|
- valgrind
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- env: GCC_VERSION=8 ASAN=off
|
|
os: linux
|
|
compiler: gcc-8
|
|
addons: &gcc8
|
|
apt:
|
|
packages:
|
|
- g++-8
|
|
- valgrind
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
|
|
install:
|
|
- export CHECKOUT_PATH=`pwd`;
|
|
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
|
|
- if [ -n "$CLANG_VERSION" ]; then export CXXFLAGS="${CXXFLAGS} -stdlib=libstdc++" CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
|
|
# - if [[ "$CLANG_VERSION" == "3.4" ]]; then export CXX="/usr/local/clang-3.4/bin/clang++" CC="/usr/local/clang-3.4/bin/clang"; fi
|
|
# Setup deps directory
|
|
- export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
|
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
|
|
- mkdir usr
|
|
- export PATH=${DEPS_DIR}/usr/bin:${PATH}
|
|
# Install cmake
|
|
- |
|
|
if [[ "$MAC_OSX" == "true" ]]; then
|
|
export CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.0-Darwin-x86_64.tar.gz"
|
|
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=3 -xz -C usr
|
|
else
|
|
export CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.0-Linux-x86_64.tar.gz"
|
|
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C usr
|
|
fi
|
|
- echo $PATH
|
|
- travis_retry wget --no-check-certificate --quiet https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2
|
|
- tar xjf boost_1_68_0.tar.bz2
|
|
# Show compiler info
|
|
- $CXX --version
|
|
- which $CXX
|
|
- $CC --version
|
|
- which $CC
|
|
- which cmake
|
|
- cmake --version
|
|
# Add warnings
|
|
- export CXXFLAGS="${CXXFLAGS} -Wall"
|
|
|
|
script:
|
|
- cd $CHECKOUT_PATH
|
|
- export ASANVARIANT="false"
|
|
- if [[ "$ASAN" == "on" ]]; then export ASANVARIANT="true"; fi
|
|
- |
|
|
for build_type in Debug Release; do
|
|
for asan_type in $ASANVARIANT; do
|
|
build_dir="build-$build_type-asan-$asan_type"
|
|
mkdir $build_dir
|
|
cd $build_dir
|
|
if [[ "$asan_type" == "true" ]]; then
|
|
CXXFLAGS="$CXXFLAGS" cmake -DUSE_ASAN=true -DBOOST_ROOT=${DEPS_DIR}/boost_1_68_0 -DCMAKE_BUILD_TYPE=$build_type ..
|
|
else
|
|
cmake -DBOOST_ROOT=${DEPS_DIR}/boost_1_68_0 -DCMAKE_BUILD_TYPE=$build_type ..
|
|
fi
|
|
VERBOSE=1 make -j4 && CTEST_OUTPUT_ON_FAILURE=1 CTEST_PARALLEL_LEVEL=4 ASAN_OPTIONS=alloc_dealloc_mismatch=0 make check
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1
|
|
fi
|
|
cd ..
|
|
rm -rf $build_dir
|
|
done
|
|
done
|