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-09-29 20:33:37 -07:00
|
|
|
dist: bionic
|
|
|
|
osx_image: xcode10.3
|
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:
|
2020-04-13 15:21:41 +00:00
|
|
|
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
2019-09-29 20:33:37 -07:00
|
|
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
|
|
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
2018-03-09 15:29:12 -08:00
|
|
|
packages:
|
2020-04-13 15:21:41 +00:00
|
|
|
- clang-10
|
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
|
2019-09-29 20:33:37 -07:00
|
|
|
- kyoto-cabinet
|
2020-04-13 15:21:41 +00:00
|
|
|
- llvm@10
|
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.
|
2019-09-29 20:33:37 -07:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
2019-04-29 15:03:07 -07:00
|
|
|
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.
|
2019-09-29 20:33:37 -07:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
2020-04-13 15:21:41 +00:00
|
|
|
if [ "$CXX" = "clang++" ]; then export CXX="clang++-10" CC="clang-10"; fi;
|
2019-04-29 15:03:07 -07:00
|
|
|
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
|
2019-11-03 21:38:38 -08:00
|
|
|
-DCMAKE_INSTALL_PREFIX=$HOME/.local
|
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"
|
2019-11-03 21:38:38 -08:00
|
|
|
- cd build && cmake --build . --target install
|