提供基本的ttl测试用例
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 regels
2.2 KiB

  1. # Build matrix / environment variable 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. sudo: false
  5. dist: trusty
  6. language: cpp
  7. compiler:
  8. - gcc
  9. - clang
  10. os:
  11. - linux
  12. - osx
  13. env:
  14. - BUILD_TYPE=Debug
  15. - BUILD_TYPE=RelWithDebInfo
  16. matrix:
  17. exclude:
  18. # GCC fails on recent Travis OSX images.
  19. # https://github.com/travis-ci/travis-ci/issues/9640
  20. - compiler: gcc
  21. os: osx
  22. addons:
  23. apt:
  24. # List of whitelisted in travis packages for ubuntu-trusty can be found here:
  25. # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-trusty
  26. # List of whitelisted in travis apt-sources:
  27. # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
  28. sources:
  29. - ubuntu-toolchain-r-test
  30. - llvm-toolchain-trusty-5.0
  31. packages:
  32. - cmake
  33. - gcc-7
  34. - g++-7
  35. - clang-5.0
  36. - libgoogle-perftools-dev
  37. - libkyotocabinet-dev
  38. - libsnappy-dev
  39. - libsqlite3-dev
  40. install:
  41. # Travis doesn't have a DSL for installing homebrew packages yet. Status tracked
  42. # in https://github.com/travis-ci/travis-ci/issues/5377
  43. # The Travis VM image for Mac already has a link at /usr/local/include/c++,
  44. # causing Homebrew's gcc@7 installation to error out. This was reported to
  45. # Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
  46. # removing the link emerged as a workaround.
  47. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
  48. brew update;
  49. if [ -L /usr/local/include/c++ ]; then rm /usr/local/include/c++; fi;
  50. brew install gcc@7;
  51. brew install crc32c gperftools kyoto-cabinet snappy sqlite3;
  52. fi
  53. # /usr/bin/gcc is stuck to old versions on both Linux and OSX.
  54. - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
  55. - echo ${CC}
  56. - echo ${CXX}
  57. - ${CXX} --version
  58. - cmake --version
  59. before_script:
  60. - mkdir -p build && cd build
  61. - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
  62. - cmake --build .
  63. - cd ..
  64. script:
  65. - cd build ; ctest --verbose ; cd ..
  66. - "if [ -f build/db_bench ] ; then build/db_bench ; fi"
  67. - "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
  68. - "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"