.travis.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. matrix:
  22. include:
  23. - os: linux
  24. compiler: gcc
  25. dist: trusty
  26. env: T=normal
  27. - os: linux
  28. compiler: clang
  29. dist: trusty
  30. env: T=debug
  31. - os: osx
  32. compiler: gcc
  33. env: T=debug
  34. - os: osx
  35. compiler: gcc
  36. env: T=debug C=--with-ssl=/usr/local/opt/openssl
  37. - os: osx
  38. compiler: gcc
  39. env: T=debug C=--with-ssl=/usr/local/opt/libressl
  40. - os: osx
  41. compiler: clang
  42. env: T=debug C="--without-ssl --with-darwinssl"
  43. - os: osx
  44. compiler: clang
  45. env: T=normal
  46. - os: linux
  47. compiler: gcc
  48. dist: trusty
  49. env: T=cmake
  50. - os: linux
  51. compiler: clang
  52. dist: trusty
  53. env: T=cmake
  54. - os: linux
  55. compiler: gcc
  56. dist: precise
  57. env: T=coverage
  58. - os: linux
  59. compiler: gcc
  60. dist: trusty
  61. env: T=distcheck
  62. install:
  63. - pip install --user cpp-coveralls
  64. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update > /dev/null; fi
  65. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew reinstall libtool > /dev/null; fi
  66. - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl libidn rtmpdump libssh2 c-ares libmetalink libressl nghttp2; fi
  67. - if [ $TRAVIS_OS_NAME = linux ]; then
  68. curl -L https://github.com/nghttp2/nghttp2/releases/download/v1.24.0/nghttp2-1.24.0.tar.gz |
  69. tar xzf - &&
  70. (cd nghttp2-1.24.0 && CXX="g++-4.8" ./configure --prefix=/usr --disable-threads --enable-app && make && sudo make install);
  71. fi
  72. before_script:
  73. - ./buildconf
  74. script:
  75. - |
  76. if [ "$T" = "coverage" ]; then
  77. export CC="gcc-4.8"
  78. ./configure --enable-debug --disable-shared --enable-code-coverage
  79. make
  80. make TFLAGS=-n test-nonflaky
  81. 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"
  82. make "TFLAGS=-n -e $tests" test-nonflaky
  83. make "TFLAGS=-n -t $tests" test-nonflaky
  84. coveralls --gcov /usr/bin/gcov-4.8 --gcov-options '\-lp' -i src -i lib -i lib/vtls -i lib/vauth -e tests -e docs
  85. fi
  86. - |
  87. if [ "$T" = "debug" ]; then
  88. ./configure --enable-debug --enable-werror $C
  89. make
  90. make TFLAGS=-n test-nonflaky
  91. fi
  92. - |
  93. if [ "$T" = "normal" ]; then
  94. ./configure --enable-warnings --enable-werror $C
  95. make
  96. make test-nonflaky
  97. fi
  98. - |
  99. if [ "$T" = "cmake" ]; then
  100. mkdir build
  101. cd build
  102. cmake ..
  103. make
  104. fi
  105. - |
  106. if [ "$T" = "distcheck" ]; then
  107. ./configure
  108. make
  109. ./maketgz 99.98.97
  110. # verify in-tree build - and install it
  111. (tar xf curl-99.98.97.tar.gz && \
  112. cd curl-99.98.97 && \
  113. ./configure --prefix=$HOME/temp && \
  114. make && \
  115. make TFLAGS=1 test && \
  116. make install)
  117. # basic check of the installed files
  118. bash scripts/installcheck.sh $HOME/temp
  119. rm -rf curl-99.98.97
  120. # verify out-of-tree build
  121. (tar xf curl-99.98.97.tar.gz && mkdir build && cd build && ../curl-99.98.97/configure && make && make TFLAGS=1 test)
  122. fi
  123. # whitelist branches to avoid testing feature branches twice (as branch and as pull request)
  124. branches:
  125. only:
  126. - master
  127. notifications:
  128. email: false