.travis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. dist: bionic
  2. osx_image: xcode9.3
  3. language: c
  4. cache: ccache
  5. git:
  6. submodules: false
  7. quiet: true
  8. before_install:
  9. - if [ -n "$COVERALLS" ]; then
  10. travis_retry pip install --user cpp-coveralls;
  11. fi;
  12. - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
  13. travis_retry git submodule update --init --recursive;
  14. fi;
  15. - eval "${MATRIX_EVAL}"
  16. arch:
  17. - amd64
  18. os:
  19. - linux
  20. - osx
  21. compiler:
  22. - clang
  23. - gcc
  24. env:
  25. # Note: env entry here must exactly match the value in the exclude: table below that contains env:, otherwise it will not find a match.
  26. - CONFIG_OPTS="" DESTDIR="_install"
  27. - CONFIG_OPTS="no-asm --debug --strict-warnings no-afalgeng no-shared enable-rc5 enable-md2 -fsanitize=address" LSAN_OPTIONS="report_objects=1"
  28. - CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
  29. jobs:
  30. exclude:
  31. - os: linux
  32. compiler: clang
  33. env: CONFIG_OPTS="" DESTDIR="_install"
  34. - os: linux
  35. compiler: clang
  36. env: CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings --with-rand-seed=rdcpu,os -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
  37. - os: osx
  38. compiler: gcc
  39. - os: osx
  40. env: CONFIG_OPTS="no-asm --debug --strict-warnings no-afalgeng no-shared enable-rc5 enable-md2 -fsanitize=address" LSAN_OPTIONS="report_objects=1"
  41. include:
  42. - os: linux
  43. arch: arm64
  44. compiler: gcc
  45. env: CONFIG_OPTS="--strict-warnings" MAKEVERBOSE="yes"
  46. - os: linux
  47. arch: arm64
  48. compiler: gcc
  49. env: CONFIG_OPTS="no-asm no-makedepend no-deprecated enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
  50. - os: linux
  51. arch: s390x
  52. compiler: gcc
  53. env: CONFIG_OPTS="--strict-warnings"
  54. - os: linux-ppc64le
  55. compiler: gcc
  56. env: CONFIG_OPTS="--strict-warnings"
  57. - os: linux
  58. compiler: gcc
  59. env: CONFIG_OPTS="--strict-warnings no-ec enable-trace enable-ssl-trace enable-zlib enable-zlib-dynamic enable-crypto-mdebug enable-crypto-mdebug-backtrace enable-egd" COMMENT="Move to the BORINGTEST build when interoperable"
  60. - os: linux
  61. dist: trusty
  62. compiler: clang
  63. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
  64. - os: linux
  65. dist: xenial
  66. compiler: gcc
  67. env: CONFIG_OPTS="--strict-warnings no-deprecated enable-rc5 enable-md2"
  68. - os: linux
  69. addons:
  70. apt:
  71. packages:
  72. - binutils-mingw-w64
  73. - gcc-mingw-w64
  74. compiler: i686-w64-mingw32-gcc
  75. env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
  76. - os: linux
  77. addons:
  78. apt:
  79. packages:
  80. - golang-1.10
  81. compiler: gcc
  82. 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++"
  83. - os: linux
  84. addons:
  85. apt:
  86. packages:
  87. - golang-1.10
  88. - cmake
  89. - libtest2-suite-perl
  90. compiler: gcc
  91. # External test pyca-cryptography temporarily disabled due to long term travis failures
  92. 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="test_external_boringssl test_external_krb5 test_external_gost_engine"
  93. - os: linux
  94. compiler: clang
  95. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -Wno-unused-command-line-argument"
  96. - os: linux
  97. compiler: clang
  98. 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++ -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -Wno-unused-command-line-argument" CXX="clang++"
  99. - os: linux
  100. compiler: gcc
  101. env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-buildtest-c++" OPENSSL_TEST_RAND_ORDER=0
  102. - os: linux
  103. dist: xenial
  104. addons:
  105. apt:
  106. packages:
  107. - binutils-mingw-w64
  108. - gcc-mingw-w64
  109. compiler: i686-w64-mingw32-gcc
  110. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  111. - os: linux
  112. dist: xenial
  113. addons:
  114. apt:
  115. packages:
  116. - binutils-mingw-w64
  117. - gcc-mingw-w64
  118. compiler: x86_64-w64-mingw32-gcc
  119. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  120. - os: linux
  121. language: python
  122. python: 3.7
  123. install: pip install flake8
  124. before_script:
  125. # stop the build if there are Python syntax errors or undefined names
  126. - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
  127. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  128. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  129. script: true
  130. - os: linux
  131. compiler: gcc
  132. env: CONFIGURE_TARGET="linux-generic32" MARKDOWNLINT="yes" CONFIG_OPTS="no-bulk no-pic no-asm -DOPENSSL_SMALL_FOOTPRINT --strict-warnings no-pic -DOPENSSL_NO_SECURE_MEMORY"
  133. before_script:
  134. - env
  135. - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
  136. (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || travis_terminate 0;
  137. fi
  138. - if [ -n "$DESTDIR" ]; then
  139. sh .travis-create-release.sh $TRAVIS_OS_NAME;
  140. tar -xzf _srcdist.tar.gz;
  141. mkdir -p _build/tree;
  142. cd _build/tree;
  143. srcdir=../../_srcdist;
  144. top=../..;
  145. else
  146. srcdir=.;
  147. top=.;
  148. fi
  149. - if [ "$CC" = i686-w64-mingw32-gcc ]; then
  150. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  151. $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
  152. elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
  153. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  154. $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
  155. else
  156. if which ccache >/dev/null && test "$BORINGSSL_TESTS" != yes; then
  157. CC="ccache $CC";
  158. fi;
  159. if [ -n "$CONFIGURE_TARGET" ]; then
  160. $srcdir/Configure $CONFIGURE_TARGET $CONFIG_OPTS;
  161. else
  162. $srcdir/config -v $CONFIG_OPTS;
  163. fi;
  164. fi
  165. - ./configdata.pm --dump
  166. - export BUILDOPTS="-j4"
  167. - export HARNESS_JOBS=${HARNESS_JOBS:-4}
  168. - cd $top
  169. script:
  170. - if [ -z "$BUILDONLY" ] && [ -z "$MAKEVERBOSE" ] ; then
  171. make="make -s";
  172. else
  173. make="make";
  174. fi
  175. - if [ -n "$GENERATE" ]; then
  176. make2="$make $BUILDOPTS PERL=no-perl";
  177. else
  178. make2="$make $BUILDOPTS";
  179. fi
  180. - top=${PWD}
  181. - if [ -n "$DESTDIR" ]; then
  182. cd _build/tree;
  183. fi
  184. - if ! $make update; then
  185. echo -e '\052\052 FAILED -- MAKE UPDATE';
  186. travis_terminate 1;
  187. fi
  188. - if ! git diff --exit-code; then
  189. echo -e '\052\052 FAILED -- UPDATED FILES NOT COMMITTED';
  190. travis_terminate 1;
  191. fi
  192. - if test -n "$GENERATE" && ! $make build_all_generated; then
  193. echo -e '\052\052 FAILED -- MAKE BUILD_ALL_GENERATED';
  194. travis_terminate 1;
  195. fi
  196. - if test -n "$CHECKDOCS" && ! $make doc-nits; then
  197. echo -e '\052\052 FAILED -- MAKE DOC-NITS';
  198. travis_terminate 1;
  199. fi
  200. - if test -n "$MARKDOWNLINT" ; then
  201. if ! gem install mdl ; then
  202. echo -e '\052\052 FAILED -- GEM INSTALL MDL';
  203. travis_terminate 1;
  204. fi;
  205. if ! $make md-nits ; then
  206. echo -e '\052\052 FAILED -- MAKE MD-NITS';
  207. travis_terminate 1;
  208. fi;
  209. fi
  210. - if ! $make2; then
  211. echo -e '\052\052 FAILED -- MAKE';
  212. travis_terminate 1;
  213. fi;
  214. - if test -n "$CHECKDOCS" && ! $make cmd-nits; then
  215. echo -e '\052\052 FAILED -- MAKE CMD-NITS';
  216. travis_terminate 1;
  217. fi
  218. - if [ -z "$BUILDONLY" ]; then
  219. if [ -n "$CROSS_COMPILE" ]; then
  220. sudo dpkg --add-architecture i386;
  221. sudo apt-get update;
  222. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  223. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  224. fi;
  225. if [ -e krb5/src ]; then
  226. 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;
  227. fi;
  228. if ! HARNESS_VERBOSE_FAILURE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner travis_wait 60 make _tests; then
  229. echo -e '\052\052 FAILED -- MAKE TEST';
  230. travis_terminate 1;
  231. fi;
  232. else
  233. if ! $make build_tests >~/build.log 2>&1; then
  234. echo -e '\052\052 FAILED -- MAKE BUILD_TESTS';
  235. cat ~/build.log
  236. travis_terminate 1;
  237. fi;
  238. fi
  239. - if [ -n "$DESTDIR" ]; then
  240. mkdir "$top/$DESTDIR";
  241. if ! $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  242. echo -e '\052\052 FAILED -- MAKE INSTALL';
  243. cat ~/install.log;
  244. travis_terminate 1;
  245. fi;
  246. fi
  247. - cd $top
  248. - echo -e '\052\052 DONE'
  249. after_success:
  250. - if [ -n "$COVERALLS" ]; then
  251. coveralls -b . --gcov gcov --gcov-options '\-lpbc';
  252. fi;
  253. notifications:
  254. email:
  255. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="