2018-03-10 07:29:12 +08:00
|
|
|
# Build matrix / environment variable are explained on:
|
|
|
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
|
|
|
# This file can be validated on: http://lint.travis-ci.org/
|
|
|
|
|
|
|
|
sudo: false
|
|
|
|
dist: trusty
|
2016-01-15 08:09:03 +08:00
|
|
|
language: cpp
|
2018-03-10 07:29:12 +08:00
|
|
|
|
2016-01-15 08:09:03 +08:00
|
|
|
compiler:
|
2018-03-10 07:29:12 +08:00
|
|
|
- gcc
|
|
|
|
- clang
|
2016-01-15 08:09:03 +08:00
|
|
|
os:
|
2018-03-10 07:29:12 +08:00
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2018-03-17 10:10:13 +08:00
|
|
|
env:
|
|
|
|
- BUILD_TYPE=Debug
|
|
|
|
- BUILD_TYPE=RelWithDebInfo
|
|
|
|
|
2018-09-05 00:15:30 +08:00
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
# GCC fails on recent Travis OSX images.
|
|
|
|
# https://github.com/travis-ci/travis-ci/issues/9640
|
|
|
|
- compiler: gcc
|
|
|
|
os: osx
|
|
|
|
|
2018-03-10 07:29:12 +08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
# List of whitelisted in travis packages for ubuntu-trusty can be found here:
|
|
|
|
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-trusty
|
|
|
|
# List of whitelisted in travis apt-sources:
|
|
|
|
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- llvm-toolchain-trusty-5.0
|
|
|
|
packages:
|
2018-03-17 10:10:13 +08:00
|
|
|
- cmake
|
2018-03-10 07:29:12 +08:00
|
|
|
- gcc-7
|
|
|
|
- g++-7
|
|
|
|
- clang-5.0
|
|
|
|
- libgoogle-perftools-dev
|
|
|
|
- libkyotocabinet-dev
|
|
|
|
- libsnappy-dev
|
|
|
|
- libsqlite3-dev
|
|
|
|
|
|
|
|
install:
|
|
|
|
# Travis doesn't have a DSL for installing homebrew packages yet. Status tracked
|
|
|
|
# in https://github.com/travis-ci/travis-ci/issues/5377
|
|
|
|
# The Travis VM image for Mac already has a link at /usr/local/include/c++,
|
|
|
|
# causing Homebrew's gcc@7 installation to error out. This was reported to
|
|
|
|
# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
|
|
|
|
# removing the link emerged as a workaround.
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
brew update;
|
|
|
|
if [ -L /usr/local/include/c++ ]; then rm /usr/local/include/c++; fi;
|
|
|
|
brew install gcc@7;
|
|
|
|
brew install crc32c gperftools kyoto-cabinet snappy sqlite3;
|
|
|
|
fi
|
|
|
|
# /usr/bin/gcc is stuck to old versions on both Linux and OSX.
|
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
|
|
|
|
- echo ${CC}
|
|
|
|
- echo ${CXX}
|
|
|
|
- ${CXX} --version
|
2018-03-17 10:10:13 +08:00
|
|
|
- cmake --version
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- mkdir -p build && cd build
|
|
|
|
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
|
|
|
- cmake --build .
|
|
|
|
- cd ..
|
2018-03-10 07:29:12 +08:00
|
|
|
|
2016-01-15 08:09:03 +08:00
|
|
|
script:
|
2018-03-17 10:10:13 +08:00
|
|
|
- cd build ; ctest --verbose ; cd ..
|
|
|
|
- "if [ -f build/db_bench ] ; then build/db_bench ; fi"
|
|
|
|
- "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
|
|
|
|
- "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"
|