作者: 韩晨旭 10225101440 李畅 10225102463
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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