.travis.yml 9.9 KB

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