0ac0eb5bf965767b74e410c789bcf44253e80693
[openssl.git] / .travis.yml
1 dist: bionic
2
3 osx_image: xcode9.3
4
5 language: c
6 cache: ccache
7 git:
8     submodules: false
9     quiet: true
10
11 before_install:
12     - if [ -n "$COVERALLS" ]; then
13           travis_retry pip install --user cpp-coveralls;
14       fi;
15     - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
16           travis_retry git submodule update --init --recursive;
17       fi;
18     - eval "${MATRIX_EVAL}"
19
20 arch:
21     - amd64
22
23 os:
24     - linux
25     - osx
26
27 compiler:
28     - clang
29     - gcc
30
31 env:
32     # Note: env entry here must exactly match the value in the exclude: table below that contains env:, otherwise it will not find a match.
33     - CONFIG_OPTS="" DESTDIR="_install"
34     - CONFIG_OPTS="no-asm --debug --strict-warnings no-afalgeng no-shared enable-rc5 enable-md2 -fsanitize=address" LSAN_OPTIONS="report_objects=1"
35     - CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
36
37 jobs:
38     exclude:
39         - os: linux
40           compiler: clang
41           env: CONFIG_OPTS="" DESTDIR="_install"
42         - os: linux
43           compiler: clang
44           env: CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
45         - os: osx
46           compiler: gcc
47         - os: osx
48           env: CONFIG_OPTS="no-asm --debug --strict-warnings no-afalgeng no-shared enable-rc5 enable-md2 -fsanitize=address" LSAN_OPTIONS="report_objects=1"
49     include:
50         - os: linux
51           arch: arm64
52           compiler: gcc
53           env: CONFIG_OPTS="--strict-warnings" MAKEVERBOSE="yes"
54         - os: linux
55           arch: arm64
56           compiler: gcc
57           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"
58         - os: linux
59           arch: s390x
60           compiler: gcc
61           env: CONFIG_OPTS="--strict-warnings"
62         - os: linux-ppc64le
63           compiler: gcc
64           env: CONFIG_OPTS="--strict-warnings"
65         - os: linux
66           compiler: gcc
67           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"
68         - os: linux
69           dist: trusty
70           compiler: clang
71           env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
72         - os: linux
73           dist: xenial
74           compiler: gcc
75           env: CONFIG_OPTS="--strict-warnings no-deprecated enable-rc5 enable-md2"
76         - os: linux
77           addons:
78               apt:
79                   packages:
80                       - binutils-mingw-w64
81                       - gcc-mingw-w64
82           compiler: i686-w64-mingw32-gcc
83           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
84         - os: linux
85           addons:
86               apt:
87                   packages:
88                       - golang-1.10
89           compiler: gcc
90           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++"
91         - os: linux
92           addons:
93               apt:
94                   packages:
95                       - golang-1.10
96           compiler: gcc
97           # External test pyca-cryptography temporarily disabled due to long term travis failures
98           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"
99         - os: linux
100           compiler: clang
101           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -Wno-unused-command-line-argument"
102         - os: linux
103           compiler: clang
104           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 -Wno-unused-command-line-argument" CXX="clang++"
105         - os: linux
106           compiler: gcc
107           env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 enable-buildtest-c++ -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
108         - os: linux
109           dist: xenial
110           addons:
111               apt:
112                   packages:
113                       - binutils-mingw-w64
114                       - gcc-mingw-w64
115           compiler: i686-w64-mingw32-gcc
116           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
117         - os: linux
118           dist: xenial
119           addons:
120               apt:
121                   packages:
122                       - binutils-mingw-w64
123                       - gcc-mingw-w64
124           compiler: x86_64-w64-mingw32-gcc
125           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
126         - os: linux
127           language: python
128           python: 3.7
129           install: pip install flake8
130           before_script:
131             # stop the build if there are Python syntax errors or undefined names
132             - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
133             # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
134             - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
135           script: true
136         - os: linux
137           compiler: gcc
138           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-asm -DOPENSSL_NO_SECURE_MEMORY -DOPENSSL_SMALL_FOOTPRINT"
139
140
141 before_script:
142     - env
143     - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
144           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || travis_terminate 0;
145       fi
146     - if [ -n "$DESTDIR" ]; then
147           sh .travis-create-release.sh $TRAVIS_OS_NAME;
148           tar -xzf _srcdist.tar.gz;
149           mkdir -p _build/tree;
150           cd _build/tree;
151           srcdir=../../_srcdist;
152           top=../..;
153       else
154           srcdir=.;
155           top=.;
156       fi
157     - if [ "$CC" = i686-w64-mingw32-gcc ]; then
158           export CROSS_COMPILE=${CC%%gcc}; unset CC;
159           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
160       elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
161           export CROSS_COMPILE=${CC%%gcc}; unset CC;
162           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
163       else
164           if which ccache >/dev/null && test "$BORINGSSL_TESTS" != yes; then
165               CC="ccache $CC";
166           fi;
167           if [ -n "$CONFIGURE_TARGET" ]; then
168               $srcdir/Configure $CONFIGURE_TARGET $CONFIG_OPTS;
169           else
170               $srcdir/config -v $CONFIG_OPTS;
171           fi;
172       fi
173     - ./configdata.pm --dump
174     - cd $top
175
176 script:
177     - if [ -z "$BUILDONLY" ] && [ -z "$MAKEVERBOSE" ] ; then
178           make="make -s";
179       else
180           make="make";
181       fi
182     - if [ -n "$GENERATE" ]; then
183           make2="$make PERL=no-perl";
184       else
185           make2="$make";
186       fi
187     - top=${PWD}
188     - if [ -n "$DESTDIR" ]; then
189           cd _build/tree;
190       fi
191     - if ! $make update; then
192           echo -e '\052\052 FAILED -- MAKE UPDATE';
193           travis_terminate 1;
194       fi
195     - if ! git diff --exit-code; then
196           echo -e '\052\052 FAILED -- UPDATED FILES NOT COMMITTED';
197           travis_terminate 1;
198       fi
199     - if test -n "$GENERATE" && ! $make build_all_generated; then
200           echo -e '\052\052 FAILED -- MAKE BUILD_ALL_GENERATED';
201           travis_terminate 1;
202       fi
203     - if test -n "$CHECKDOCS" && ! $make doc-nits; then
204           echo -e '\052\052 FAILED -- MAKE DOC-NITS';
205           travis_terminate 1;
206       fi
207     - if test -n "$MARKDOWNLINT" ; then
208           echo -e "====START MARKDOWNLINT====";
209           gem install mdl || travis_terminate 1;
210           mdl -s util/markdownlint.rb . || travis_terminate 1;
211           echo -e "====END MARKDOWNLINT====";
212       fi
213     - if ! $make2; then
214           echo -e '\052\052 FAILED -- MAKE';
215           travis_terminate 1;
216       fi;
217     - if test -n "$CHECKDOCS" && ! $make cmd-nits; then
218           echo -e '\052\052 FAILED -- MAKE CMD-NITS';
219           travis_terminate 1;
220       fi
221     - if [ -z "$BUILDONLY" ]; then
222           if [ -n "$CROSS_COMPILE" ]; then
223               sudo dpkg --add-architecture i386;
224               sudo apt-get update;
225               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
226               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
227           fi;
228           if [ -e krb5/src ]; then
229               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;
230           fi;
231           if ! HARNESS_VERBOSE_FAILURE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner travis_wait 60 make _tests; then
232               echo -e '\052\052 FAILED -- MAKE TEST';
233               travis_terminate 1;
234           fi;
235       else
236           if ! $make build_tests >~/build.log 2>&1; then
237               echo -e '\052\052 FAILED -- MAKE BUILD_TESTS';
238               cat ~/build.log
239               travis_terminate 1;
240           fi;
241       fi
242     - if [ -n "$DESTDIR" ]; then
243           mkdir "$top/$DESTDIR";
244           if ! $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
245               echo -e '\052\052 FAILED -- MAKE INSTALL';
246               cat ~/install.log;
247               travis_terminate 1;
248           fi;
249       fi
250     - cd $top
251     - echo -e '\052\052 DONE'
252
253 after_success:
254     - if [ -n "$COVERALLS" ]; then
255           coveralls -b . --gcov gcov --gcov-options '\-lpbc';
256       fi;
257
258 notifications:
259     email:
260         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="