forked from zeromq/czmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
261 lines (241 loc) · 9.38 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# Travis CI script
# This is a skeleton created by zproject.
# You can add hand-written code here.
#
# NOTE: Take care if regenerating this file, it was customized
# after generation, be sure to review and keep those changes.
# The `git difftool` is your friend here.
language:
- c
cache:
- ccache
os:
- linux
- osx
### Note to use ubuntu14 repos below, if the default distro is trusty
#dist:
#- xenial
dist: trusty
#services:
#- docker
sudo: false
compiler:
- gcc
# Set CI_TIME=true to enable build-step profiling in Travis
# Set CI_TRACE=true to enable shell script tracing in Travis
# Set CI_CONFIG_QUIET=true to enable "configure --quiet" (only report stderr)
# Set CI_REQUIRE_GOOD_GITIGNORE=false to NOT fail if "git status -s" is not clean
# Set CI_REQUIRE_GOOD_CLANG_FORMAT=true to fail if "clang-format" check is not clean
env:
global:
- CI_TIME=false
- CI_TRACE=true
- CI_CONFIG_QUIET=true
- CI_REQUIRE_GOOD_GITIGNORE=false
- CI_REQUIRE_GOOD_CLANG_FORMAT=false
- CI_TEST_DISTCHECK=true
# Note: Secure variables must be global!
#
# Wikidot upload credentials.
- secure: "zatpgQ+uk65yWVmV0qlPX2D37cMBk96AiccGKDXD35z7P2Roo5Fec9GJAHrzHiNbEICGkKLjoOQ36hPAgoezBQt6HTvWF5B61P+WIFDRN0DaBvmChxjfO68QWreu6V30TLvFBa1tHYoHYOc8yEnOrF/zcGp0jzalbucWm479RMM="
- secure: "ZcLn2Suo/YsKObDPk0hKJJbpe8bOMGZCFwBItq6vE00ZLteNqkamjdNC4p+jaX/9v+G8x1yrKfwti/WJ0/nlTqwaKyy2IhYNKCW0qYctew3w9QXG8OJqOrt0meayAskBO0ZV3RrSLdbwnFx9Nz7smAiCTy/XNkX5hhbDH3NGBSI="
# Bintray upload credentials. (BINTRAY_USER and BINTRAY_KEY are encrypted!)
# These are used to publish the czmq jni bindings to bintray when the deploy
# step is triggered.
- secure: "ZMvDhR/PxayFeHd70j8J5f260ydu4pSkMV4HFAjRd1e0YuYCy5PUCFIbXWpZ8XujlxcFVSOkfaekIvs4P5KejkKNxoJM+caJ4DAUW/zwtsrHhL1jT7HsCFdEpL2vcOZFXsfWBXkniVU800vgaV+YK4jfewyv0rPTQaImuMlrgRU="
- secure: "Tc1HPM1HnWr4ZwtPKFMasrLLFgW0WHMZs6ncBFZMhKVKTjUnBO7zdKw4ZXvSEaa1pxqvJhuQRjcbmVL2H8NmT3IdWg7ToSTuDHazUP03QBGvXVKMxIhnPI9cOzsz6LQUklNY4WihairAwlt8hnD+85pU1vl0hEhMNmHLJ7RiT+4="
- BINTRAY_USER_ORG=zeromq
# tokens to deploy releases on OBS.
# 1) Create 2 OBS tokens with osc token --create network:messaging:zeromq:release-<stable|draft> <project>
# encrypt them with travis encrypt --org -r <org>/<repo> OBS_<STABLE|DRAFT>_TOKEN="<token>"
# 2) Uncomment the three "secure" lines and paste the three generated hashed
# strings, which include each token's name, as parameters
- secure: O0nI2RARxdXndopjlNI1EnnLvgbjbSk3+ZFuyxz2eW0zGm4/Bx7lRfQSqXnKtEGyjFsGdthVji24h5g1EQnrX0mmOvweH0tiTdfjfubnaUGMStU2DtGPOZMLE93khdwJcOsM9XeSsYK9MeTz3SYTLGsNcXDd6enOnrVygzUdmlk=
- secure: LYZtGhy+XiKeUOLaqceeTRUZo76y2oo6f8Uv/c8Qvy9LcYueE+lDT5njXO/wUNVKt+V5TRZX/pURxo4osCB1Ax/tNoHIhcsvLzBEsjnd40MBfxvr8finBFVj4v/HOyguLMCljo4GhF4t71T+PY+Ewq5WYo3vxpKNmroZlrHp2Zg=
- secure: lrkGh4GMacTQJPXgOTtb4PhUnMJEaiXUFXbrsVxeqZBHtFua5bX3gJ34yNkcDOhSqY6LrRJAB4NJu7qIJoh+SzoOwKtR4+pTGh86ioOswjImSNBvVnid/DVPI1w0eDPlMSeq8zESZQ4rurFqRi+gvi7oW2BIlCRrejagDErNmpY=
matrix:
- BUILD_TYPE=default
- BUILD_TYPE=default-Werror
- BUILD_TYPE=stable_zmq ZMQ_REPO=zeromq2-x
- BUILD_TYPE=stable_zmq ZMQ_REPO=zeromq3-x
- BUILD_TYPE=stable_zmq ZMQ_REPO=zeromq4-x
- BUILD_TYPE=stable_zmq ZMQ_REPO=zeromq4-1
- BUILD_TYPE=cmake
- BUILD_TYPE=bindings BINDING=python
# - BUILD_TYPE=check-py
# Prerequisite packages provided by OS distro and used "as is"
# NOTE: For travis, we want the pre-built libcurl4-nss-dev variant
# rather than a build from scratch
pkg_deps_prereqs_distro: &pkg_deps_prereqs_distro
- uuid-dev
- libsystemd-dev
- liblz4-dev
- libcurl4-nss-dev
# Prerequisite packages that may be built from source or used from
# prebuilt packages of that source (usually not from an OS distro)
# NOTE: For travis, we want also libsodium as a common dependency
pkg_deps_prereqs_source: &pkg_deps_prereqs_source
- libsodium-dev
- libzmq3-dev
# - libcurl4-nss-dev
pkg_deps_prereqs: &pkg_deps_prereqs
- *pkg_deps_prereqs_source
- *pkg_deps_prereqs_distro
# NOTE: Currently the shell script does support use of packages or checkout
# of latest github code for these tools - but only from zeromq org repos,
# no forks/branches.
# NOTE: We do not use packaged zproject as it may be stale if OBS lags,
# use a fresh build every time, this one is cheap.
pkg_deps_zproject: &pkg_deps_zproject
- generator-scripting-language
# - zproject
pkg_deps_doctools: &pkg_deps_doctools
- asciidoc
- xmlto
pkg_deps_devtools: &pkg_deps_devtools
- git
pkg_src_zeromq_ubuntu14: &pkg_src_zeromq_ubuntu14
- sourceline: 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_14.04/ ./'
key_url: 'http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_14.04/Release.key'
pkg_src_zeromq_ubuntu16: &pkg_src_zeromq_ubuntu16
- sourceline: 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_16.04/ ./'
key_url: 'http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_16.04/Release.key'
# Note: refer to ubuntu16 if you use dist==xenial
# Also note that as of early 2017, either dist==trusty or services==docker
# is needed for C++11 support; docker envs are usually faster to start up
addons:
apt:
sources: *pkg_src_zeromq_ubuntu14
packages: &pkg_deps_common
- *pkg_deps_devtools
- *pkg_deps_prereqs
homebrew:
packages:
- libsodium
- binutils
- valgrind
matrix:
include:
- env: BUILD_TYPE=default-with-docs
os: linux
# dist: xenial
dist: trusty
compiler: gcc
addons:
apt:
sources: *pkg_src_zeromq_ubuntu14
packages:
- *pkg_deps_common
- *pkg_deps_doctools
# temporary disabled, does not work
# - env: BUILD_TYPE=docs
# os: linux
- env: BUILD_TYPE=valgrind
os: linux
# dist: xenial
dist: trusty
compiler: gcc
addons:
apt:
sources: *pkg_src_zeromq_ubuntu14
packages:
- valgrind
- *pkg_deps_common
- env: BUILD_TYPE=default
os: windows
- env: BUILD_TYPE=android
compiler: clang
- env: BUILD_TYPE=bindings BINDING=jni
os: osx
language: java
jdk: openjdk13
compiler: clang
- env: BUILD_TYPE=bindings BINDING=jni
os: linux
dist: trusty
language: java
jdk: openjdk8
compiler: clang
- env: BUILD_TYPE=bindings BINDING=jni BINDING_OPTS=android
os: linux
dist: trusty
language: java
jdk: openjdk8
compiler: clang
- env: BUILD_TYPE=default ADDRESS_SANITIZER=enabled
os: linux
# dist: xenial
dist: trusty
compiler: gcc
addons:
apt:
sources: *pkg_src_zeromq_ubuntu14
packages:
- *pkg_deps_common
- env: BUILD_TYPE=check_zproject
os: linux
# dist: xenial
dist: trusty
compiler: gcc
addons:
apt:
sources: *pkg_src_zeromq_ubuntu14
packages:
- *pkg_deps_devtools
- *pkg_deps_zproject
- env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=clang-format-5.0
# For non-cmake users, there is an autotools solution with a bit more overhead
# to have dependencies ready and pass configure script before making this check).
# Note that the autotools variant will also require dependencies preinstalled to
# pass its configure script:
# - env: BUILD_TYPE=clang-format-check CLANG_FORMAT=clang-format-5.0
os: linux
dist: xenial
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
#autotools# - *pkg_deps_prereqs
# Note: the ABI compliance checker script currently assumes that:
# 1) Your project sources have a "latest_release" branch or tag
# to check out and compare the current commit's ABI to;
# 2) Prerequisites are available as packages - no custom rebuilds.
- env: BUILD_TYPE=abi-compliance-checker
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'deb http://ppa.launchpad.net/hnakamur/universal-ctags/ubuntu bionic main'
key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x60D954A11017341E'
packages:
- *pkg_deps_common
- universal-ctags
- abi-dumper
- abi-compliance-checker
# ZMQ stress tests need more open socket (files) than the usual default
# On OSX, it seems the way to set the max files limit is constantly changing, so
# try to use all known knobs to ensure compatibility across various versions
before_script:
- if [ $TRAVIS_OS_NAME == "osx" ] ; then sudo sysctl -w kern.maxfiles=64000 ; sudo sysctl -w kern.maxfilesperproc=64000 ; sudo launchctl limit maxfiles 64000 64000 ; ulimit -n 64000 ; fi
# Hand off to generated script for each BUILD_TYPE
script: ./ci_build.sh
# Prepare deployment
before_deploy: . ./ci_deploy.sh && ./ci_deploy_obs.sh
# Upload the prepared deployment to github
deploy:
provider: releases
api_key:
# To encrypt your access token run: `travis encrypt -r user/repo`
#secure: <encrypted github access token>
secure: tQgYveuVEQhskgvJXilEURJd4CETCa8eWwEhFyVjITeDq5GLlOzUWCuCWygg0kAIx2I+WH0ybQz+L4hUSe5/EedoGtaXRxmV+4CUWAKaO8hqkccszwpClpJRvblPjXF6s/TL003Hm/bTPKrEaGApUPL4hwjEnXvPoGejGcTNfok=
file_glob: true
file: ${CZMQ_DEPLOYMENT}
skip_cleanup: true
on:
branch: master
tags: true
condition: $TRAVIS_OS_NAME =~ (linux) && ($BUILD_TYPE =~ (default) || ($BUILD_TYPE =~ (bindings) && $BINDING =~ (jni)))