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.

.travis.yml 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. language: c
  2. sudo: required
  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. - libev-dev
  15. - libc-ares-dev
  16. - g++-4.8
  17. - libstdc++-4.8-dev
  18. - stunnel4
  19. - libidn2-0-dev
  20. - libssh2-1-dev
  21. - krb5-user
  22. matrix:
  23. include:
  24. - os: linux
  25. compiler: gcc
  26. dist: trusty
  27. env: T=normal C=--with-gssapi
  28. - os: linux
  29. compiler: gcc
  30. dist: trusty
  31. env: T=normal C="--disable-http --disable-smtp --disable-imap"
  32. - os: linux
  33. compiler: gcc
  34. dist: trusty
  35. env: T=normal C=--enable-ares
  36. - os: linux
  37. compiler: clang
  38. dist: trusty
  39. env: T=debug
  40. - os: osx
  41. compiler: gcc
  42. env: T=debug
  43. - os: osx
  44. compiler: gcc
  45. env: T=debug C=--enable-ares
  46. - os: osx
  47. compiler: gcc
  48. env: T=debug C="--with-ssl=/usr/local/opt/openssl --with-libmetalink"
  49. - os: osx
  50. compiler: gcc
  51. env: T=debug C="--with-ssl=/usr/local/opt/libressl --with-libmetalink"
  52. - os: osx
  53. compiler: clang
  54. env: T=debug C="--without-ssl --with-darwinssl --with-libmetalink"
  55. - os: osx
  56. compiler: clang
  57. env: T=normal
  58. - os: linux
  59. compiler: gcc
  60. dist: trusty
  61. env: T=cmake
  62. - os: linux
  63. compiler: clang
  64. dist: trusty
  65. env: T=cmake
  66. - os: linux
  67. compiler: gcc
  68. dist: precise
  69. env: T=coverage
  70. - os: linux
  71. compiler: gcc
  72. dist: trusty
  73. env: T=distcheck
  74. - os: linux
  75. compiler: clang
  76. dist: trusty
  77. env: T=fuzzer
  78. install:
  79. - pip install --user cpp-coveralls
  80. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
  81. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
  82. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install rtmpdump libssh2 c-ares libmetalink libressl nghttp2 libmetalink; fi
  83. - if [ $TRAVIS_OS_NAME = linux ]; then
  84. curl -L https://github.com/nghttp2/nghttp2/releases/download/v1.24.0/nghttp2-1.24.0.tar.gz |
  85. tar xzf - &&
  86. (cd nghttp2-1.24.0 && CXX="g++-4.8" ./configure --prefix=/usr --disable-threads --enable-app && make && sudo make install);
  87. fi
  88. before_script:
  89. - ./buildconf
  90. script:
  91. - |
  92. if [ "$T" = "coverage" ]; then
  93. export CC="gcc-4.8"
  94. ./configure --enable-debug --disable-shared --enable-code-coverage
  95. make
  96. make TFLAGS=-n test-nonflaky
  97. tests="1 2 3 4 5 6 7 8 9 10 200 201 202 300 301 302 500 501 502 503 504 506 507 508 509 510 511 512 513 514 515 516 517 518 519 600 601 800 801 802 803 900 901 902 903 1000 1001 1002 1004 1302 1303 1304 1305 1306 1308 1400 1401 1402 1404 1450 1451 1452 1502 1507 1508 1600 1602 1603 1605"
  98. make "TFLAGS=-n -e $tests" test-nonflaky
  99. make "TFLAGS=-n -t $tests" test-nonflaky
  100. coveralls --gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' -i src -e lib -e tests -e docs -b $PWD/src
  101. coveralls --gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' -e src -i lib -e tests -e docs -b $PWD/lib
  102. fi
  103. - |
  104. if [ "$T" = "debug" ]; then
  105. ./configure --enable-debug --enable-werror $C
  106. make && make examples
  107. make TFLAGS=-n test-nonflaky
  108. fi
  109. - |
  110. if [ "$T" = "normal" ]; then
  111. ./configure --enable-warnings --enable-werror $C
  112. make && make examples
  113. make test-nonflaky
  114. fi
  115. - |
  116. if [ "$T" = "cmake" ]; then
  117. mkdir build
  118. cd build
  119. cmake ..
  120. make
  121. fi
  122. - |
  123. if [ "$T" = "distcheck" ]; then
  124. ./configure
  125. make
  126. ./maketgz 99.98.97
  127. # verify in-tree build - and install it
  128. (tar xf curl-99.98.97.tar.gz && \
  129. cd curl-99.98.97 && \
  130. ./configure --prefix=$HOME/temp && \
  131. make && \
  132. make TFLAGS=1 test && \
  133. make install)
  134. # basic check of the installed files
  135. bash scripts/installcheck.sh $HOME/temp
  136. rm -rf curl-99.98.97
  137. # verify out-of-tree build
  138. (tar xf curl-99.98.97.tar.gz && \
  139. mkdir build && \
  140. cd build && \
  141. ../curl-99.98.97/configure && \
  142. make && \
  143. make TFLAGS=1 test)
  144. # verify cmake build
  145. rm -rf curl-99.98.97
  146. (tar xf curl-99.98.97.tar.gz && \
  147. cd curl-99.98.97 && \
  148. mkdir build && \
  149. cd build && \
  150. cmake .. && \
  151. make)
  152. fi
  153. - |
  154. if [ "$T" = "fuzzer" ]; then
  155. export CC=clang
  156. export CXX=clang++
  157. export CFLAGS="-fsanitize=address"
  158. # Specifically use libstdc++ for travis as libc++ is not installed.
  159. # This is ok because we're not compiling against libFuzzer.
  160. export CXXFLAGS="-fsanitize=address -stdlib=libstdc++"
  161. ./configure --disable-shared --enable-debug --enable-maintainer-mode
  162. make
  163. cd tests/fuzz
  164. make clean
  165. make check
  166. fi
  167. # whitelist branches to avoid testing feature branches twice (as branch and as pull request)
  168. branches:
  169. only:
  170. - master
  171. notifications:
  172. email: false