2019-04-30 06:03:07 +08:00
|
|
|
# Build matrix / environment variables are explained on:
|
2018-03-10 07: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-15 08:09:03 +08:00
|
|
|
language: cpp
|
2019-09-30 11:33:37 +08:00
|
|
|
dist: bionic
|
|
|
|
osx_image: xcode10.3
|
2018-03-10 07:29:12 +08:00
|
|
|
|
2016-01-15 08:09:03 +08:00
|
|
|
compiler:
|
2019-04-30 06:03:07 +08:00
|
|
|
- gcc
|
|
|
|
- clang
|
2016-01-15 08:09:03 +08:00
|
|
|
os:
|
2019-04-30 06:03:07 +08:00
|
|
|
- linux
|
|
|
|
- osx
|
2018-03-10 07:29:12 +08:00
|
|
|
|
2018-03-17 10:10:13 +08:00
|
|
|
env:
|
2019-04-30 06:03:07 +08:00
|
|
|
- BUILD_TYPE=Debug
|
|
|
|
- BUILD_TYPE=RelWithDebInfo
|
2018-09-05 00:15:30 +08:00
|
|
|
|
2018-03-10 07:29:12 +08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
2019-09-30 11:33:37 +08:00
|
|
|
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
|
|
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
|
|
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
2018-03-10 07:29:12 +08:00
|
|
|
packages:
|
2019-09-30 11:33:37 +08:00
|
|
|
- clang-9
|
2018-03-17 10:10:13 +08:00
|
|
|
- cmake
|
2019-05-25 05:25:42 +08:00
|
|
|
- gcc-9
|
|
|
|
- g++-9
|
2018-03-10 07:29:12 +08:00
|
|
|
- libgoogle-perftools-dev
|
|
|
|
- libkyotocabinet-dev
|
|
|
|
- libsnappy-dev
|
|
|
|
- libsqlite3-dev
|
2019-01-03 09:58:33 +08:00
|
|
|
- ninja-build
|
|
|
|
homebrew:
|
|
|
|
packages:
|
2019-04-30 06:03:07 +08:00
|
|
|
- cmake
|
2019-01-03 09:58:33 +08:00
|
|
|
- crc32c
|
2019-05-25 05:25:42 +08:00
|
|
|
- gcc@9
|
2019-01-03 09:58:33 +08:00
|
|
|
- gperftools
|
2019-09-30 11:33:37 +08:00
|
|
|
- kyoto-cabinet
|
|
|
|
- llvm@9
|
2019-01-03 09:58:33 +08:00
|
|
|
- ninja
|
|
|
|
- snappy
|
|
|
|
- sqlite3
|
2019-04-30 06:03:07 +08:00
|
|
|
update: true
|
2019-01-03 09:58:33 +08:00
|
|
|
|
|
|
|
install:
|
2019-04-30 06:03:07 +08:00
|
|
|
# The following Homebrew packages aren't linked by default, and need to be
|
|
|
|
# prepended to the path explicitly.
|
2019-09-30 11:33:37 +08:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
2019-04-30 06:03:07 +08:00
|
|
|
export PATH="$(brew --prefix llvm)/bin:$PATH";
|
|
|
|
fi
|
|
|
|
# /usr/bin/gcc points to an older compiler on both Linux and macOS.
|
2019-05-25 05:25:42 +08:00
|
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi
|
2019-04-30 06:03:07 +08: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-30 11:33:37 +08:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
|
|
if [ "$CXX" = "clang++" ]; then export CXX="clang++-9" CC="clang-9"; fi;
|
2019-04-30 06:03:07 +08:00
|
|
|
fi
|
2018-03-10 07:29:12 +08:00
|
|
|
- echo ${CC}
|
|
|
|
- echo ${CXX}
|
|
|
|
- ${CXX} --version
|
2018-03-17 10:10:13 +08:00
|
|
|
- cmake --version
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- mkdir -p build && cd build
|
2019-01-03 09:58:33 +08:00
|
|
|
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
2019-11-04 13:38:38 +08:00
|
|
|
-DCMAKE_INSTALL_PREFIX=$HOME/.local
|
2018-03-17 10:10:13 +08:00
|
|
|
- cmake --build .
|
|
|
|
- cd ..
|
2018-03-10 07:29:12 +08:00
|
|
|
|
2016-01-15 08:09:03 +08:00
|
|
|
script:
|
2019-03-05 10:27:03 +08:00
|
|
|
- cd build && ctest --verbose && cd ..
|
2018-03-17 10:10:13 +08: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-04 13:38:38 +08:00
|
|
|
- cd build && cmake --build . --target install
|