Use ccache for the unified builds
[oweals/openssl.git] / .travis.yml
1 language: c
2 cache: ccache
3
4 addons:
5     apt:
6         packages:
7             - ccache
8             - clang-3.6
9             - gcc-5
10             - binutils-mingw-w64
11             - gcc-mingw-w64
12             - wine
13         sources:
14             - llvm-toolchain-precise-3.6
15             - ubuntu-toolchain-r-test
16
17 os:
18     - linux
19     - osx
20
21 compiler:
22     - clang
23     - gcc
24
25 env:
26     - CONFIG_OPTS="shared"
27     - CONFIG_OPTS="--debug --strict-warnings enable-crypto-mdebug enable-rc5 enable-md2"
28     - CONFIG_OPTS="" BUILDONLY="yes"
29     - CONFIG_OPTS="--classic" BUILDONLY="yes"
30     - CONFIG_OPTS="--classic shared" BUILDONLY="yes"
31     - CONFIG_OPTS="no-pic" BUILDONLY="yes"
32     - CONFIG_OPTS="no-engine" BUILDONLY="yes"
33
34 matrix:
35     include:
36         - os: linux
37           compiler: clang-3.6
38           env: CONFIG_OPTS="-fsanitize=address"
39         - os: linux
40           compiler: clang-3.6
41           env: CONFIG_OPTS="no-asm --strict-warnings -fno-sanitize-recover -fsanitize=address -fsanitize=undefined enable-rc5 enable-md2"
42         - os: linux
43           compiler: gcc-5
44           env: CONFIG_OPTS="-fsanitize=address"
45         - os: linux
46           compiler: gcc-5
47           env: CONFIG_OPTS="no-asm --strict-warnings -fno-sanitize-recover -fsanitize=address -fsanitize=undefined enable-rc5 enable-md2"
48         - os: linux
49           compiler: i686-w64-mingw32-gcc
50           env: CONFIG_OPTS="no-pic"
51         - os: linux
52           compiler: x86_64-w64-mingw32-gcc
53           env: CONFIG_OPTS="no-pic"
54     exclude:
55         - os: linux
56           compiler: clang
57         - os: osx
58           compiler: gcc
59
60 before_script:
61     - sh .travis-create-release.sh $TRAVIS_OS_NAME
62     - tar -xvzf _srcdist.tar.gz
63     - if echo "$CONFIG_OPTS" | grep "--unified" >/dev/null; then
64           srcdir=../_srcdir;
65           mkdir _build;
66           cd _build;
67           CC="ccache $CC";
68       else
69           srcdir=.;
70           cd _srcdist;
71       fi
72     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
73           export CROSS_COMPILE=${CC%%gcc}; unset CC;
74           $srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
75       elif [ "$CC" == x86_64-w64-mingw32-gcc ]; then
76           export CROSS_COMPILE=${CC%%gcc}; unset CC;
77           $srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
78       else
79           $srcdir/config $CONFIG_OPTS;
80       fi
81     - cd ..
82
83 script:
84     - if expr "$CONFIG_OPTS" : "--unified"; then
85           cd _build;
86       else
87           cd _srcdist;
88       fi
89     - make
90     - if [ -z "$BUILDONLY" ]; then
91           if [ -n "$CROSS_COMPILE" ]; then
92               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
93           fi;
94           HARNESS_VERBOSE=yes make test;
95       fi
96     - cd ..
97
98 notifications:
99     email:
100         - openssl-commits@openssl.org
101