forked from google/leveldb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
76 lines (67 loc) · 1.75 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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/
dist: xenial
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
env:
- BUILD_TYPE=Debug
- BUILD_TYPE=RelWithDebInfo
matrix:
exclude:
# GCC fails on recent Travis OSX images.
# https://github.com/travis-ci/travis-ci/issues/9640
- compiler: gcc
os: osx
addons:
apt:
sources:
- llvm-toolchain-xenial-7
- ubuntu-toolchain-r-test
packages:
- clang-7
- cmake
- gcc-8
- g++-8
- libgoogle-perftools-dev
- libkyotocabinet-dev
- libsnappy-dev
- libsqlite3-dev
- ninja-build
homebrew:
packages:
- crc32c
- gperftools
- kyotocabinet
- gcc@7
- ninja
- snappy
- sqlite3
before_install:
# The Travis VM image for Mac already has a link at /usr/local/include/c++,
# causing Homebrew's gcc 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 rm -f /usr/local/include/c++ ; fi
install:
# /usr/bin/gcc is stuck to old versions on both Linux and OSX.
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
- echo ${CC}
- echo ${CXX}
- ${CXX} --version
- cmake --version
before_script:
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- cmake --build .
- cd ..
script:
- 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"