Document OPENSSL_VERSION_TEXT macro
[oweals/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     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 --strict-warnings -std=c89 -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
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           addons:
41               apt:
42                   packages:
43                       - gcc-5
44                       - g++-5
45                   sources:
46                       - ubuntu-toolchain-r-test
47           compiler: gcc-5
48           env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
49         - os: linux
50           compiler: clang
51           env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
52         - os: linux
53           addons:
54               apt:
55                   packages:
56                       - binutils-mingw-w64
57                       - gcc-mingw-w64
58           compiler: i686-w64-mingw32-gcc
59           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
60         # Uncomment if there is reason to believe that PPC-specific problem
61         # can be diagnosed with this possibly >30 mins sanitizer build...
62         #- os: linux-ppc64le
63         #  sudo: false
64         #  compiler: gcc
65         #  env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
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 --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"
77         - os: linux
78           addons:
79               apt:
80                   packages:
81                       - gcc-5
82                       - g++-5
83                       - golang-1.6
84                   sources:
85                       - ubuntu-toolchain-r-test
86           compiler: gcc-5
87           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
88         - os: linux
89           compiler: clang
90           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
91         - os: linux
92           compiler: clang
93           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"
94         - os: linux
95           compiler: clang
96           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"
97         - os: linux
98           addons:
99               apt:
100                   packages:
101                       - gcc-5
102                       - g++-5
103                   sources:
104                       - ubuntu-toolchain-r-test
105           compiler: gcc-5
106           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
107         - os: linux
108           addons:
109               apt:
110                   packages:
111                       - binutils-mingw-w64
112                       - gcc-mingw-w64
113           compiler: i686-w64-mingw32-gcc
114           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
115         - os: linux
116           addons:
117               apt:
118                   packages:
119                       - binutils-mingw-w64
120                       - gcc-mingw-w64
121           compiler: x86_64-w64-mingw32-gcc
122           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
123     exclude:
124         - os: linux
125           compiler: clang
126         - os: osx
127           compiler: gcc
128
129 before_script:
130     - env
131     - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
132           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
133       fi
134     - if [ -n "$DESTDIR" ]; then
135           sh .travis-create-release.sh $TRAVIS_OS_NAME;
136           tar -xzf _srcdist.tar.gz;
137           mkdir _build;
138           cd _build;
139           srcdir=../_srcdist;
140           top=..;
141       else
142           srcdir=.;
143           top=.;
144       fi
145     - if [ -n "$UBUNTU_GCC_HACK" ]; then
146           $CC -dumpspecs | sed "s/--push-state//g; s/--pop-state/--as-needed/g" > gcc-specs.txt;
147           CC="$CC -specs=gcc-specs.txt";
148       fi
149     - if [ "$CC" = i686-w64-mingw32-gcc ]; then
150           export CROSS_COMPILE=${CC%%gcc}; unset CC;
151           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
152       elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
153           export CROSS_COMPILE=${CC%%gcc}; unset CC;
154           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
155       else
156           if [ "$CC" = clang-3.9 ]; then
157               sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
158               curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
159               echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
160               sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
161               sudo -E apt-get -yq update;
162               sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
163           elif which ccache >/dev/null; then
164               CC="ccache $CC";
165           fi;
166           $srcdir/config -v $CONFIG_OPTS;
167       fi
168     - ./configdata.pm --dump
169     - cd $top
170
171 script:
172     - if [ -z "$BUILDONLY" ]; then
173           make="make -s";
174       else
175           make="make";
176       fi
177     - if [ -n "$GENERATE" ]; then
178           make2="$make PERL=no-perl";
179       else
180           make2="$make";
181       fi
182     - top=${PWD}
183     - if [ -n "$DESTDIR" ]; then
184           cd _build;
185       fi
186     - if $make update; then
187           echo -e '+\057 MAKE UPDATE OK';
188       else
189           echo -e '+\057 MAKE UPDATE FAILED'; false;
190       fi
191     - git diff --exit-code
192     - if [ -n "$CHECKDOCS" ]; then
193           if $make doc-nits; then
194               echo -e '+\057\057 MAKE DOC-NITS OK';
195           else
196               echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
197           fi;
198       fi
199     - if [ -n "$GENERATE" ]; then
200           if $make build_all_generated; then
201               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
202           else
203               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
204           fi;
205       fi
206     - if $make2; then
207           echo -e '+\057\057\057\057 MAKE OK';
208       else
209           echo -e '+\057\057\057\057 MAKE FAILED'; false;
210       fi;
211     - if [ -z "$BUILDONLY" ]; then
212           if [ -n "$CROSS_COMPILE" ]; then
213               sudo dpkg --add-architecture i386;
214               sudo apt-get update;
215               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
216               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
217           fi;
218           if [ -e krb5/src ]; then
219               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;
220           fi;
221           if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
222               echo -e '+\057\057\057\057\057 MAKE TEST OK';
223           else
224               echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
225           fi;
226       else
227           if $make build_tests >~/build.log 2>&1; then
228               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
229           else
230               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
231               cat ~/build.log
232               false;
233           fi;
234       fi
235     - if [ -n "$DESTDIR" ]; then
236           mkdir "$top/$DESTDIR";
237           if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
238               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
239           else
240               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
241               cat ~/install.log;
242               false;
243           fi;
244       fi
245     - cd $top
246
247 after_success:
248     - if [ -n "$COVERALLS" ]; then
249           coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
250       fi;
251
252 notifications:
253     email:
254         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="