2
0

.travis.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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. 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 --strict-warnings -std=c89 -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
  26. matrix:
  27. include:
  28. - os: linux-ppc64le
  29. sudo: false
  30. compiler: clang
  31. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
  32. - os: linux
  33. addons:
  34. apt:
  35. packages:
  36. - gcc-5
  37. - g++-5
  38. sources:
  39. - ubuntu-toolchain-r-test
  40. compiler: gcc-5
  41. env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
  42. - os: linux
  43. compiler: clang
  44. env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
  45. - os: linux
  46. addons:
  47. apt:
  48. packages:
  49. - binutils-mingw-w64
  50. - gcc-mingw-w64
  51. compiler: i686-w64-mingw32-gcc
  52. env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
  53. # Uncomment if there is reason to believe that PPC-specific problem
  54. # can be diagnosed with this possibly >30 mins sanitizer build...
  55. #- os: linux-ppc64le
  56. # sudo: false
  57. # compiler: gcc
  58. # env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
  59. - os: linux
  60. addons:
  61. apt:
  62. packages:
  63. - gcc-5
  64. - g++-5
  65. - golang-1.6
  66. sources:
  67. - ubuntu-toolchain-r-test
  68. compiler: gcc-5
  69. 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"
  70. - os: linux
  71. addons:
  72. apt:
  73. packages:
  74. - gcc-5
  75. - g++-5
  76. - golang-1.6
  77. sources:
  78. - ubuntu-toolchain-r-test
  79. compiler: gcc-5
  80. 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=95
  81. - os: linux
  82. compiler: clang
  83. env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
  84. - os: linux
  85. compiler: clang
  86. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg no-shared -fno-sanitize=alignment -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
  87. - os: linux
  88. compiler: clang
  89. 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"
  90. - os: linux
  91. addons:
  92. apt:
  93. packages:
  94. - gcc-5
  95. - g++-5
  96. sources:
  97. - ubuntu-toolchain-r-test
  98. compiler: gcc-5
  99. env: UBUNTU_GCC_HACK="yes" EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
  100. - os: linux
  101. addons:
  102. apt:
  103. packages:
  104. - binutils-mingw-w64
  105. - gcc-mingw-w64
  106. compiler: i686-w64-mingw32-gcc
  107. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  108. - os: linux
  109. addons:
  110. apt:
  111. packages:
  112. - binutils-mingw-w64
  113. - gcc-mingw-w64
  114. compiler: x86_64-w64-mingw32-gcc
  115. env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
  116. - os: linux
  117. language: python
  118. python: 3.7
  119. dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
  120. sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
  121. install: pip install flake8
  122. before_script:
  123. # stop the build if there are Python syntax errors or undefined names
  124. - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
  125. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  126. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  127. script: true
  128. exclude:
  129. - os: linux
  130. compiler: clang
  131. - os: osx
  132. compiler: gcc
  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) || exit 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 _build;
  142. cd _build;
  143. srcdir=../_srcdist;
  144. top=..;
  145. else
  146. srcdir=.;
  147. top=.;
  148. fi
  149. - if [ -n "$UBUNTU_GCC_HACK" ]; then
  150. $CC -dumpspecs | sed "s/--push-state//g; s/--pop-state/--as-needed/g" > gcc-specs.txt;
  151. CC="$CC -specs=gcc-specs.txt";
  152. fi
  153. - if [ "$CC" = i686-w64-mingw32-gcc ]; then
  154. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  155. $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
  156. elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
  157. export CROSS_COMPILE=${CC%%gcc}; unset CC;
  158. $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
  159. else
  160. if [ "$CC" = clang-3.9 ]; then
  161. sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
  162. curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
  163. echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
  164. sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
  165. sudo -E apt-get -yq update;
  166. sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
  167. elif which ccache >/dev/null; then
  168. CC="ccache $CC";
  169. fi;
  170. $srcdir/config -v $CONFIG_OPTS;
  171. fi
  172. - ./configdata.pm --dump
  173. - cd $top
  174. script:
  175. - if [ -z "$BUILDONLY" ]; then
  176. make="make -s";
  177. else
  178. make="make";
  179. fi
  180. - if [ -n "$GENERATE" ]; then
  181. make2="$make PERL=no-perl";
  182. else
  183. make2="$make";
  184. fi
  185. - top=${PWD}
  186. - if [ -n "$DESTDIR" ]; then
  187. cd _build;
  188. fi
  189. - if $make update; then
  190. echo -e '+\057 MAKE UPDATE OK';
  191. else
  192. echo -e '+\057 MAKE UPDATE FAILED'; false;
  193. fi
  194. - git diff --exit-code
  195. - if [ -n "$CHECKDOCS" ]; then
  196. if $make doc-nits; then
  197. echo -e '+\057\057 MAKE DOC-NITS OK';
  198. else
  199. echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
  200. fi;
  201. fi
  202. - if [ -n "$GENERATE" ]; then
  203. if $make build_all_generated; then
  204. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
  205. else
  206. echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
  207. fi;
  208. fi
  209. - if $make2; then
  210. echo -e '+\057\057\057\057 MAKE OK';
  211. else
  212. echo -e '+\057\057\057\057 MAKE FAILED'; false;
  213. fi;
  214. - if [ -z "$BUILDONLY" ]; then
  215. if [ -n "$CROSS_COMPILE" ]; then
  216. sudo dpkg --add-architecture i386;
  217. sudo apt-get update;
  218. sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
  219. export EXE_SHELL="wine" WINEPREFIX=`pwd`;
  220. fi;
  221. if [ -e krb5/src ]; then
  222. 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;
  223. fi;
  224. if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
  225. echo -e '+\057\057\057\057\057 MAKE TEST OK';
  226. else
  227. echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
  228. fi;
  229. else
  230. if $make build_tests >~/build.log 2>&1; then
  231. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
  232. else
  233. echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
  234. cat ~/build.log
  235. false;
  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 '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
  242. else
  243. echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
  244. cat ~/install.log;
  245. false;
  246. fi;
  247. fi
  248. - cd $top
  249. after_success:
  250. - if [ -n "$COVERALLS" ]; then
  251. coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
  252. fi;
  253. notifications:
  254. email:
  255. secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="