64cb95d9374fd26a088db624641a552ef1e323c4
[openssl.git] / .travis.yml
1 language: c
2 cache: ccache
3
4 before_install:
5     - pip install --user cpp-coveralls
6
7 addons:
8     apt:
9         packages:
10             - ccache
11             - clang-3.6
12             - gcc-5
13             - binutils-mingw-w64
14             - gcc-mingw-w64
15         sources:
16             - llvm-toolchain-precise-3.6
17             - ubuntu-toolchain-r-test
18
19 os:
20     - linux
21     - osx
22
23 compiler:
24     - clang
25     - gcc
26
27 env:
28     - CONFIG_OPTS="" DESTDIR="_install"
29     - CONFIG_OPTS="--debug no-shared enable-crypto-mdebug enable-rc5 enable-md2"
30     - CONFIG_OPTS="no-pic --strict-warnings" BUILDONLY="yes"
31     - CONFIG_OPTS="no-engine no-shared --strict-warnings" BUILDONLY="yes"
32     - CONFIG_OPTS="no-stdio --strict-warnings" BUILDONLY="yes"
33
34 matrix:
35     include:
36         - os: linux
37           compiler: gcc
38           env: CONFIG_OPTS="--debug --coverage no-asm enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers" COVERALLS="yes"
39         - os: linux
40           compiler: clang-3.6
41           env: CONFIG_OPTS="enable-asan"
42         - os: linux
43           compiler: clang-3.6
44           env: CONFIG_OPTS="enable-msan"
45         - os: linux
46           compiler: clang-3.6
47           env: CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method -fno-sanitize=alignment"
48         - os: linux
49           compiler: clang-3.6
50           env: CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2"
51         - os: linux
52           compiler: clang-3.6
53           env: CONFIG_OPTS="no-stdio"
54         - os: linux
55           compiler: gcc-5
56           env: CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC"
57         - os: linux
58           compiler: i686-w64-mingw32-gcc
59           env: CONFIG_OPTS="no-pic"
60         - os: linux
61           compiler: i686-w64-mingw32-gcc
62           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
63         - os: linux
64           compiler: x86_64-w64-mingw32-gcc
65           env: CONFIG_OPTS="no-pic"
66         - os: linux
67           compiler: x86_64-w64-mingw32-gcc
68           env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
69     exclude:
70         - os: linux
71           compiler: clang
72         - os: osx
73           compiler: gcc
74
75 before_script:
76     - if [ -n "$DESTDIR" ]; then
77           sh .travis-create-release.sh $TRAVIS_OS_NAME;
78           tar -xvzf _srcdist.tar.gz;
79           mkdir _build;
80           cd _build;
81           srcdir=../_srcdist;
82           top=..;
83       else
84           srcdir=.;
85           top=.;
86       fi
87     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
88           export CROSS_COMPILE=${CC%%gcc}; unset CC;
89           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
90       elif [ "$CC" == x86_64-w64-mingw32-gcc ]; then
91           export CROSS_COMPILE=${CC%%gcc}; unset CC;
92           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
93       else
94           if which ccache >/dev/null && [ "$CC" != clang-3.6 ]; then
95               CC="ccache $CC";
96           fi;
97           $srcdir/config -v $CONFIG_OPTS;
98       fi
99     - cd $top
100
101 script:
102     - if [ -z "$BUILDONLY" ]; then
103           make="make -s";
104       else
105           make="make";
106       fi
107     - if [ -n "$DESTDIR" ]; then
108           cd _build;
109           top=..;
110       else
111           top=.;
112       fi
113     - $make update
114     - $make
115     - if [ -z "$BUILDONLY" ]; then
116           if [ -n "$CROSS_COMPILE" ]; then
117               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
118               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
119           fi;
120           HARNESS_VERBOSE=yes make test;
121       else
122           $make build_tests;
123       fi
124     - if [ -n "$DESTDIR" ]; then
125           mkdir "../$DESTDIR";
126           $make install install_docs DESTDIR="../$DESTDIR";
127       fi
128     - cd $top
129
130 after_success:
131     - if [ -n "$COVERALLS" ]; then
132           coveralls -b . --gcov-options '\-lp';
133       fi;
134
135 notifications:
136     email:
137         - openssl-commits@openssl.org
138