.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="--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-fips-securitychecks 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. - export HARNESS_JOBS=${HARNESS_JOBS:-4}
  167. - cd $top
  168. script:
  169. - if [ -z "$BUILDONLY" ] && [ -z "$MAKEVERBOSE" ] ; then
  170. make="make -s";
  171. else
  172. make="make";
  173. fi
  174. - if [ -n "$GENERATE" ]; then
  175. make2="$make PERL=no-perl";
  176. else
  177. make2="$make";
  178. fi
  179. - top=${PWD}
  180. - if [ -n "$DESTDIR" ]; then
  181. cd _build/tree;
  182. fi
  183. - if ! $make update; then
  184. echo -e '\052\052 FAILED -- MAKE UPDATE';
  185. travis_terminate 1;
  186. fi
  187. - if ! git diff --exit-code; then
  188. echo -e '\052\052 FAILED -- UPDATED FILES NOT COMMITTED';
  189. travis_terminate 1;
  190. fi
  191. - if test -n "$GENERATE" && ! $make build_all_generated; then
  192. echo -e '\052\052 FAILED -- MAKE BUILD_ALL_GENERATED';
  193. travis_terminate 1;
  194. fi
  195. - if test -n "$CHECKDOCS" && ! $make doc-nits; then
  196. echo -e '\052\052 FAILED -- MAKE DOC-NITS';
  197. travis_terminate 1;
  198. fi
  199. - if test -n "$MARKDOWNLINT" ; then
  200. if ! gem install mdl ; then
  201. echo -e '\052\052 FAILED -- GEM INSTALL MDL';
  202. travis_terminate 1;
  203. fi;
  204. if ! $make md-nits ; then
  205. echo -e '\052\052 FAILED -- MAKE MD-NITS';
  206. travis_terminate 1;
  207. fi;
  208. fi
  209. - if ! $make2; then
  210. echo -e '\052\052 FAILED -- MAKE';
  211. travis_terminate 1;
  212. fi;
  213. - if test -n "$CHECKDOCS" && ! $make cmd-nits; then
  214. echo -e '\052\052 FAILED -- MAKE CMD-NITS';
  215. travis_terminate 1;
  216. fi
  217. - if [ -z "$BUILDONLY" ]; then
  218. if [ -n "$CROSS_COMPILE" ]; then
  219. sudo dpkg --add-architecture i386;
  220. sudo apt-get update;
  221. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  222. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  223. fi;
  224. if [ -e krb5/src ]; then
  225. 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;
  226. fi;
  227. if ! HARNESS_VERBOSE_FAILURE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner travis_wait 60 make _tests; then
  228. echo -e '\052\052 FAILED -- MAKE TEST';
  229. travis_terminate 1;
  230. fi;
  231. else
  232. if ! $make build_tests >~/build.log 2>&1; then
  233. echo -e '\052\052 FAILED -- MAKE BUILD_TESTS';
  234. cat ~/build.log
  235. travis_terminate 1;
  236. fi;
  237. fi
  238. - if [ -n "$DESTDIR" ]; then
  239. mkdir "$top/$DESTDIR";
  240. if ! $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  241. echo -e '\052\052 FAILED -- MAKE INSTALL';
  242. cat ~/install.log;
  243. travis_terminate 1;
  244. fi;
  245. fi
  246. - cd $top
  247. - echo -e '\052\052 DONE'
  248. after_success:
  249. - if [ -n "$COVERALLS" ]; then
  250. coveralls -b . --gcov gcov --gcov-options '\-lpbc';
  251. fi;
  252. notifications:
  253. email:
  254. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="