NOTES.WIN: mention Strawberry Perl as option.
[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" 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           addons:
49               apt:
50                   packages:
51                       - clang-3.9
52                   sources:
53                       - llvm-toolchain-trusty-3.9
54                       - ubuntu-toolchain-r-test
55           compiler: clang-3.9
56           env: CONFIG_OPTS="--strict-warnings no-deprecated" BUILDONLY="yes"
57         - os: linux
58           addons:
59               apt:
60                   packages:
61                       - binutils-mingw-w64
62                       - gcc-mingw-w64
63           compiler: i686-w64-mingw32-gcc
64           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
65         - os: linux
66           addons:
67               apt:
68                   packages:
69                       - gcc-5
70                       - g++-5
71                   sources:
72                       - ubuntu-toolchain-r-test
73           compiler: gcc-5
74           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 enable-external-tests no-shared -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" COVERALLS="yes" BORINGSSL_TESTS="yes" CXX="g++-5"
75         - os: linux
76           addons:
77               apt:
78                   packages:
79                       - clang-3.9
80                   sources:
81                       - llvm-toolchain-trusty-3.9
82                       - ubuntu-toolchain-r-test
83           compiler: clang-3.9
84           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan"
85         - os: linux
86           addons:
87               apt:
88                   packages:
89                       - clang-3.9
90                   sources:
91                       - llvm-toolchain-trusty-3.9
92                       - ubuntu-toolchain-r-test
93           compiler: clang-3.9
94           env:  EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg -fno-sanitize=alignment no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
95         - os: linux
96           addons:
97               apt:
98                   packages:
99                       - clang-3.9
100                   sources:
101                       - llvm-toolchain-trusty-3.9
102                       - ubuntu-toolchain-r-test
103           compiler: clang-3.9
104           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2 no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
105         - os: linux
106           addons:
107               apt:
108                   packages:
109                       - gcc-5
110                       - g++-5
111                   sources:
112                       - ubuntu-toolchain-r-test
113           compiler: gcc-5
114           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC"
115         - os: linux
116           addons:
117               apt:
118                   packages:
119                       - binutils-mingw-w64
120                       - gcc-mingw-w64
121           compiler: i686-w64-mingw32-gcc
122           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic" TESTS="-test_fuzz"
123         - os: linux
124           addons:
125               apt:
126                   packages:
127                       - binutils-mingw-w64
128                       - gcc-mingw-w64
129           compiler: x86_64-w64-mingw32-gcc
130           env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic" TESTS="-test_fuzz"
131     exclude:
132         - os: linux
133           compiler: clang
134         - os: osx
135           compiler: gcc
136
137 before_script:
138     - env
139     - if [ "$TRAVIS_EVENT_TYPE" == "pull_request" -a -n "$EXTENDED_TEST" ]; then
140           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
141       fi
142     - if [ -n "$DESTDIR" ]; then
143           sh .travis-create-release.sh $TRAVIS_OS_NAME;
144           tar -xvzf _srcdist.tar.gz;
145           mkdir _build;
146           cd _build;
147           srcdir=../_srcdist;
148           top=..;
149       else
150           srcdir=.;
151           top=.;
152       fi
153     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
154           export CROSS_COMPILE=${CC%%gcc}; unset CC;
155           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
156       elif [ "$CC" == x86_64-w64-mingw32-gcc ]; then
157           export CROSS_COMPILE=${CC%%gcc}; unset CC;
158           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
159       else
160           if which ccache >/dev/null && [ "$CC" != clang-3.9 ]; then
161               CC="ccache $CC";
162           fi;
163           $srcdir/config -v $CONFIG_OPTS;
164       fi
165     - cd $top
166
167 script:
168     - if [ -z "$BUILDONLY" ]; then
169           make="make -s";
170       else
171           make="make";
172       fi
173     - top=${PWD}
174     - if [ -n "$DESTDIR" ]; then
175           cd _build;
176       fi
177     - $make update
178     - if [ -n "$CHECKDOCS" ]; then
179           $make doc-nits;
180       fi
181     - $make
182     - if [ -z "$BUILDONLY" ]; then
183           if [ -n "$CROSS_COMPILE" ]; then
184               sudo dpkg --add-architecture i386;
185               sudo apt-get update;
186               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
187               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
188           fi;
189           HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test;
190       else
191           $make build_tests;
192       fi
193     - if [ -n "$DESTDIR" ]; then
194           mkdir "$top/$DESTDIR";
195           $make install install_docs DESTDIR="$top/$DESTDIR";
196       fi
197     - cd $top
198
199 after_success:
200     - if [ -n "$COVERALLS" ]; then
201           coveralls -b . --gcov gcov-5 --gcov-options '\-lp';
202       fi;
203
204 notifications:
205     email:
206         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="