小组成员:谢瑞阳、徐翔宇
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.

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