小组成员:10215300402-朱维清 & 10222140408 谷杰
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.

88 lines
2.2 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: xcode11.3
  7. compiler:
  8. - gcc
  9. - clang
  10. os:
  11. - linux
  12. - osx
  13. env:
  14. - BUILD_TYPE=Debug
  15. - BUILD_TYPE=RelWithDebInfo
  16. jobs:
  17. allow_failures:
  18. # Homebrew's GCC is currently broken on XCode 11.
  19. - compiler: gcc
  20. os: osx
  21. addons:
  22. apt:
  23. sources:
  24. - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
  25. key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
  26. - sourceline: 'ppa:ubuntu-toolchain-r/test'
  27. packages:
  28. - clang-10
  29. - cmake
  30. - gcc-9
  31. - g++-9
  32. - libgoogle-perftools-dev
  33. - libkyotocabinet-dev
  34. - libsnappy-dev
  35. - libsqlite3-dev
  36. - ninja-build
  37. homebrew:
  38. packages:
  39. - cmake
  40. - crc32c
  41. - gcc@9
  42. - gperftools
  43. - kyoto-cabinet
  44. - llvm@10
  45. - ninja
  46. - snappy
  47. - sqlite3
  48. update: true
  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++-10" CC="clang-10"; fi;
  64. fi
  65. - echo ${CC}
  66. - echo ${CXX}
  67. - ${CXX} --version
  68. - cmake --version
  69. before_script:
  70. - mkdir -p build && cd build
  71. - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
  72. -DCMAKE_INSTALL_PREFIX=$HOME/.local
  73. - cmake --build .
  74. - cd ..
  75. script:
  76. - cd build && ctest --verbose && cd ..
  77. - "if [ -f build/db_bench ] ; then build/db_bench ; fi"
  78. - "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
  79. - "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"
  80. - cd build && cmake --build . --target install