Fix error handling in X509_chain_up_ref
[openssl.git] / .travis.yml
1 dist: xenial
2 sudo: required
3
4 osx_image: xcode9.3
5
6 language: c
7 cache: ccache
8 git:
9     submodules: false
10     quiet: true
11
12 before_install:
13     - if [ -n "$COVERALLS" ]; then
14           pip install --user cpp-coveralls;
15       fi;
16     - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
17           git submodule update --init --recursive;
18       fi;
19
20 os:
21     - linux
22     - osx
23
24 compiler:
25     - clang
26     - gcc
27
28 env:
29     - CONFIG_OPTS="" DESTDIR="_install"
30     - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
31     - CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes" CPPFLAGS="-ansi"
32
33 matrix:
34     include:
35         - os: linux-ppc64le
36           sudo: false
37           compiler: clang
38           env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
39         - os: linux
40           compiler: gcc
41           env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
42         - os: linux
43           dist: trusty
44           compiler: clang
45           env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
46         - os: linux
47           dist: bionic
48           compiler: clang
49           env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
50         - os: linux
51           addons:
52               apt:
53                   packages:
54                       - binutils-mingw-w64
55                       - gcc-mingw-w64
56           compiler: i686-w64-mingw32-gcc
57           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
58         # Uncomment if there is reason to believe that PPC-specific problem
59         # can be diagnosed with this possibly >30 mins sanitizer build...
60         #- os: linux-ppc64le
61         #  sudo: false
62         #  compiler: gcc
63         #  env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
64         - os: linux
65           addons:
66               apt:
67                   packages:
68                       - golang-1.10
69           compiler: gcc
70           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++"
71         - os: linux
72           addons:
73               apt:
74                   packages:
75                       - golang-1.10
76           compiler: gcc
77           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
78         - os: linux
79           compiler: clang
80           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
81         - os: linux
82           compiler: clang
83           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++"
84         - os: linux
85           compiler: clang
86           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"
87         - os: linux
88           compiler: gcc
89           env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 enable-buildtest-c++ -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
90         - os: linux
91           addons:
92               apt:
93                   packages:
94                       - binutils-mingw-w64
95                       - gcc-mingw-w64
96           compiler: i686-w64-mingw32-gcc
97           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
98         - os: linux
99           addons:
100               apt:
101                   packages:
102                       - binutils-mingw-w64
103                       - gcc-mingw-w64
104           compiler: x86_64-w64-mingw32-gcc
105           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
106         - os: linux
107           language: python
108           python: 3.7
109           install: pip install flake8
110           before_script:
111             # stop the build if there are Python syntax errors or undefined names
112             - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
113             # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
114             - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
115           script: true
116     exclude:
117         - os: linux
118           compiler: clang
119         - os: osx
120           compiler: gcc
121
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) || exit 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
153 script:
154     - if [ -z "$BUILDONLY" ]; then
155           make="make -s";
156       else
157           make="make";
158       fi
159     - if [ -n "$GENERATE" ]; then
160           make2="$make PERL=no-perl";
161       else
162           make2="$make";
163       fi
164     - top=${PWD}
165     - if [ -n "$DESTDIR" ]; then
166           cd _build;
167       fi
168     - if $make update; then
169           echo -e '+\057 MAKE UPDATE OK';
170       else
171           echo -e '+\057 MAKE UPDATE FAILED'; false;
172       fi
173     - git diff --exit-code
174     - if [ -n "$CHECKDOCS" ]; then
175           if $make doc-nits; then
176               echo -e '+\057\057 MAKE DOC-NITS OK';
177           else
178               echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
179           fi;
180       fi
181     - if [ -n "$GENERATE" ]; then
182           if $make build_all_generated; then
183               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
184           else
185               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
186           fi;
187       fi
188     - if $make2; then
189           echo -e '+\057\057\057\057 MAKE OK';
190       else
191           echo -e '+\057\057\057\057 MAKE FAILED'; false;
192       fi;
193     - if [ -z "$BUILDONLY" ]; then
194           if [ -n "$CROSS_COMPILE" ]; then
195               sudo dpkg --add-architecture i386;
196               sudo apt-get update;
197               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
198               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
199           fi;
200           if [ -e krb5/src ]; then
201               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;
202           fi;
203           if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
204               echo -e '+\057\057\057\057\057 MAKE TEST OK';
205           else
206               echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
207           fi;
208       else
209           if $make build_tests >~/build.log 2>&1; then
210               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
211           else
212               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
213               cat ~/build.log
214               false;
215           fi;
216       fi
217     - if [ -n "$DESTDIR" ]; then
218           mkdir "$top/$DESTDIR";
219           if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
220               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
221           else
222               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
223               cat ~/install.log;
224               false;
225           fi;
226       fi
227     - cd $top
228
229 after_success:
230     - if [ -n "$COVERALLS" ]; then
231           coveralls -b . --gcov gcov --gcov-options '\-lpbc';
232       fi;
233
234 notifications:
235     email:
236         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="