.travis.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. - eval "${MATRIX_EVAL}"
  17. arch:
  18. - amd64
  19. - arm64
  20. os:
  21. - linux
  22. - osx
  23. compiler:
  24. - clang
  25. - gcc
  26. env:
  27. - CONFIG_OPTS="" DESTDIR="_install"
  28. - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
  29. - CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
  30. matrix:
  31. include:
  32. - os: linux
  33. arch: arm64
  34. dist: bionic
  35. compiler: clang
  36. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
  37. - os: linux
  38. arch: arm64
  39. compiler: clang
  40. addons:
  41. apt:
  42. packages:
  43. - clang-6.0
  44. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -D__NO_STRING_INLINES -Wno-unused-command-line-argument" MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
  45. - os: linux
  46. arch: arm64
  47. compiler: clang
  48. addons:
  49. apt:
  50. packages:
  51. - clang-6.0
  52. 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 -D__NO_STRING_INLINES -Wno-unused-command-line-argument" MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
  53. - os: linux
  54. arch: s390x
  55. compiler: gcc
  56. env: CONFIG_OPTS="--strict-warnings"
  57. - os: linux-ppc64le
  58. sudo: false
  59. compiler: clang
  60. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
  61. - os: linux
  62. addons:
  63. apt:
  64. packages:
  65. - gcc-5
  66. - g++-5
  67. sources:
  68. - ubuntu-toolchain-r-test
  69. compiler: gcc-5
  70. env: CONFIG_OPTS="--strict-warnings no-ec 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"
  71. - os: linux
  72. compiler: clang
  73. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated"
  74. - os: linux
  75. addons:
  76. apt:
  77. packages:
  78. - binutils-mingw-w64
  79. - gcc-mingw-w64
  80. compiler: i686-w64-mingw32-gcc
  81. env: CONFIG_OPTS="no-stdio" BUILDONLY="yes" DESTDIR="_install"
  82. # Uncomment if there is reason to believe that PPC-specific problem
  83. # can be diagnosed with this possibly >30 mins sanitizer build...
  84. #- os: linux-ppc64le
  85. # sudo: false
  86. # compiler: gcc
  87. # env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
  88. - os: linux
  89. addons:
  90. apt:
  91. packages:
  92. - gcc-5
  93. - g++-5
  94. - golang-1.6
  95. sources:
  96. - ubuntu-toolchain-r-test
  97. compiler: gcc-5
  98. 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"
  99. - os: linux
  100. addons:
  101. apt:
  102. packages:
  103. - gcc-5
  104. - g++-5
  105. - golang-1.6
  106. sources:
  107. - ubuntu-toolchain-r-test
  108. compiler: gcc-5
  109. # External test pyca-cryptography temporarily disabled due to long term travis failures
  110. 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="test_external_boringssl test_external_krb5"
  111. - os: linux
  112. compiler: clang
  113. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
  114. - os: linux
  115. compiler: clang
  116. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
  117. - os: linux
  118. compiler: clang
  119. 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"
  120. - os: linux
  121. addons:
  122. apt:
  123. packages:
  124. - gcc-5
  125. - g++-5
  126. sources:
  127. - ubuntu-toolchain-r-test
  128. compiler: gcc-5
  129. env: UBUNTU_GCC_HACK="yes" EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-asan enable-ubsan enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128" OPENSSL_TEST_RAND_ORDER=0
  130. - os: linux
  131. addons:
  132. apt:
  133. packages:
  134. - binutils-mingw-w64
  135. - gcc-mingw-w64
  136. compiler: i686-w64-mingw32-gcc
  137. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  138. - os: linux
  139. addons:
  140. apt:
  141. packages:
  142. - binutils-mingw-w64
  143. - gcc-mingw-w64
  144. compiler: x86_64-w64-mingw32-gcc
  145. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  146. - os: linux
  147. language: python
  148. python: 3.7
  149. dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
  150. sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
  151. install: pip install flake8
  152. before_script:
  153. # stop the build if there are Python syntax errors or undefined names
  154. - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
  155. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  156. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  157. script: true
  158. - os: linux
  159. compiler: gcc
  160. env: CONFIGURE_TARGET="linux-generic32" 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-comp no-ct no-des no-dgram no-dh no-dsa no-dtls no-ec2m no-engine no-filenames no-gost no-idea 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-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"
  161. exclude:
  162. - os: linux
  163. compiler: clang
  164. - os: osx
  165. compiler: gcc
  166. - arch: arm64
  167. os: osx
  168. before_script:
  169. - env
  170. - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
  171. (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || travis_terminate 0;
  172. fi
  173. - if [ -n "$DESTDIR" ]; then
  174. sh .travis-create-release.sh $TRAVIS_OS_NAME;
  175. tar -xzf _srcdist.tar.gz;
  176. mkdir _build;
  177. cd _build;
  178. srcdir=../_srcdist;
  179. top=..;
  180. else
  181. srcdir=.;
  182. top=.;
  183. fi
  184. - if [ -n "$UBUNTU_GCC_HACK" ]; then
  185. $CC -dumpspecs | sed "s/--push-state//g; s/--pop-state/--as-needed/g" > gcc-specs.txt;
  186. CC="$CC -specs=gcc-specs.txt";
  187. fi
  188. - if [ "$CC" = i686-w64-mingw32-gcc ]; then
  189. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  190. $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
  191. elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
  192. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  193. $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
  194. else
  195. if [ "$CC" = clang-3.9 ]; then
  196. sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
  197. curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
  198. echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
  199. sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
  200. sudo -E apt-get -yq update;
  201. sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
  202. elif which ccache >/dev/null; then
  203. CC="ccache $CC";
  204. fi;
  205. if [ -n "$CONFIGURE_TARGET" ]; then
  206. $srcdir/Configure $CONFIGURE_TARGET $CONFIG_OPTS;
  207. else
  208. $srcdir/config -v $CONFIG_OPTS;
  209. fi;
  210. fi
  211. - ./configdata.pm --dump
  212. - cd $top
  213. script:
  214. - if [ -z "$BUILDONLY" ]; then
  215. make="make -s";
  216. else
  217. make="make";
  218. fi
  219. - if [ -n "$GENERATE" ]; then
  220. make2="$make PERL=no-perl";
  221. else
  222. make2="$make";
  223. fi
  224. - top=${PWD}
  225. - if [ -n "$DESTDIR" ]; then
  226. cd _build;
  227. fi
  228. - if $make update; then
  229. echo -e '+\057 MAKE UPDATE OK';
  230. else
  231. echo -e '+\057 MAKE UPDATE FAILED';
  232. travis_terminate 1;
  233. fi
  234. - git diff --exit-code
  235. - if [ -n "$CHECKDOCS" ]; then
  236. if $make doc-nits; then
  237. echo -e '+\057\057 MAKE DOC-NITS OK';
  238. else
  239. echo -e '+\057\057 MAKE DOC-NITS FAILED';
  240. travis_terminate 1;
  241. fi;
  242. fi
  243. - if [ -n "$GENERATE" ]; then
  244. if $make build_all_generated; then
  245. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
  246. else
  247. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED';
  248. travis_terminate 1;
  249. fi;
  250. fi
  251. - if $make2; then
  252. echo -e '+\057\057\057\057 MAKE OK';
  253. else
  254. echo -e '+\057\057\057\057 MAKE FAILED';
  255. travis_terminate 1;
  256. fi;
  257. - if [ -z "$BUILDONLY" ]; then
  258. if [ -n "$CROSS_COMPILE" ]; then
  259. sudo dpkg --add-architecture i386;
  260. sudo apt-get update;
  261. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  262. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  263. fi;
  264. if [ -e krb5/src ]; then
  265. 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;
  266. fi;
  267. if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
  268. echo -e '+\057\057\057\057\057 MAKE TEST OK';
  269. else
  270. echo -e '+\057\057\057\057\057 MAKE TEST FAILED';
  271. travis_terminate 1;
  272. fi;
  273. else
  274. if $make build_tests >~/build.log 2>&1; then
  275. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
  276. else
  277. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
  278. cat ~/build.log
  279. travis_terminate 1;
  280. fi;
  281. fi
  282. - if [ -n "$DESTDIR" ]; then
  283. mkdir "$top/$DESTDIR";
  284. if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
  285. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
  286. else
  287. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
  288. cat ~/install.log;
  289. travis_terminate 1;
  290. fi;
  291. fi
  292. - cd $top
  293. after_success:
  294. - if [ -n "$COVERALLS" ]; then
  295. coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
  296. fi;
  297. notifications:
  298. email:
  299. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="