.travis.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. language: c
  2. sudo: false
  3. addons:
  4. apt:
  5. sources:
  6. - ubuntu-toolchain-r-test
  7. - llvm-toolchain-precise-3.7
  8. packages:
  9. - cmake
  10. - gcc-4.8
  11. - lcov
  12. - clang-3.7
  13. - valgrind
  14. matrix:
  15. include:
  16. - os: linux
  17. compiler: gcc
  18. env: BUILD_TYPE=normal
  19. - os: linux
  20. compiler: clang
  21. env: BUILD_TYPE=debug
  22. - os: osx
  23. compiler: gcc
  24. env: BUILD_TYPE=debug
  25. - os: osx
  26. compiler: clang
  27. env: BUILD_TYPE=normal
  28. - os: linux
  29. compiler: gcc
  30. dist: trusty
  31. env: BUILD_TYPE=cmake
  32. - os: linux
  33. compiler: clang
  34. dist: trusty
  35. env: BUILD_TYPE=cmake
  36. - os: linux
  37. compiler: gcc
  38. env: BUILD_TYPE=coverage
  39. - os: linux
  40. compiler: gcc
  41. env: BUILD_TYPE=distcheck
  42. install:
  43. - pip install --user cpp-coveralls
  44. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
  45. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
  46. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl libidn rtmpdump libssh2 c-ares libmetalink libressl nghttp2; fi
  47. before_script:
  48. - ./buildconf
  49. script:
  50. - |
  51. if [ "$BUILD_TYPE" = "coverage" ]; then
  52. export CC="gcc-4.8"
  53. ./configure --enable-debug --disable-shared --enable-code-coverage
  54. make
  55. make TFLAGS=-n test-nonflaky
  56. make "TFLAGS=-n -e 1 2 3 4 5 6 7 8 9 10" test-nonflaky
  57. make "TFLAGS=-n -t 1 2 3 4 5 6 7 8 9 10" test-nonflaky
  58. coveralls --gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' -i src -i lib -i lib/vtls -i lib/vauth -e tests -e docs
  59. fi
  60. - |
  61. if [ "$BUILD_TYPE" = "debug" ]; then
  62. ./configure --enable-debug --enable-werror
  63. make
  64. make TFLAGS=-n test-nonflaky
  65. fi
  66. - |
  67. if [ "$BUILD_TYPE" = "normal" ]; then
  68. ./configure --enable-werror
  69. make
  70. make TFLAGS=-n test-nonflaky
  71. fi
  72. - |
  73. if [ "$BUILD_TYPE" = "cmake" ]; then
  74. mkdir build
  75. cd build
  76. cmake ..
  77. make
  78. fi
  79. - |
  80. if [ "$BUILD_TYPE" = "distcheck" ]; then
  81. ./configure
  82. make
  83. ./maketgz 99.98.97
  84. (tar xf curl-99.98.97.tar.gz && cd curl-99.98.97 && ./configure && make && make TFLAGS=1 test)
  85. rm -rf curl-99.98.97
  86. (tar xf curl-99.98.97.tar.gz && mkdir build && cd build && ../curl-99.98.97/configure && make && make TFLAGS=1 test)
  87. fi
  88. # whitelist branches to avoid testing feature branches twice (as branch and as pull request)
  89. branches:
  90. only:
  91. - master
  92. notifications:
  93. email: false