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