Add a coverage target
[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             - wine
16         sources:
17             - llvm-toolchain-precise-3.6
18             - ubuntu-toolchain-r-test
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="--debug no-shared enable-crypto-mdebug enable-rc5 enable-md2"
31     - CONFIG_OPTS="no-pic --strict-warnings" BUILDONLY="yes"
32     - CONFIG_OPTS="no-engine no-shared --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="no-shared enable-asan"
42         - os: linux
43           compiler: clang-3.6
44           env: CONFIG_OPTS="no-shared 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-shared no-asm enable-asan enable-rc5 enable-md2"
51         - os: linux
52           compiler: gcc-5
53           env: CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC"
54         - os: linux
55           compiler: i686-w64-mingw32-gcc
56           env: CONFIG_OPTS="no-pic"
57         - os: linux
58           compiler: x86_64-w64-mingw32-gcc
59           env: CONFIG_OPTS="no-pic"
60     exclude:
61         - os: linux
62           compiler: clang
63         - os: osx
64           compiler: gcc
65
66 before_script:
67     - if [ -n "$DESTDIR" ]; then
68           sh .travis-create-release.sh $TRAVIS_OS_NAME;
69           tar -xvzf _srcdist.tar.gz;
70           mkdir _build;
71           cd _build;
72           srcdir=../_srcdist;
73           top=..;
74       else
75           srcdir=.;
76           top=.;
77       fi
78     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
79           export CROSS_COMPILE=${CC%%gcc}; unset CC;
80           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
81       elif [ "$CC" == x86_64-w64-mingw32-gcc ]; then
82           export CROSS_COMPILE=${CC%%gcc}; unset CC;
83           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
84       else
85           if which ccache >/dev/null && [ "$CC" != clang-3.6 ]; then
86               CC="ccache $CC";
87           fi;
88           $srcdir/config $CONFIG_OPTS;
89       fi
90     - cd $top
91
92 script:
93     - if [ -n "$DESTDIR" ]; then
94           cd _build;
95           top=..;
96       else
97           top=.;
98       fi
99     - make update
100     - make
101     - if [ -z "$BUILDONLY" ]; then
102           if [ -n "$CROSS_COMPILE" ]; then
103               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
104           fi;
105           HARNESS_VERBOSE=yes make test;
106       else
107           make build_tests;
108       fi
109     - if [ -n "$DESTDIR" ]; then
110           mkdir "../$DESTDIR";
111           make install install_docs DESTDIR="../$DESTDIR";
112       fi
113     - cd $top
114
115 after_success:
116     - if [ -n "$COVERALLS" ]; then
117           coveralls -b .;
118       fi;
119
120 notifications:
121     email:
122         - openssl-commits@openssl.org
123