65cf6b10a9998ea69975825ef9a49cfec9f8ce79
[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                       - cmake
97                       - libtest2-suite-perl
98           compiler: gcc
99           # External test pyca-cryptography temporarily disabled due to long term travis failures
100           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 test_external_gost_engine"
101         - os: linux
102           compiler: clang
103           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -Wno-unused-command-line-argument"
104         - os: linux
105           compiler: clang
106           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++"
107         - os: linux
108           compiler: gcc
109           env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 enable-buildtest-c++ -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
110         - os: linux
111           dist: xenial
112           addons:
113               apt:
114                   packages:
115                       - binutils-mingw-w64
116                       - gcc-mingw-w64
117           compiler: i686-w64-mingw32-gcc
118           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
119         - os: linux
120           dist: xenial
121           addons:
122               apt:
123                   packages:
124                       - binutils-mingw-w64
125                       - gcc-mingw-w64
126           compiler: x86_64-w64-mingw32-gcc
127           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
128         - os: linux
129           language: python
130           python: 3.7
131           install: pip install flake8
132           before_script:
133             # stop the build if there are Python syntax errors or undefined names
134             - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
135             # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
136             - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
137           script: true
138         - os: linux
139           compiler: gcc
140           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"
141
142
143 before_script:
144     - env
145     - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
146           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || travis_terminate 0;
147       fi
148     - if [ -n "$DESTDIR" ]; then
149           sh .travis-create-release.sh $TRAVIS_OS_NAME;
150           tar -xzf _srcdist.tar.gz;
151           mkdir -p _build/tree;
152           cd _build/tree;
153           srcdir=../../_srcdist;
154           top=../..;
155       else
156           srcdir=.;
157           top=.;
158       fi
159     - if [ "$CC" = i686-w64-mingw32-gcc ]; then
160           export CROSS_COMPILE=${CC%%gcc}; unset CC;
161           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
162       elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
163           export CROSS_COMPILE=${CC%%gcc}; unset CC;
164           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
165       else
166           if which ccache >/dev/null && test "$BORINGSSL_TESTS" != yes; then
167               CC="ccache $CC";
168           fi;
169           if [ -n "$CONFIGURE_TARGET" ]; then
170               $srcdir/Configure $CONFIGURE_TARGET $CONFIG_OPTS;
171           else
172               $srcdir/config -v $CONFIG_OPTS;
173           fi;
174       fi
175     - ./configdata.pm --dump
176     - cd $top
177
178 script:
179     - if [ -z "$BUILDONLY" ] && [ -z "$MAKEVERBOSE" ] ; then
180           make="make -s";
181       else
182           make="make";
183       fi
184     - if [ -n "$GENERATE" ]; then
185           make2="$make PERL=no-perl";
186       else
187           make2="$make";
188       fi
189     - top=${PWD}
190     - if [ -n "$DESTDIR" ]; then
191           cd _build/tree;
192       fi
193     - if ! $make update; then
194           echo -e '\052\052 FAILED -- MAKE UPDATE';
195           travis_terminate 1;
196       fi
197     - if ! git diff --exit-code; then
198           echo -e '\052\052 FAILED -- UPDATED FILES NOT COMMITTED';
199           travis_terminate 1;
200       fi
201     - if test -n "$GENERATE" && ! $make build_all_generated; then
202           echo -e '\052\052 FAILED -- MAKE BUILD_ALL_GENERATED';
203           travis_terminate 1;
204       fi
205     - if test -n "$CHECKDOCS" && ! $make doc-nits; then
206           echo -e '\052\052 FAILED -- MAKE DOC-NITS';
207           travis_terminate 1;
208       fi
209     - if test -n "$MARKDOWNLINT" ; then
210           if ! gem install mdl ; then
211               echo -e '\052\052 FAILED -- GEM INSTALL MDL';
212               travis_terminate 1;
213           fi;
214           if ! $make md-nits ; then
215               echo -e '\052\052 FAILED -- MAKE MD-NITS';
216               travis_terminate 1;
217           fi;
218       fi
219     - if ! $make2; then
220           echo -e '\052\052 FAILED -- MAKE';
221           travis_terminate 1;
222       fi;
223     - if test -n "$CHECKDOCS" && ! $make cmd-nits; then
224           echo -e '\052\052 FAILED -- MAKE CMD-NITS';
225           travis_terminate 1;
226       fi
227     - if [ -z "$BUILDONLY" ]; then
228           if [ -n "$CROSS_COMPILE" ]; then
229               sudo dpkg --add-architecture i386;
230               sudo apt-get update;
231               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
232               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
233           fi;
234           if [ -e krb5/src ]; then
235               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;
236           fi;
237           if ! HARNESS_VERBOSE_FAILURE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner travis_wait 60 make _tests; then
238               echo -e '\052\052 FAILED -- MAKE TEST';
239               travis_terminate 1;
240           fi;
241       else
242           if ! $make build_tests >~/build.log 2>&1; then
243               echo -e '\052\052 FAILED -- MAKE BUILD_TESTS';
244               cat ~/build.log
245               travis_terminate 1;
246           fi;
247       fi
248     - if [ -n "$DESTDIR" ]; then
249           mkdir "$top/$DESTDIR";
250           if ! $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
251               echo -e '\052\052 FAILED -- MAKE INSTALL';
252               cat ~/install.log;
253               travis_terminate 1;
254           fi;
255       fi
256     - cd $top
257     - echo -e '\052\052 DONE'
258
259 after_success:
260     - if [ -n "$COVERALLS" ]; then
261           coveralls -b . --gcov gcov --gcov-options '\-lpbc';
262       fi;
263
264 notifications:
265     email:
266         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="