2019-04-29 15:03:07 -07:00
|
|
|
# Build matrix / environment variables are explained on:
|
2018-03-09 15:29:12 -08:00
|
|
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
|
|
|
# This file can be validated on: http://lint.travis-ci.org/
|
|
|
|
|
2016-01-14 16:09:03 -08:00
|
|
|
language: cpp
|
2019-04-29 15:03:07 -07:00
|
|
|
dist: xenial
|
|
|
|
osx_image: xcode10.2
|
2018-03-09 15:29:12 -08:00
|
|
|
|
2016-01-14 16:09:03 -08:00
|
|
|
compiler:
|
2019-04-29 15:03:07 -07:00
|
|
|
- gcc
|
|
|
|
- clang
|
2016-01-14 16:09:03 -08:00
|
|
|
os:
|
2019-04-29 15:03:07 -07:00
|
|
|
- linux
|
|
|
|
- osx
|
2018-03-09 15:29:12 -08:00
|
|
|
|
2018-03-16 19:10:13 -07:00
|
|
|
env:
|
2019-04-29 15:03:07 -07:00
|
|
|
- BUILD_TYPE=Debug
|
|
|
|
- BUILD_TYPE=RelWithDebInfo
|
2018-09-04 09:15:30 -07:00
|
|
|
|
2018-03-09 15:29:12 -08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
2019-04-29 15:03:07 -07:00
|
|
|
- llvm-toolchain-xenial-8
|
2018-03-09 15:29:12 -08:00
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
2019-04-29 15:03:07 -07:00
|
|
|
- clang-8
|
2018-03-16 19:10:13 -07:00
|
|
|
- cmake
|
2019-05-24 14:25:42 -07:00
|
|
|
- gcc-9
|
|
|
|
- g++-9
|
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:
|
2019-04-29 15:03:07 -07:00
|
|
|
- cmake
|
2019-01-02 17:58:33 -08:00
|
|
|
- crc32c
|
2019-05-24 14:25:42 -07:00
|
|
|
- gcc@9
|
2019-01-02 17:58:33 -08:00
|
|
|
- gperftools
|
|
|
|
- kyotocabinet
|
2019-04-29 15:03:07 -07:00
|
|
|
- llvm@8
|
2019-01-02 17:58:33 -08:00
|
|
|
- ninja
|
|
|
|
- snappy
|
|
|
|
- sqlite3
|
2019-04-29 15:03:07 -07:00
|
|
|
update: true
|
2019-01-02 17:58:33 -08:00
|
|
|
|
|
|
|
install:
|
2019-04-29 15:03:07 -07:00
|
|
|
# The following Homebrew packages aren't linked by default, and need to be
|
|
|
|
# prepended to the path explicitly.
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
export PATH="$(brew --prefix llvm)/bin:$PATH";
|
|
|
|
fi
|
|
|
|
# /usr/bin/gcc points to an older compiler on both Linux and macOS.
|
2019-05-24 14:25:42 -07:00
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi
|
2019-04-29 15:03:07 -07:00
|
|
|
# /usr/bin/clang points to an older compiler on both Linux and macOS.
|
|
|
|
#
|
|
|
|
# Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
|
|
|
|
# below don't work on macOS. Fortunately, the path change above makes the
|
|
|
|
# default values (clang and clang++) resolve to the correct compiler on macOS.
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
|
|
|
if [ "$CXX" = "clang++" ]; then export CXX="clang++-8" CC="clang-8"; fi;
|
|
|
|
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:
|
2019-03-04 18:27:03 -08:00
|
|
|
- cd build && ctest --verbose && cd ..
|
2018-03-16 19:10:13 -07:00
|
|
|
- "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"
|