10225501448 李度 10225101546 陈胤遒 10215501422 高宇菲
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

88 wiersze
2.3 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: xcode12.2
  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-10
  31. - g++-10
  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@10
  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++-10" CC="gcc-10"; 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