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