forked from libevent/libevent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
176 lines (161 loc) · 4.89 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
os:
- linux
- osx
sudo: false
dist: trusty
osx_image: xcode10.1
branches:
except:
- /.*appveyor.*/
- /.*win.*/
- /.*mingw.*/
- /.*freebsd.*/
- /.*bitrise.*/
git:
quiet: true
env:
matrix:
- EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS=""
- EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
- EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
- EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
- EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
- EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS=""
- EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-openssl"
- EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
- EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
- EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
matrix:
include:
# clang
- os: linux
env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS=""
compiler: clang
- os: linux
env: EVENT_BUILD_METHOD=autotools EVENT_CONFIGURE_OPTIONS=""
compiler: clang
## coveralls
#- os: linux
# env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=debug" COVERALLS=yes
# test-export
- os: linux
env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" TEST_EXPORT=STATIC
- os: linux
env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON" TEST_EXPORT=SHARED
# for openssl1.1
- os: linux
dist: bionic
env: EVENT_BUILD_METHOD=cmake EVENT_CMAKE_OPTIONS="" OPENSSL_1_1=yes
## deploy documentation to github pages
#- os: linux
# env: TOOL=doxygen
# addons:
# apt:
# packages:
# - doxygen
# - doxygen-doc
# - doxygen-latex
# - doxygen-gui
# - graphviz
# - cmake
# branches:
# only:
# - master
# if: repo = libevent/libevent AND branch = master AND type != pull_request
fast_finish: true
language: c
# osx will use Apple LLVM clang, but we are fine with this,
# since we just use default compiler.
compiler: gcc
before_install:
- if [ -n "$COVERALLS" ]; then
pip install --user cpp-coveralls;
fi
- export JOBS=20
- export TIMEOUT=50
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export OPENSSL_ROOT=$(echo /usr/local/Cellar/openssl/*);
export
CMAKE_INCLUDE_PATH=$OPENSSL_ROOT/include
CMAKE_LIBRARY_PATH=$OPENSSL_ROOT/lib;
export
CFLAGS=-I$CMAKE_INCLUDE_PATH
LDFLAGS=-L$CMAKE_LIBRARY_PATH;
export JOBS=1;
fi
addons:
apt:
sources:
- xenial
- sourceline: 'deb http://archive.ubuntu.com/ubuntu xenial main'
packages:
- zlib1g-dev
- libssl-dev
- build-essential
- automake
- autoconf
- cmake
- lcov
homebrew:
packages:
- openssl
- lcov
- libtool
- gcc
script:
- if [ "$EVENT_BUILD_METHOD" = "autotools" ]; then
./autogen.sh;
./configure $EVENT_CONFIGURE_OPTIONS;
time make -j $JOBS;
time make -j $JOBS verify;
fi
- if [ "$EVENT_BUILD_METHOD" = "cmake" ]; then
export
CTEST_PARALLEL_LEVEL=$JOBS
CTEST_OUTPUT_ON_FAILURE=1;
mkdir build &&
cd build &&
cmake .. $EVENT_CMAKE_OPTIONS;
if [ "$TEST_EXPORT" == "STATIC" ]; then
cmake --build .;
sudo python3 ../test-export/test-export.py static;
elif [ "$TEST_EXPORT" == "SHARED" ]; then
cmake --build .;
sudo python3 ../test-export/test-export.py shared;
else
time cmake --build .;
time cmake --build . --target verify;
fi
fi
- if [ "$TOOL" == "doxygen" ]; then
eval "$(ssh-agent -s)";
openssl aes-256-cbc
-K $encrypted_82aa789583ed_key
-iv $encrypted_82aa789583ed_iv
-in .github/travis-ci-key.enc
-out .github/travis-ci-key -d;
chmod 600 .github/travis-ci-key;
ssh-add .github/travis-ci-key;
mkdir build &&
cd build &&
cmake -DEVENT__DOXYGEN=ON .. &&
cmake --build . --target doxygen;
cd doxygen/html;
git init;
git add -f .;
git commit -am "Update documentation ($TRAVIS_REPO_SLUG@$TRAVIS_COMMIT)";
git push -f [email protected]:libevent/doc.git master;
fi
after_script:
- if [ -n "$COVERALLS" ]; then
coveralls
--build-root .
--root ..
--exclude test
--exclude sample
--exclude cmake
--exclude build/CMakeFiles/CheckTypeSize
--exclude build/CMakeFiles/CompilerIdC
--gcov-options '\-lp';
fi