.travis.yml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. dist: xenial
  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 enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
  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. compiler: gcc
  34. env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
  35. - os: linux
  36. dist: trusty
  37. compiler: clang
  38. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
  39. - os: linux
  40. addons:
  41. apt:
  42. packages:
  43. - binutils-mingw-w64
  44. - gcc-mingw-w64
  45. compiler: i686-w64-mingw32-gcc
  46. env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
  47. # Uncomment if there is reason to believe that PPC-specific problem
  48. # can be diagnosed with this possibly >30 mins sanitizer build...
  49. #- os: linux-ppc64le
  50. # sudo: false
  51. # compiler: gcc
  52. # env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
  53. - os: linux
  54. addons:
  55. apt:
  56. packages:
  57. - golang-1.10
  58. compiler: gcc
  59. 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 enable-buildtest-c++ -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" COVERALLS="yes" BORINGSSL_TESTS="yes" CXX="g++"
  60. - os: linux
  61. addons:
  62. apt:
  63. packages:
  64. - golang-1.10
  65. compiler: gcc
  66. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-external-tests enable-buildtest-c++" BORINGSSL_TESTS="yes" CXX="g++" TESTS=95
  67. - os: linux
  68. compiler: clang
  69. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
  70. - os: linux
  71. compiler: clang
  72. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg no-shared enable-buildtest-c++ -fno-sanitize=alignment -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES -Wno-unused-command-line-argument" CXX="clang++"
  73. - os: linux
  74. compiler: clang
  75. 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"
  76. - os: linux
  77. compiler: gcc
  78. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 enable-buildtest-c++ -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
  79. - os: linux
  80. addons:
  81. apt:
  82. packages:
  83. - binutils-mingw-w64
  84. - gcc-mingw-w64
  85. compiler: i686-w64-mingw32-gcc
  86. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  87. - os: linux
  88. addons:
  89. apt:
  90. packages:
  91. - binutils-mingw-w64
  92. - gcc-mingw-w64
  93. compiler: x86_64-w64-mingw32-gcc
  94. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  95. - os: linux
  96. language: python
  97. python: 3.7
  98. install: pip install flake8
  99. before_script:
  100. # stop the build if there are Python syntax errors or undefined names
  101. - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
  102. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  103. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  104. script: true
  105. exclude:
  106. - os: linux
  107. compiler: clang
  108. - os: osx
  109. compiler: gcc
  110. before_script:
  111. - env
  112. - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
  113. (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
  114. fi
  115. - if [ -n "$DESTDIR" ]; then
  116. sh .travis-create-release.sh $TRAVIS_OS_NAME;
  117. tar -xzf _srcdist.tar.gz;
  118. mkdir _build;
  119. cd _build;
  120. srcdir=../_srcdist;
  121. top=..;
  122. else
  123. srcdir=.;
  124. top=.;
  125. fi
  126. - if [ "$CC" = i686-w64-mingw32-gcc ]; then
  127. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  128. $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
  129. elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
  130. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  131. $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
  132. else
  133. if which ccache >/dev/null && test "$BORINGSSL_TESTS" != yes; then
  134. CC="ccache $CC";
  135. fi;
  136. $srcdir/config -v $CONFIG_OPTS;
  137. fi
  138. - ./configdata.pm --dump
  139. - cd $top
  140. script:
  141. - if [ -z "$BUILDONLY" ]; then
  142. make="make -s";
  143. else
  144. make="make";
  145. fi
  146. - if [ -n "$GENERATE" ]; then
  147. make2="$make PERL=no-perl";
  148. else
  149. make2="$make";
  150. fi
  151. - top=${PWD}
  152. - if [ -n "$DESTDIR" ]; then
  153. cd _build;
  154. fi
  155. - if $make update; then
  156. echo -e '+\057 MAKE UPDATE OK';
  157. else
  158. echo -e '+\057 MAKE UPDATE FAILED'; false;
  159. fi
  160. - git diff --exit-code
  161. - if [ -n "$CHECKDOCS" ]; then
  162. if $make doc-nits; then
  163. echo -e '+\057\057 MAKE DOC-NITS OK';
  164. else
  165. echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
  166. fi;
  167. fi
  168. - if [ -n "$GENERATE" ]; then
  169. if $make build_all_generated; then
  170. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
  171. else
  172. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
  173. fi;
  174. fi
  175. - if $make2; then
  176. echo -e '+\057\057\057\057 MAKE OK';
  177. else
  178. echo -e '+\057\057\057\057 MAKE FAILED'; false;
  179. fi;
  180. - if [ -z "$BUILDONLY" ]; then
  181. if [ -n "$CROSS_COMPILE" ]; then
  182. sudo dpkg --add-architecture i386;
  183. sudo apt-get update;
  184. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  185. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  186. fi;
  187. if [ -e krb5/src ]; then
  188. 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;
  189. fi;
  190. if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
  191. echo -e '+\057\057\057\057\057 MAKE TEST OK';
  192. else
  193. echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
  194. fi;
  195. else
  196. if $make build_tests >~/build.log 2>&1; then
  197. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
  198. else
  199. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
  200. cat ~/build.log
  201. false;
  202. fi;
  203. fi
  204. - if [ -n "$DESTDIR" ]; then
  205. mkdir "$top/$DESTDIR";
  206. if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  207. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
  208. else
  209. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
  210. cat ~/install.log;
  211. false;
  212. fi;
  213. fi
  214. - cd $top
  215. after_success:
  216. - if [ -n "$COVERALLS" ]; then
  217. coveralls -b . --gcov gcov --gcov-options '\-lpbc';
  218. fi;
  219. notifications:
  220. email:
  221. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="