Bump to libevent 2.1.11
[platform/upstream/libevent.git] / .travis.yml
1 os:
2   - linux
3   - osx
4 sudo: false
5 dist: trusty
6 osx_image: xcode10.1
7
8 branches:
9   except:
10   - /.*appveyor.*/
11   - /.*win.*/
12   - /.*mingw.*/
13   - /.*freebsd.*/
14   - /.*bitrise.*/
15
16 git:
17   quiet: true
18
19 env:
20   matrix:
21     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=debug" COVERALLS=yes
22     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS=""
23     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
24     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
25     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
26     - EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
27     - EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS=""
28     - EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-openssl"
29     - EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
30     - EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
31     - EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
32
33 matrix:
34   exclude:
35     - os: osx
36       env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=debug" COVERALLS=yes
37   allow_failures:
38     - os: osx
39   fast_finish: true
40
41 language: c
42 compiler:
43   - gcc
44   - clang
45
46 before_install:
47   # do not run with clang, since it fails (SIGSEGV)
48   - if [ "$CC" = "clang" ]; then
49       unset COVERALLS;
50     fi
51   - if [ -n "$COVERALLS" ]; then
52       pip install --user cpp-coveralls;
53     fi
54   - export JOBS=20
55   - export TIMEOUT=50
56   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
57       if [ "$CC" == "gcc" ]; then
58         export CC=$(ls /usr/local/Cellar/gcc/*/bin/gcc-?);
59       fi
60
61       export OPENSSL_ROOT=$(echo /usr/local/Cellar/openssl/*);
62       export
63         CMAKE_INCLUDE_PATH=$OPENSSL_ROOT/include
64         CMAKE_LIBRARY_PATH=$OPENSSL_ROOT/lib;
65       export
66         CFLAGS=-I$CMAKE_INCLUDE_PATH
67         LDFLAGS=-L$CMAKE_LIBRARY_PATH;
68
69       export JOBS=1;
70     fi
71
72 addons:
73   apt:
74     sources:
75     - xenial
76     - sourceline: 'deb http://archive.ubuntu.com/ubuntu xenial main'
77     packages:
78     - zlib1g-dev
79     - libssl-dev
80     - build-essential
81     - automake
82     - autoconf
83     - cmake
84     - lcov
85   homebrew:
86     packages:
87     - openssl
88     - lcov
89     - libtool
90     - gcc
91
92
93 script:
94   - if [ "$EVENT_BUILD_METHOD" = "autotools" ]; then
95       ./autogen.sh &&
96       ./configure $EVENT_CONFIGURE_OPTIONS &&
97       make &&
98       travis_wait $TIMEOUT make -j $JOBS verify;
99     fi
100   - if [ "$EVENT_BUILD_METHOD" = "cmake" ]; then
101       export
102         CTEST_PARALLEL_LEVEL=$JOBS
103         CTEST_OUTPUT_ON_FAILURE=1;
104
105       mkdir build &&
106       cd build &&
107       cmake .. $EVENT_CMAKE_OPTIONS &&
108       travis_wait $TIMEOUT
109       cmake --build . --target verify;
110     fi
111
112 after_script:
113   - if [ -n "$COVERALLS" ]; then
114       coveralls
115         --build-root .
116         --root ..
117         --exclude test
118         --exclude sample
119         --exclude cmake
120         --exclude build/CMakeFiles/CheckTypeSize
121         --exclude build/CMakeFiles/CompilerIdC
122         --gcov-options '\-lp';
123     fi