.travis.yml
1 # Build matrix / environment variables are explained on: 2 # http://about.travis-ci.org/docs/user/build-configuration/ 3 # This file can be validated on: http://lint.travis-ci.org/ 4 5 language: cpp 6 dist: bionic 7 osx_image: xcode10.3 8 9 compiler: 10 - gcc 11 - clang 12 os: 13 - linux 14 - osx 15 16 env: 17 - BUILD_TYPE=Debug 18 - BUILD_TYPE=RelWithDebInfo 19 20 addons: 21 apt: 22 sources: 23 - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' 24 key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' 25 - sourceline: 'ppa:ubuntu-toolchain-r/test' 26 packages: 27 - clang-9 28 - cmake 29 - gcc-9 30 - g++-9 31 - libgoogle-perftools-dev 32 - libkyotocabinet-dev 33 - libsnappy-dev 34 - libsqlite3-dev 35 - ninja-build 36 homebrew: 37 packages: 38 - cmake 39 - crc32c 40 - gcc@9 41 - gperftools 42 - kyoto-cabinet 43 - llvm@9 44 - ninja 45 - snappy 46 - sqlite3 47 update: true 48 49 install: 50 # The following Homebrew packages aren't linked by default, and need to be 51 # prepended to the path explicitly. 52 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then 53 export PATH="$(brew --prefix llvm)/bin:$PATH"; 54 fi 55 # /usr/bin/gcc points to an older compiler on both Linux and macOS. 56 - if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi 57 # /usr/bin/clang points to an older compiler on both Linux and macOS. 58 # 59 # Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values 60 # below don't work on macOS. Fortunately, the path change above makes the 61 # default values (clang and clang++) resolve to the correct compiler on macOS. 62 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then 63 if [ "$CXX" = "clang++" ]; then export CXX="clang++-9" CC="clang-9"; fi; 64 fi 65 - echo ${CC} 66 - echo ${CXX} 67 - ${CXX} --version 68 - cmake --version 69 70 before_script: 71 - mkdir -p build && cd build 72 - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE 73 -DCMAKE_INSTALL_PREFIX=$HOME/.local 74 - cmake --build . 75 - cd .. 76 77 script: 78 - cd build && ctest --verbose && cd .. 79 - "if [ -f build/db_bench ] ; then build/db_bench ; fi" 80 - "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi" 81 - "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi" 82 - cd build && cmake --build . --target install