.travis.yml 9.1 KB

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