This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
/
.travis.yml
215 lines (204 loc) · 4.88 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
language: cpp
dist: focal
#
# Define the build matrix
#
matrix:
include:
# ASAN: Enable AddressSanitizer
- os: linux
name: 🐧 GCC ASAN
compiler: gcc
addons:
apt:
packages:
- g++-10
env:
- ENABLE_ASAN=ON
- CC=gcc-10
- CXX=g++-10
# Build less stuff so the build does not hit the timeout limit that often
- TOOLS=kdb
- BINDINGS=cpp
- "PLUGINS='\
ALL;\
-augeas;\
-base64;\
-blockresolver;\
-boolean;\
-c;\
-cachefilter;\
-ccode;\
-conditionals;\
-constants;\
-counter;\
-cpptemplate;\
-crypto;\
-csvstorage;\
-curlget;\
-date;\
-dbus;\
-dbusrecv;\
-desktop;\
-directoryvalue;\
-doc;\
-dpkg;\
-enum;\
-error;\
-fcrypt;\
-file;\
-filecheck;\
-gitresolver;\
-glob;\
-gpgme;\
-hexcode;\
-hexnumber;\
-hidden;\
-hosts;\
-iconv;\
-internalnotification;\
-ipaddr;\
-iterate;\
-keytometa;\
-line;\
-lineendings;\
-logchange;\
-mathcheck;\
-mini;\
-mmapstorage;\
-mmapstorage_crc;\
-mozprefs;\
-multifile;\
-network;\
-ni;\
-null;\
-passwd;\
-path;\
-process;\
-profile;\
-range;\
-regexstore;\
-rename;\
-required;\
-shell;\
-simplespeclang;\
-struct;\
-syslog;\
-tcl;\
-template;\
-timeofday;\
-tracer;\
-type;\
-uname;\
-validation;\
-wresolver;\
-xmltool;\
-yajl;\
-yambi;\
-yamlcpp;\
-yamlsmith;\
-yanlr;\
-zeromqrecv;\
-zeromqsend;\
'"
script:
- ninja
- ninja run_nocheckshell
- os: linux
name: 🐧 Clang ASAN
compiler: clang
env:
- ENABLE_ASAN=ON
- CC=clang
- CXX=clang++
script:
- ninja
- ninja run_all
# FULL: Build full version of Elektra (BUILD_FULL=ON)
- os: linux
name: 🐧 FULL
compiler: gcc
addons:
apt:
packages:
- g++-10
env:
- BUILD_FULL=ON
- BUILD_SHARED=OFF
- CC=gcc-10
- CXX=g++-10
script:
- ninja
- output="$(ninja install 2>&1)" || printf '%s' "$output"
- ninja run_all
- kdb-full run_all
- os: linux
name: 🐧 GCC
compiler: gcc
addons:
apt:
packages:
- g++-10
env:
- CC=gcc-10
- CXX=g++-10
- os: linux
name: 🐧 Clang
compiler: clang
env:
- CC=clang
- CXX=clang++
before_install:
- |
sudo apt-get -qq update
sudo apt-get install ninja-build
sudo apt-get install devscripts # contains `checkbashisms`
sudo apt-get install libyaml-cpp-dev
sudo apt-get install libuv1-dev
sudo apt-get install libdbus-1-dev
sudo apt-get install libev-dev
sudo apt-get install libzmq3-dev
sudo apt-get install libxerces-c-dev
sudo apt-get install python3-pip
sudo apt-get install moreutils # contains `sponge` required by `reformat-cmake`
sudo pip3 install cmake-format[yaml]==0.6.13
#
# Source is checked out in $TRAVIS_BUILD_DIR
# Build directory will be "$TRAVIS_BUILD_DIR/build"
#
before_script:
- |
cd $TRAVIS_BUILD_DIR
CMAKE_OPT+=(-DCMAKE_INSTALL_PREFIX="$PWD/install")
export PATH=$PATH:"$PWD/install/bin"
export LD_LIBRARY_PATH="$PWD/install/lib"
SYSTEM_DIR="$PWD/kdbsystem"
export CC_FOR_BUILD="$CC"
export CXX_FOR_BUILD="$CXX"
mkdir build && cd build
CMAKE_OPT+=(
-GNinja
-DPLUGINS="${PLUGINS:-ALL}"
-DBINDINGS="${BINDINGS:-ALL}"
-DTOOLS="${TOOLS:-ALL}"
-DBUILD_FULL="${BUILD_FULL:-OFF}"
-DBUILD_SHARED="${BUILD_SHARED:-ON}"
-DENABLE_ASAN="${ENABLE_ASAN:-OFF}"
-DCOMMON_FLAGS="${COMMON_FLAGS--Werror}"
-DENABLE_DEBUG=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DKDB_DB_SYSTEM="$SYSTEM_DIR"
-DKDB_DEFAULT_STORAGE="${KDB_DEFAULT_STORAGE:-dump}"
-DKDB_DB_FILE="${KDB_DB_FILE:-default.ecf}"
-DKDB_DB_INIT="${KDB_DB_INIT:-elektra.ecf}"
$TRAVIS_BUILD_DIR
)
- |
printf '—— CMake Config ——\n'
for option in "${CMAKE_OPT[@]}"; do printf '%s\n' "$option"; done
- cmake ${CMAKE_OPT[@]}
script:
- travis_wait 30 ninja
- output="$(ninja install 2>&1)" || printf '%s' "$output"
- travis_wait 30 ninja run_all
- travis_wait 30 kdb run_all