Fix seeding from random device w/o getrandom syscall
[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 -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           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         - os: linux
124           language: python
125           python: 3.7
126           dist: xenial    # required for Python 3.7 (travis-ci/travis-ci#9069)
127           sudo: required  # required for Python 3.7 (travis-ci/travis-ci#9069)
128           install: pip install flake8
129           before_script:
130             # stop the build if there are Python syntax errors or undefined names
131             - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
132             # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
133             - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
134           script: true
135     exclude:
136         - os: linux
137           compiler: clang
138         - os: osx
139           compiler: gcc
140
141 before_script:
142     - env
143     - if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
144           (git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
145       fi
146     - if [ -n "$DESTDIR" ]; then
147           sh .travis-create-release.sh $TRAVIS_OS_NAME;
148           tar -xzf _srcdist.tar.gz;
149           mkdir _build;
150           cd _build;
151           srcdir=../_srcdist;
152           top=..;
153       else
154           srcdir=.;
155           top=.;
156       fi
157     - if [ -n "$UBUNTU_GCC_HACK" ]; then
158           $CC -dumpspecs | sed "s/--push-state//g; s/--pop-state/--as-needed/g" > gcc-specs.txt;
159           CC="$CC -specs=gcc-specs.txt";
160       fi
161     - if [ "$CC" = i686-w64-mingw32-gcc ]; then
162           export CROSS_COMPILE=${CC%%gcc}; unset CC;
163           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
164       elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
165           export CROSS_COMPILE=${CC%%gcc}; unset CC;
166           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
167       else
168           if [ "$CC" = clang-3.9 ]; then
169               sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
170               curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
171               echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
172               sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
173               sudo -E apt-get -yq update;
174               sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
175           elif which ccache >/dev/null; then
176               CC="ccache $CC";
177           fi;
178           $srcdir/config -v $CONFIG_OPTS;
179       fi
180     - ./configdata.pm --dump
181     - cd $top
182
183 script:
184     - if [ -z "$BUILDONLY" ]; then
185           make="make -s";
186       else
187           make="make";
188       fi
189     - if [ -n "$GENERATE" ]; then
190           make2="$make PERL=no-perl";
191       else
192           make2="$make";
193       fi
194     - top=${PWD}
195     - if [ -n "$DESTDIR" ]; then
196           cd _build;
197       fi
198     - if $make update; then
199           echo -e '+\057 MAKE UPDATE OK';
200       else
201           echo -e '+\057 MAKE UPDATE FAILED'; false;
202       fi
203     - git diff --exit-code
204     - if [ -n "$CHECKDOCS" ]; then
205           if $make doc-nits; then
206               echo -e '+\057\057 MAKE DOC-NITS OK';
207           else
208               echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
209           fi;
210       fi
211     - if [ -n "$GENERATE" ]; then
212           if $make build_all_generated; then
213               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
214           else
215               echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
216           fi;
217       fi
218     - if $make2; then
219           echo -e '+\057\057\057\057 MAKE OK';
220       else
221           echo -e '+\057\057\057\057 MAKE FAILED'; false;
222       fi;
223     - if [ -z "$BUILDONLY" ]; then
224           if [ -n "$CROSS_COMPILE" ]; then
225               sudo dpkg --add-architecture i386;
226               sudo apt-get update;
227               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
228               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
229           fi;
230           if [ -e krb5/src ]; then
231               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;
232           fi;
233           if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
234               echo -e '+\057\057\057\057\057 MAKE TEST OK';
235           else
236               echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
237           fi;
238       else
239           if $make build_tests >~/build.log 2>&1; then
240               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
241           else
242               echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
243               cat ~/build.log
244               false;
245           fi;
246       fi
247     - if [ -n "$DESTDIR" ]; then
248           mkdir "$top/$DESTDIR";
249           if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
250               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
251           else
252               echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
253               cat ~/install.log;
254               false;
255           fi;
256       fi
257     - cd $top
258
259 after_success:
260     - if [ -n "$COVERALLS" ]; then
261           coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
262       fi;
263
264 notifications:
265     email:
266         secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="