util/mkdef.pl: Add UNIX as a platform
[openssl.git] / .travis.yml
1 dist: trusty
2 sudo: required
3
4 language: c
5 cache: ccache
6 git:
7     submodules: false
8
9 before_install:
10     - if [ -n "$COVERALLS" ]; then
11           pip install --user cpp-coveralls;
12       fi;
13     - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
14           git submodule update --init --recursive;
15       fi;
16
17 addons:
18     apt:
19         packages:
20             - ccache
21             - golang-1.6
22
23 os:
24     - linux
25
26 compiler:
27     - clang
28     - gcc
29
30 env:
31     - CONFIG_OPTS="" DESTDIR="_install" TESTS="-test_fuzz"
32     - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2 enable-aria" TESTS="-test_fuzz"
33     - CONFIG_OPTS="no-asm --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes"
34
35 matrix:
36     include:
37         - os: linux
38           addons:
39               apt:
40                   packages:
41                       - gcc-5
42                       - g++-5
43                   sources:
44                       - ubuntu-toolchain-r-test
45           compiler: gcc-5
46           env: CONFIG_OPTS="--strict-warnings enable-tls1_3" TESTS="-test_fuzz" COMMENT="Move to the BORINGTEST build when interoperable"
47         - os: linux
48           compiler: clang-3.9
49           env: CONFIG_OPTS="--strict-warnings 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         - os: linux
59           addons:
60               apt:
61                   packages:
62                       - gcc-5
63                       - g++-5
64                   sources:
65                       - ubuntu-toolchain-r-test
66           compiler: gcc-5
67           env:  EXTENDED_TEST="yes" CONFIG_OPTS="--debug --coverage no-asm enable-rc5 enable-md2 enable-aria 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"
68         - os: linux
69           addons:
70               apt:
71                   packages:
72                       - gcc-5
73                       - g++-5
74                   sources:
75                       - ubuntu-toolchain-r-test
76           compiler: gcc-5
77           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
78         - os: linux
79           compiler: clang-3.9
80           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan"
81         - os: linux
82           compiler: clang-3.9
83           env:  EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-aria enable-ssl3 enable-ssl3-method enable-nextprotoneg -fno-sanitize=alignment no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
84         - os: linux
85           compiler: clang-3.9
86           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2 enable-aria no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
87         - os: linux
88           addons:
89               apt:
90                   packages:
91                       - gcc-5
92                       - g++-5
93                   sources:
94                       - ubuntu-toolchain-r-test
95           compiler: gcc-5
96           env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 enable-aria -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
97         - os: linux
98           addons:
99               apt:
100                   packages:
101                       - binutils-mingw-w64
102                       - gcc-mingw-w64
103           compiler: i686-w64-mingw32-gcc
104           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic" TESTS="-test_fuzz"
105         - os: linux
106           addons:
107               apt:
108                   packages:
109                       - binutils-mingw-w64
110                       - gcc-mingw-w64
111           compiler: x86_64-w64-mingw32-gcc
112           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic" TESTS="-test_fuzz"
113     exclude:
114         - os: linux
115           compiler: clang
116         - os: osx
117           compiler: gcc
118
119 before_script:
120     - env
121     - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
122           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
123       fi
124     - if [ -n "$DESTDIR" ]; then
125           sh .travis-create-release.sh $TRAVIS_OS_NAME;
126           tar -xvzf _srcdist.tar.gz;
127           mkdir _build;
128           cd _build;
129           srcdir=../_srcdist;
130           top=..;
131       else
132           srcdir=.;
133           top=.;
134       fi
135     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
136           export CROSS_COMPILE=${CC%%gcc}; unset CC;
137           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
138       elif [ "$CC" == x86_64-w64-mingw32-gcc ]; then
139           export CROSS_COMPILE=${CC%%gcc}; unset CC;
140           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
141       else
142           if [ "$CC" == clang-3.9 ]; then
143               sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
144               curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
145               echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
146               sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
147               sudo -E apt-get -yq update;
148               sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
149           elif which ccache >/dev/null; then
150               CC="ccache $CC";
151           fi;
152           $srcdir/config -v $CONFIG_OPTS;
153       fi
154     - cd $top
155
156 script:
157     - if [ -z "$BUILDONLY" ]; then
158           make="make -s";
159       else
160           make="make";
161       fi
162     - top=${PWD}
163     - if [ -n "$DESTDIR" ]; then
164           cd _build;
165       fi
166     - $make update;
167       git diff --quiet
168     - if [ -n "$CHECKDOCS" ]; then
169           $make doc-nits;
170       fi
171     - $make
172     - if [ -z "$BUILDONLY" ]; then
173           if [ -n "$CROSS_COMPILE" ]; then
174               sudo dpkg --add-architecture i386;
175               sudo apt-get update;
176               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
177               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
178           fi;
179           if [ -e krb5/src ]; then
180               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;
181           fi;
182           HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test;
183       else
184           $make build_tests;
185       fi
186     - if [ -n "$DESTDIR" ]; then
187           mkdir "$top/$DESTDIR";
188           $make install install_docs DESTDIR="$top/$DESTDIR";
189       fi
190     - cd $top
191
192 after_success:
193     - if [ -n "$COVERALLS" ]; then
194           coveralls -b . --gcov gcov-5 --gcov-options '\-lp';
195       fi;
196
197 notifications:
198     email:
199         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="