.travis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 -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++ -fno-sanitize=alignment -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-ubsan enable-rc5 enable-md2 enable-buildtest-c++ -DPEDANTIC" 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="--strict-warnings no-shared no-dso no-pic no-aria no-async no-autoload-config no-blake2 no-bf no-camellia no-cast no-chacha no-cmac no-cms no-cmp no-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea no-ktls no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocsp no-ocb no-poly1305 no-psk no-rc2 no-rc4 no-rmd160 no-seed no-siphash no-siv no-sm2 no-sm3 no-sm4 no-srp no-srtp no-ssl3 no-ssl3-method no-ts no-ui-console no-whirlpool no-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT"
  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. - cd $top
  167. script:
  168. - if [ -z "$BUILDONLY" ] && [ -z "$MAKEVERBOSE" ] ; then
  169. make="make -s";
  170. else
  171. make="make";
  172. fi
  173. - if [ -n "$GENERATE" ]; then
  174. make2="$make PERL=no-perl";
  175. else
  176. make2="$make";
  177. fi
  178. - top=${PWD}
  179. - if [ -n "$DESTDIR" ]; then
  180. cd _build/tree;
  181. fi
  182. - if ! $make update; then
  183. echo -e '\052\052 FAILED -- MAKE UPDATE';
  184. travis_terminate 1;
  185. fi
  186. - if ! git diff --exit-code; then
  187. echo -e '\052\052 FAILED -- UPDATED FILES NOT COMMITTED';
  188. travis_terminate 1;
  189. fi
  190. - if test -n "$GENERATE" && ! $make build_all_generated; then
  191. echo -e '\052\052 FAILED -- MAKE BUILD_ALL_GENERATED';
  192. travis_terminate 1;
  193. fi
  194. - if test -n "$CHECKDOCS" && ! $make doc-nits; then
  195. echo -e '\052\052 FAILED -- MAKE DOC-NITS';
  196. travis_terminate 1;
  197. fi
  198. - if test -n "$MARKDOWNLINT" ; then
  199. if ! gem install mdl ; then
  200. echo -e '\052\052 FAILED -- GEM INSTALL MDL';
  201. travis_terminate 1;
  202. fi;
  203. if ! $make md-nits ; then
  204. echo -e '\052\052 FAILED -- MAKE MD-NITS';
  205. travis_terminate 1;
  206. fi;
  207. fi
  208. - if ! $make2; then
  209. echo -e '\052\052 FAILED -- MAKE';
  210. travis_terminate 1;
  211. fi;
  212. - if test -n "$CHECKDOCS" && ! $make cmd-nits; then
  213. echo -e '\052\052 FAILED -- MAKE CMD-NITS';
  214. travis_terminate 1;
  215. fi
  216. - if [ -z "$BUILDONLY" ]; then
  217. if [ -n "$CROSS_COMPILE" ]; then
  218. sudo dpkg --add-architecture i386;
  219. sudo apt-get update;
  220. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  221. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  222. fi;
  223. if [ -e krb5/src ]; then
  224. 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;
  225. fi;
  226. if ! HARNESS_VERBOSE_FAILURE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner travis_wait 60 make _tests; then
  227. echo -e '\052\052 FAILED -- MAKE TEST';
  228. travis_terminate 1;
  229. fi;
  230. else
  231. if ! $make build_tests >~/build.log 2>&1; then
  232. echo -e '\052\052 FAILED -- MAKE BUILD_TESTS';
  233. cat ~/build.log
  234. travis_terminate 1;
  235. fi;
  236. fi
  237. - if [ -n "$DESTDIR" ]; then
  238. mkdir "$top/$DESTDIR";
  239. if ! $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  240. echo -e '\052\052 FAILED -- MAKE INSTALL';
  241. cat ~/install.log;
  242. travis_terminate 1;
  243. fi;
  244. fi
  245. - cd $top
  246. - echo -e '\052\052 DONE'
  247. after_success:
  248. - if [ -n "$COVERALLS" ]; then
  249. coveralls -b . --gcov gcov --gcov-options '\-lpbc';
  250. fi;
  251. notifications:
  252. email:
  253. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="