.travis.yml 9.2 KB

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