.travis.yml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. dist: trusty
  2. sudo: required
  3. language: c
  4. cache: ccache
  5. git:
  6. submodules: false
  7. before_install:
  8. - if [ -n "$COVERALLS" ]; then
  9. pip install --user cpp-coveralls;
  10. fi;
  11. - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
  12. git submodule update --init --recursive;
  13. fi;
  14. addons:
  15. apt:
  16. packages:
  17. - ccache
  18. - golang-1.6
  19. os:
  20. - linux
  21. - osx
  22. compiler:
  23. - clang
  24. - gcc
  25. env:
  26. - CONFIG_OPTS="" DESTDIR="_install"
  27. - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
  28. - CONFIG_OPTS="no-asm no-makedepend --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
  29. matrix:
  30. include:
  31. - os: linux
  32. addons:
  33. apt:
  34. packages:
  35. - gcc-5
  36. - g++-5
  37. sources:
  38. - ubuntu-toolchain-r-test
  39. compiler: gcc-5
  40. env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
  41. - os: linux
  42. compiler: clang-3.9
  43. env: CONFIG_OPTS="--strict-warnings no-deprecated" BUILDONLY="yes"
  44. - os: linux
  45. addons:
  46. apt:
  47. packages:
  48. - binutils-mingw-w64
  49. - gcc-mingw-w64
  50. compiler: i686-w64-mingw32-gcc
  51. env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
  52. - os: linux
  53. addons:
  54. apt:
  55. packages:
  56. - gcc-5
  57. - g++-5
  58. sources:
  59. - ubuntu-toolchain-r-test
  60. compiler: gcc-5
  61. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug --coverage no-asm enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-ssl3 enable-ssl3-method enable-nextprotoneg enable-weak-ssl-ciphers no-shared -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" COVERALLS="yes" BORINGSSL_TESTS="yes" CXX="g++-5"
  62. - os: linux
  63. addons:
  64. apt:
  65. packages:
  66. - gcc-5
  67. - g++-5
  68. sources:
  69. - ubuntu-toolchain-r-test
  70. compiler: gcc-5
  71. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-external-tests" BORINGSSL_TESTS="yes" CXX="g++-5" TESTS=95
  72. - os: linux
  73. compiler: clang-3.9
  74. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan"
  75. - os: linux
  76. compiler: clang-3.9
  77. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg -fno-sanitize=alignment no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
  78. - os: linux
  79. compiler: clang-3.9
  80. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2 no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
  81. - os: linux
  82. addons:
  83. apt:
  84. packages:
  85. - gcc-5
  86. - g++-5
  87. sources:
  88. - ubuntu-toolchain-r-test
  89. compiler: gcc-5
  90. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
  91. - os: linux
  92. addons:
  93. apt:
  94. packages:
  95. - binutils-mingw-w64
  96. - gcc-mingw-w64
  97. compiler: i686-w64-mingw32-gcc
  98. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  99. - os: linux
  100. addons:
  101. apt:
  102. packages:
  103. - binutils-mingw-w64
  104. - gcc-mingw-w64
  105. compiler: x86_64-w64-mingw32-gcc
  106. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  107. exclude:
  108. - os: linux
  109. compiler: clang
  110. - os: osx
  111. compiler: gcc
  112. before_script:
  113. - env
  114. - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
  115. (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
  116. fi
  117. - if [ -n "$DESTDIR" ]; then
  118. sh .travis-create-release.sh $TRAVIS_OS_NAME;
  119. tar -xzf _srcdist.tar.gz;
  120. mkdir _build;
  121. cd _build;
  122. srcdir=../_srcdist;
  123. top=..;
  124. else
  125. srcdir=.;
  126. top=.;
  127. fi
  128. - if [ "$CC" = i686-w64-mingw32-gcc ]; then
  129. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  130. $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
  131. elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
  132. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  133. $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
  134. else
  135. if [ "$CC" = clang-3.9 ]; then
  136. sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
  137. curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
  138. echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
  139. sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
  140. sudo -E apt-get -yq update;
  141. sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
  142. elif which ccache >/dev/null; then
  143. CC="ccache $CC";
  144. fi;
  145. $srcdir/config -v $CONFIG_OPTS;
  146. fi
  147. - ./configdata.pm --dump
  148. - cd $top
  149. script:
  150. - if [ -z "$BUILDONLY" ]; then
  151. make="make -s";
  152. else
  153. make="make";
  154. fi
  155. - if [ -n "$GENERATE" ]; then
  156. make2="$make PERL=no-perl";
  157. else
  158. make2="$make";
  159. fi
  160. - top=${PWD}
  161. - if [ -n "$DESTDIR" ]; then
  162. cd _build;
  163. fi
  164. - if $make update; then
  165. echo -e '+\057 MAKE UPDATE OK';
  166. else
  167. echo -e '+\057 MAKE UPDATE FAILED'; false;
  168. fi;
  169. git diff --exit-code
  170. - if [ -n "$CHECKDOCS" ]; then
  171. if $make doc-nits; then
  172. echo -e '+\057\057 MAKE DOC-NITS OK';
  173. else
  174. echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
  175. fi;
  176. fi
  177. - if [ -n "$GENERATE" ]; then
  178. if $make build_all_generated; then
  179. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
  180. else
  181. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
  182. fi;
  183. fi
  184. - if $make2; then
  185. echo -e '+\057\057\057\057 MAKE OK';
  186. else
  187. echo -e '+\057\057\057\057 MAKE FAILED'; false;
  188. fi;
  189. - if [ -z "$BUILDONLY" ]; then
  190. if [ -n "$CROSS_COMPILE" ]; then
  191. sudo dpkg --add-architecture i386;
  192. sudo apt-get update;
  193. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  194. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  195. fi;
  196. if [ -e krb5/src ]; then
  197. sudo apt-get -yq install bison dejagnu gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python-cjson python-paste python-pyrad slapd tcl-dev tcsh;
  198. fi;
  199. if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
  200. echo -e '+\057\057\057\057\057 MAKE TEST OK';
  201. else
  202. echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
  203. fi;
  204. else
  205. if $make build_tests >~/build.log 2>&1; then
  206. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
  207. else
  208. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
  209. cat ~/build.log
  210. false;
  211. fi;
  212. fi
  213. - if [ -n "$DESTDIR" ]; then
  214. mkdir "$top/$DESTDIR";
  215. if $make install install_docs DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  216. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
  217. else
  218. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
  219. cat ~/install.log;
  220. false;
  221. fi;
  222. fi
  223. - cd $top
  224. after_success:
  225. - if [ -n "$COVERALLS" ]; then
  226. coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
  227. fi;
  228. notifications:
  229. email:
  230. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="