提供基本的ttl测试用例
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

82 linhas
2.1 KiB

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