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