.travis.yml: temporarily mask gcc-5 ubsan build.
[openssl.git] / .travis.yml
1 dist: trusty
2 sudo: required
3
4 osx_image: xcode9.3
5
6 language: c
7 cache: ccache
8 git:
9     submodules: false
10
11 before_install:
12     - if [ -n "$COVERALLS" ]; then
13           pip install --user cpp-coveralls;
14       fi;
15     - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
16           git submodule update --init --recursive;
17       fi;
18
19 os:
20     - linux
21     - osx
22
23 compiler:
24     - clang
25     - gcc
26
27 env:
28     - CONFIG_OPTS="" DESTDIR="_install"
29     - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
30     - CONFIG_OPTS="no-asm no-makedepend --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
31
32 matrix:
33     include:
34         - os: linux
35           addons:
36               apt:
37                   packages:
38                       - gcc-5
39                       - g++-5
40                   sources:
41                       - ubuntu-toolchain-r-test
42           compiler: gcc-5
43           env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
44         - os: linux
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         - os: linux
56           addons:
57               apt:
58                   packages:
59                       - gcc-5
60                       - g++-5
61                       - golang-1.6
62                   sources:
63                       - ubuntu-toolchain-r-test
64           compiler: gcc-5
65           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"
66         - os: linux
67           addons:
68               apt:
69                   packages:
70                       - gcc-5
71                       - g++-5
72                       - golang-1.6
73                   sources:
74                       - ubuntu-toolchain-r-test
75           compiler: gcc-5
76           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
77         - os: linux
78           compiler: clang
79           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
80         - os: linux
81           compiler: clang
82           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"
83         - os: linux
84           compiler: clang
85           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"
86         #- os: linux
87         #  addons:
88         #      apt:
89         #          packages:
90         #              - gcc-5
91         #              - g++-5
92         #          sources:
93         #              - ubuntu-toolchain-r-test
94         #  compiler: gcc-5
95         #  env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
96         - os: linux
97           addons:
98               apt:
99                   packages:
100                       - binutils-mingw-w64
101                       - gcc-mingw-w64
102           compiler: i686-w64-mingw32-gcc
103           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
104         - os: linux
105           addons:
106               apt:
107                   packages:
108                       - binutils-mingw-w64
109                       - gcc-mingw-w64
110           compiler: x86_64-w64-mingw32-gcc
111           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
112     exclude:
113         - os: linux
114           compiler: clang
115         - os: osx
116           compiler: gcc
117
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 [ "$CC" = clang-3.9 ]; then
142               sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
143               curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
144               echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
145               sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
146               sudo -E apt-get -yq update;
147               sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
148           elif which ccache >/dev/null; then
149               CC="ccache $CC";
150           fi;
151           $srcdir/config -v $CONFIG_OPTS;
152       fi
153     - ./configdata.pm --dump
154     - cd $top
155
156 script:
157     - if [ -z "$BUILDONLY" ]; then
158           make="make -s";
159       else
160           make="make";
161       fi
162     - if [ -n "$GENERATE" ]; then
163           make2="$make PERL=no-perl";
164       else
165           make2="$make";
166       fi
167     - top=${PWD}
168     - if [ -n "$DESTDIR" ]; then
169           cd _build;
170       fi
171     - if $make update; then
172           echo -e '+\057 MAKE UPDATE OK';
173       else
174           echo -e '+\057 MAKE UPDATE FAILED'; false;
175       fi;
176       git diff --exit-code
177     - if [ -n "$CHECKDOCS" ]; then
178           if $make doc-nits; then
179               echo -e '+\057\057 MAKE DOC-NITS OK';
180           else
181               echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
182           fi;
183       fi
184     - if [ -n "$GENERATE" ]; then
185           if $make build_all_generated; then
186               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
187           else
188               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
189           fi;
190       fi
191     - if $make2; then
192           echo -e '+\057\057\057\057 MAKE OK';
193       else
194           echo -e '+\057\057\057\057 MAKE FAILED'; false;
195       fi;
196     - if [ -z "$BUILDONLY" ]; then
197           if [ -n "$CROSS_COMPILE" ]; then
198               sudo dpkg --add-architecture i386;
199               sudo apt-get update;
200               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
201               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
202           fi;
203           if [ -e krb5/src ]; then
204               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;
205           fi;
206           if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
207               echo -e '+\057\057\057\057\057 MAKE TEST OK';
208           else
209               echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
210           fi;
211       else
212           if $make build_tests >~/build.log 2>&1; then
213               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
214           else
215               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
216               cat ~/build.log
217               false;
218           fi;
219       fi
220     - if [ -n "$DESTDIR" ]; then
221           mkdir "$top/$DESTDIR";
222           if $make install install_docs DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
223               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
224           else
225               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
226               cat ~/install.log;
227               false;
228           fi;
229       fi
230     - cd $top
231
232 after_success:
233     - if [ -n "$COVERALLS" ]; then
234           coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
235       fi;
236
237 notifications:
238     email:
239         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="