10225501448 李度 10225101546 陈胤遒 10215501422 高宇菲
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

79 lignes
1.9 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: xenial
  6. osx_image: xcode10.2
  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. - llvm-toolchain-xenial-8
  20. - ubuntu-toolchain-r-test
  21. packages:
  22. - clang-8
  23. - cmake
  24. - gcc-8
  25. - g++-8
  26. - libgoogle-perftools-dev
  27. - libkyotocabinet-dev
  28. - libsnappy-dev
  29. - libsqlite3-dev
  30. - ninja-build
  31. homebrew:
  32. packages:
  33. - cmake
  34. - crc32c
  35. - gcc@8
  36. - gperftools
  37. - kyotocabinet
  38. - llvm@8
  39. - ninja
  40. - snappy
  41. - sqlite3
  42. update: true
  43. install:
  44. # The following Homebrew packages aren't linked by default, and need to be
  45. # prepended to the path explicitly.
  46. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
  47. export PATH="$(brew --prefix llvm)/bin:$PATH";
  48. fi
  49. # /usr/bin/gcc points to an older compiler on both Linux and macOS.
  50. - if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
  51. # /usr/bin/clang points to an older compiler on both Linux and macOS.
  52. #
  53. # Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
  54. # below don't work on macOS. Fortunately, the path change above makes the
  55. # default values (clang and clang++) resolve to the correct compiler on macOS.
  56. - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
  57. if [ "$CXX" = "clang++" ]; then export CXX="clang++-8" CC="clang-8"; fi;
  58. fi
  59. - echo ${CC}
  60. - echo ${CXX}
  61. - ${CXX} --version
  62. - cmake --version
  63. before_script:
  64. - mkdir -p build && cd build
  65. - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
  66. - cmake --build .
  67. - cd ..
  68. script:
  69. - cd build && ctest --verbose && cd ..
  70. - "if [ -f build/db_bench ] ; then build/db_bench ; fi"
  71. - "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
  72. - "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"