2018-03-09 15: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/
|
|
|
|
|
2019-01-02 17:58:33 -08:00
|
|
|
dist: xenial
|
2016-01-14 16:09:03 -08:00
|
|
|
language: cpp
|
2018-03-09 15:29:12 -08:00
|
|
|
|
2016-01-14 16:09:03 -08:00
|
|
|
compiler:
|
2018-03-09 15:29:12 -08:00
|
|
|
- gcc
|
|
|
|
- clang
|
2016-01-14 16:09:03 -08:00
|
|
|
os:
|
2018-03-09 15:29:12 -08:00
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2018-03-16 19:10:13 -07:00
|
|
|
env:
|
|
|
|
- BUILD_TYPE=Debug
|
|
|
|
- BUILD_TYPE=RelWithDebInfo
|
|
|
|
|
2018-09-04 09:15:30 -07: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-09 15:29:12 -08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
2019-01-02 17:58:33 -08:00
|
|
|
- llvm-toolchain-xenial-7
|
2018-03-09 15:29:12 -08:00
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
2019-01-02 17:58:33 -08:00
|
|
|
- clang-7
|
2018-03-16 19:10:13 -07:00
|
|
|
- cmake
|
2019-01-02 17:58:33 -08:00
|
|
|
- gcc-8
|
|
|
|
- g++-8
|
2018-03-09 15:29:12 -08:00
|
|
|
- libgoogle-perftools-dev
|
|
|
|
- libkyotocabinet-dev
|
|
|
|
- libsnappy-dev
|
|
|
|
- libsqlite3-dev
|
2019-01-02 17:58:33 -08:00
|
|
|
- ninja-build
|
|
|
|
homebrew:
|
|
|
|
packages:
|
|
|
|
- crc32c
|
|
|
|
- gperftools
|
|
|
|
- kyotocabinet
|
|
|
|
- gcc@7
|
|
|
|
- ninja
|
|
|
|
- snappy
|
|
|
|
- sqlite3
|
2018-03-09 15:29:12 -08:00
|
|
|
|
2019-01-02 17:58:33 -08:00
|
|
|
before_install:
|
2018-03-09 15:29:12 -08:00
|
|
|
# The Travis VM image for Mac already has a link at /usr/local/include/c++,
|
2019-01-02 17:58:33 -08:00
|
|
|
# causing Homebrew's gcc installation to error out. This was reported to
|
2018-03-09 15:29:12 -08:00
|
|
|
# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
|
|
|
|
# removing the link emerged as a workaround.
|
2019-01-02 17:58:33 -08:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then rm -f /usr/local/include/c++ ; fi
|
|
|
|
|
|
|
|
install:
|
2018-03-09 15:29:12 -08:00
|
|
|
# /usr/bin/gcc is stuck to old versions on both Linux and OSX.
|
2019-01-02 17:58:33 -08:00
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
|
2018-03-09 15:29:12 -08:00
|
|
|
- echo ${CC}
|
|
|
|
- echo ${CXX}
|
|
|
|
- ${CXX} --version
|
2018-03-16 19:10:13 -07:00
|
|
|
- cmake --version
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- mkdir -p build && cd build
|
2019-01-02 17:58:33 -08:00
|
|
|
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
2018-03-16 19:10:13 -07:00
|
|
|
- cmake --build .
|
|
|
|
- cd ..
|
2018-03-09 15:29:12 -08:00
|
|
|
|
2016-01-14 16:09:03 -08:00
|
|
|
script:
|
2018-03-16 19:10:13 -07: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"
|