10225501448 李度 10225101546 陈胤遒 10215501422 高宇菲

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