-
Notifications
You must be signed in to change notification settings - Fork 104
/
project.xml
445 lines (400 loc) · 24.3 KB
/
project.xml
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
<!--
The project.xml generates build environments for:
autotools GNU build system (default)
cmake CMake build system (default)
android Native shared library for Android
cucumber Integration with cucumber-c
cygwin Cygwin build system
debian packaging for Debian
delphi Delphi binding
docker packaging for Docker
ios Native library for iOS
java Java JNI binding
java-msvc MSVC builds for Java JNI binding
jenkins Jenkins pipeline build
mingw32 Mingw32 build system
nuget Packaging for NuGet
python Python binding
qml QML binding
qt Qt binding
redhat Packaging for RedHat
ruby Ruby binding
gh_actions Github Actions configuration (same options as travis)
travis Travis CI scripts
<option name="dist" value="trusty" /> Select a Linux distribution to use by default on Travis CI, also impacts the OBS-served repository of ZMQ-family packages to use (if not building from source all the time per use_pkg_deps_prereqs_source below). By default it would be "xenial" as of now.
<option name="distcheck" value="0" /> "0" will disable run of make distcheck in Travis CI, "2" will enable it as a special testcase allowed to fail (default: 1 to enable and require to pass)
<option name="use_pkg_deps_prereqs_source" value="0" /> "0" will disable use of use_pkg_deps_prereqs_source list in Travis CI and so cause rebuild of everything from scratch (default: 1, recently packaged prereqs must exist then)
<option name="use_cmake" value="0" /> "0" will disable use of CMake recipes in Travis CI (default: 1)
<option name="require_gitignore" value="1" /> "1" will require that the workspace is clean with regard to .gitignore settings after build (default: 0)
<option name="clangformat_allow_failures" value="0" /> "1" will generate the option allowing non-fatal failure of clang-format test in Travis CI (default: 1)
<option name="clangformat_require_good" value="0" /> "1" will generate the option allowing to report and not ignore failure of clang-format test in Travis CI (otherwise "0" hides the failure, and devs must look in test logs) (default: same as allow_failures)
<option name="clangformat_implem" value="cmake|autotools" /> will pick one of two implems of the clang-format test in Travis CI (cmake is default and faster if available, since autotools needs to configure first)
<option name="check_abi_compliance" value="0" /> "1" will compare the currently tested commit's ABI to the one in a "latest_release" branch or tag, using packaged prerequisites. Due to these limitations, the option is off by default.
<option name="check_zproject" value="0" /> "1" will regenerate the zproject of the tested commit, and will verify that nothing changed, "2" will enable it as a special testcase allowed to fail. Many projects do customize their originally generated codebase, so to avoid surprises this option is off by default.
<option name="shadow_gcc" value="0" /> "1" will enable builds with warnings configured as fatal in additional recent versions of GCC, and "2" will make failures in these cases non-fatal so you can take time to modernize your code with modern best practices in mind. This is off "0" by default.
<option name="shadow_clang" value="0" /> "1" will enable builds with warnings configured as fatal in additional recent versions of CLANG, and "2" will make failures in these cases non-fatal so you can take time to modernize your code with modern best practices in mind. This is off "0" by default.
vs2008 Microsoft Visual Studio 2008
vs2010 Microsoft Visual Studio 2010
vs2012 Microsoft Visual Studio 2012
vs2013 Microsoft Visual Studio 2013
vs2015 Microsoft Visual Studio 2015
Classes are automatically added to all build environments. Further as you
add new classes to your project you can generate skeleton header and source
files according to http://rfc.zeromq.org/spec:21.
script := The gsl script to generate all the stuff !!! DO NOT CHANGE !!!
name := The name of your project (optional)
description := A short description for your project (optional)
email := The email address where to reach you (optional)
url := The website or similar resource about the project or its ecosystem (optional)
repository := git repository holding project (optional)
unique_class_name := "0"|"1" (optional, defaults to 0) As a failsafe, forbid naming agents or classes same as the project itself (can cause conflicts in generated header filenames). Disable explicitly (set to 0) only in legacy projects that can not regenerate otherwise, and try to fix those.
license := optional common tag of the project's license ("MPLv2", "GPL-2.0+", "CompanyName Proprietary" etc.); see also license.xml for longer wording
check_license_years := "0"|"1"|"2" (optional, defaults to 0) When a project is regenerated, and if any license text(s) are defined, we check that at least one Copyright line in at least one license text contains the current year, and warn if not. If this option is set to "1", we also pause so that interactive developers can see this warning better and intervene. With "2" require that the year is mentioned, abort GSL with year if it is not.
-->
<project script = "zproject.gsl" name = "zproject"
email = "[email protected]"
license = "MPL-2.0"
check_license_years = "0"
url = "https://github.com/zeromq/zproject"
repository = "https://github.com/zeromq/zproject">
<!--
Includes are processed first, so XML in included files will be
part of the XML tree. This file can provide content of such tags
as <license> (detailed text to put in generated file headers)
and <starting_year> (a number to put in packaging copyright
summaries). Note that a verbatim "license.xml" file would be
created if it is currently missing but the tag is present, and
then it would be seeded with a current starting_year and some
boilerplate reminder to specify a real license and copyright.
-->
<include filename = "license.xml" />
<!--
Current version of your project.
This will be used to package your distribution
-->
<version major = "1" minor = "1" patch = "0" />
<!--
Current libtool ABI version of your project's shared library.
Start at 0:0:0 and see:
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
for details on how/when to increment it.
If not defined 0:0:0 will be used.
<abi current = "0" revision = "0" age = "0" />
-->
<!--
Check that the <symbol> is available after including a given <header>
and store the result in a macro HAVE_DECL_SYMBOL. When the symbol is
declared, HAVE_DECL_SYMBOL is defined to '1' otherwise '0'. Use
HAVE_DECL_SYMBOL in #if:
#if HAVE_DECL_SYMBOL
// Do something with the symbol
#endif
#if !HAVE_DECL_SYMBOL
// Alternative action without the symbol
#endif
<check_symbol_exists symbol = AI_V4MAPPED"" header = "netdb.h" />
-->
<!--
Specify which other projects this depends on.
These projects must be known by zproject, and the list of
known projects is maintained in the zproject_known_projects.xml model.
You need not specify sub-dependencies if they are implied.
Dependencies that support the autotools build system are automatically
built by travis ci if you supply a git repository or a tarball URI.
Set type to "runtime" to have the packages install-depend on it rather
than build-depend (default type is "build").
The travis ci will use the installed packages when building instead of
rebuilding if available.
<use project = "zyre" min_major= "1" min_minor = "1" min_patch = "0" />
<use project = "czmq"
min_major= "3" min_minor = "0" min_patch = "2"
next_incompatible_major = "4"
/>
<use project = "uuid" optional= "1" implied = "1" />
<use project = "myfirstlib" repository = "http://myfirstlib.org/myfirstlib.git" />
<use project = "mysecondlib" tarball = "http://mysecondlib.org/mysecondlib-1.2.3.tar.gz" />
<use project = "lua-5.1" am_lib_macro = "LUA_5_1" tarball = "..." />
-->
<use project = "gsl" type = "runtime" />
<!-- Header Files
name := The name the header file to include without file ending
<header name = "myproject_prelude" />
-->
<!--
Classes, if the class header or source file doesn't exist, this will
generate a skeletons for them.
Use private = "1" for internal classes
Use selftest = "0" to not generate selftest code
<class name = "myclass">Public class description</class>
<class name = "someother" private = "1">Private class description</class>
-->
<!--
Actors, are built using the simple actor framework from czmq. If the
actors class header or source file doesn't exist, this will generate a
skeleton for them. The generated test method of the actor will teach
you how to use them. Also have a look at the CZMQ docs to learn more
about actors.
Use selftest = "0" to not generate selftest code
<actor name = "myactor">Public actor description</actor>
<actor name = "someactor" private = "1">Private actor description</actor>
-->
<!--
Main programs built by the project
use private = "1" for internal tools
<main name = "progname">Exported public tool</main>
<main name = "progname" private = "1">Internal tool</main>
<main name = "progname" service = "1">Installed as system service, single-instance</main>
<main name = "progname" service = "2">Installed as system service, multi-instance (@)</main>
<main name = "progname" service = "3">Installed as system service, both single and multi-instance (@)</main>
<main name = "progname" timer = "3">Installed as system timer unit, both single and multi-instance (@)</main>
<main name = "progname" service = "1" timer = "1">Installed with both system timer and service units, single-instance - probably the former triggers the latter occasionally</main>
Note that <bin> tags for secondary distributed programs (or scripts)
now also support the service and timer attributes with same semantics.
-->
<!--
Benchmark programs built by the project
<bench name = "benchname">Benchmark for class/function...</main>
-->
<!--
Models that we build using GSL.
This will generate a 'make code' target to build the models.
<model name = "sockopts" />
<model name = "zgossip" />
<model name = "zgossip_msg" />
If a model should be generated using a specific gsl script,
this can be set through the script attribute:
<model name = "hydra_msg" script = "zproto_codec_java.gsl" />
Additional parameters to the script can be set via nested
param elements:
<model name = "hydra_msg" script = "zproto_codec_java.gsl">
<param name = "root_path" value = "../main" />
</model>
-->
<!-- Other source files that we need to package
<extra name = "some_resource" />
-->
<!-- Specify targets to build; autotools and cmake are
built in all cases.
<target name = "cmake" />
<target name = "autotools" />
-->
<!-- Targets may be customizable with their own options -->
<target name = "cmake">
<option name = "single setting" value = "value" />
<option name = "list setting">
<item name = "item name" value = "item value" />
</option>
</target>
<target name = "obs" />
<target name = "debian" />
<target name = "redhat" />
<!-- Cucumber target
<target name = "cucumber">
For each step_defs a cucumber steps runner will be registered
in the build scripts and the project's cucumber_selftest is
generated appropriately. Points the the source file
$(step_defs.name)_step_defs.c
<step_defs name = "brilliant_ideas" />
</target>
-->
<!-- Note: zproject itself uses a customized CI-testing routine
on Travis CI, not a generated one, so DO NOT ENABLE this one:
<target name = "travis" />
-->
<!-- Jenkins target creates jenkins pipeline
Pipeline file is not overwritten if it exists.
Your projects can build under a docker container OR agents
matched by a label OR under an "any" agent by default.
If you specify a complex label expression, be sure to use
XML escaping of the ampersand character (&) if some of
your tooling expects project.xml to be valid XML (the GSL
parser accepts a verbatim ampersand character as well).
The agent_single option is a flag that enables parallel
builds of this component on several agents (specified by
label or docker) vs. a sequential build on a single agent.
Similarly, a check_sequential option can be defined so that
self-testing stages would run sequentially. This can be needed
at early stages of a project's evolution, where hard-coding is
prevalent so parallel runs in same operating environment cause
conflicts to each other. Ultimately a project should remove
this flag ;)
The build_* and test_* options influence the default setting
of corresponding build arguments for the project. You can
still run a custom Jenkins Build with Arguments with other
checkboxes clicked, e.g. while developing a missing feature.
If not explicitly set to 0, most of these options are assumed
"true", as normally a project should be capable of all these
aspects. Note however that a project with no classes marked
"stable" would by default not test non-DRAFT builds as the
configure.ac script would have no support for those anyway.
The require_gitignore option (enabled by default) also causes
the test to fail, rather than warn, if untracked or changed
files are found as a result of some build or test stage.
Also note, that after successful build and test steps, the
job generated by this Jenkinsfile can optionally trigger
some other job specific to your installation of a Jenkins
server, to handle the deployment of tested code (whichever
way you'd define that). For this optional feature, your
Jenkins master should define (and propagate to its agents)
the environment values DEFAULT_DEPLOY_BRANCH_PATTERN (regex)
and DEFAULT_DEPLOY_JOB_NAME (note to start with a slash for
absolute naming; jobs in a folder may use relative paths too).
That job should accept parameters DEPLOY_GIT_URL (URL of repo),
DEPLOY_GIT_BRANCH (name for decision-making), DEPLOY_GIT_COMMIT
(actual commit to check out and shrink-wrap into packaging.
The test_install check tries to "make DESTDIR=... install" where
the DESTDIR is test_install_DESTDIR value (must be an absolute
path), or BUILD_DIR/tmp/_inst if the option is unspecified/empty.
The test_cppcheck is different, as it calls the "cppcheck" tool
which may be not installed on a particular Jenkins deployment.
The `make cppcheck` recipe is safe to call in either case, so by
default this option is enabled if not set explicitly. Same idea
goes for build_docs as it requires asciidoc and xmlto toolkits,
except it is off by default to avoid churning CPUs with no tools.
A further dist_docs enables preparation of a "dist" tarball from
the workspace configured with docs, so you can forward it to the
publishing helper job and avoid rebuilding man pages for packaging.
Similarly, a test_check_clang_format requires an external tool,
the clang-format-5.0 (or newer) to process the codebase and decide
if it is stylish. By default the test is enabled but not required
to pass (is just informative) and will run if the tool is available
in the build system. Eventually, a project should define and uphold
its coding style -- then this test can become one of requirements
for new pull requests.
The triggers_pollSCM option sets up the pipeline-generated job
for regular polling of the original SCM repository, using the
Jenkins cron syntax. The default is approximately every 5 minutes
with a spread to minimize burst-loads vs quiet times. An explicit
empty string disables polling, so you'd only run the job manually.
Note that the most frequent working setting is "H/2", NOT a "H/1".
On the Jenkins setup used by generated projects, sometimes it was
re-scheduling the same commits over and over and even overlapping.
Usually this was linked to some lagginess of the build system or
its internet connection, but the result was a growing queue of
same (and redundant) builds. To remedy this, projects can set a
few experimental options now (and regenerate their Jenkinsfile):
* use_earlymilestone -- uses a milestone to cancel builds that
got to it later than the running one
* use_deploymilestone -- uses a milestone to cancel builds that
got to the 'deploy if appropriate' phase later than the
running one
* use_build_nonconcurrent -- sets a disableConcurrentBuilds option
* use_checkout_explicit -- sets a skipDefaultCheckout option and
defines a step to check out code explicitly; it is believed
this may better succeed in recording which commits are already
being processed by the server
The use_test_timeout option sets up the default timeout for test
steps (further configurable at run-time as a build argument).
Generally unit tests should not take pathologically long, so the
default of 30 minutes should commonly suffice even for distchecks.
If your selftests are known to take a lot of time, perhaps due to
using an occasionally overloaded Jenkins CI farm, set this option.
A use_test_retry option allows to retry each failing test step
for the specified amount of attempts; it is deemed good if the
test passes at least once. This option should not normally need
to be used -- only if selftests somehow depend on environmental
circumstances and fail occasionally but not always. Ultimately,
project developers should find and fix the issue in tests (or in
the production codebase) so it always works on the first try,
bulletproof.
As a workaround for some versions of Jenkins, if your project uses
"weird" (generally non-ASCII) filenames in the build directory,
their removal with Pipeline deleteDir() can fail even though it
should not. If this bites you, set use_deleteDir_rm_first=1 in
the project, so the OS native "rm" is tried first.
The two options do_cleanup_after_build (for parallelized tests)
and do_cleanup_after_job control whether the pipeline would by
default remove the build/test subdirectory after successful end
of stage, and/or cleans the build workspace after the whole job
succeeded, respectively. If not set, cleanup is enabled for both
and in either case the active options are among build parameters.
In opposite fashion, a do_cleanup_after_failed_build is disabled
by default to allow post-mortem inspection of errors on CI server.
You might want to keep the built sources to analyze the behavior
of your build recipes in a particular environment, thought at a
risk of using excessive disk space there. In case of failure the
workspace remains on disk to make an in-place analysis possible,
and would eat space until you clean it up manually or it would
expire according to your Jenkins old-build retention policies.
<target name = "jenkins">
<option name = "file" value = "Jenkinsfile" />
<option name = "agent_docker" value = "zeromqorg/czmq" />
<option name = "agent_label" value = "linux || macosx || bsd || solaris || posix || windows" />
<option name = "agent_single" value = "1" />
<option name = "check_sequential" value = "1" />
<option name = "triggers_pollSCM" value = "H/5 * * * *" />
<option name = "build_without_draft_api" value = "0" />
<option name = "build_with_draft_api" value = "0" />
<option name = "build_docs" value = "1" />
<option name = "dist_docs" value = "1" />
<option name = "require_gitignore" value = "0" />
<option name = "use_deleteDir_rm_first" value = "1" />
<option name = "use_test_timeout" value = "60" />
<option name = "use_test_retry" value = "3" />
<option name = "test_check" value = "0" />
<option name = "test_memcheck" value = "0" />
<option name = "test_distcheck" value = "0" />
<option name = "test_install" value = "0" />
<option name = "test_install_DESTDIR" value = "/tmp/proto-area" />
<option name = "test_cppcheck" value = "1" />
<option name = "test_check_clang_format" value = "1" />
<option name = "use_clang_format_prog" value = "clang-format-5.0" />
<option name = "require_good_clang_format" value = "0" />
</target>
-->
<target name = "jenkins" >
<option name = "agent_label" value = "linux || macosx || bsd || solaris || posix || windows" />
<option name = "agent_single" value = "1" />
<!-- Note: for zproject itself, all the *check jobs are
essentially a loopback to distcheck itself -->
<option name = "test_check" value = "1" />
<option name = "test_memcheck" value = "0" />
<option name = "test_distcheck" value = "0" />
<option name = "test_cppcheck" value = "0" />
</target>
<!-- In order loaded by zproject.gsl -->
<bin name = "zproject.gsl" />
<bin name = "zproject_projects.gsl" />
<bin name = "zproject_class_api.gsl" />
<!-- Mainline generation code -->
<bin name = "zproject_skeletons.gsl" />
<bin name = "zproject_bench.gsl" />
<bin name = "zproject_class.gsl" />
<bin name = "zproject_git.gsl" />
<bin name = "zproject_valgrind.gsl" />
<!-- Targets -->
<bin name = "zproject_android.gsl" />
<bin name = "zproject_autotools.gsl" />
<bin name = "zproject_cmake.gsl" />
<bin name = "zproject_cucumber.gsl" />
<bin name = "zproject_cygwin.gsl" />
<bin name = "zproject_debian.gsl" />
<bin name = "zproject_delphi.gsl" />
<bin name = "zproject_docker.gsl" />
<bin name = "zproject_gh_actions.gsl" />
<bin name = "zproject_gyp.gsl" />
<bin name = "zproject_ios.gsl" />
<bin name = "zproject_java.gsl" />
<bin name = "zproject_java_lib.gsl" />
<bin name = "zproject_java_msvc.gsl" />
<bin name = "zproject_jenkins.gsl" />
<bin name = "zproject_lua_ffi.gsl" />
<bin name = "zproject_mingw32.gsl" />
<bin name = "zproject_nodejs.gsl" />
<bin name = "zproject_nuget.gsl" />
<bin name = "zproject_obs.gsl" />
<bin name = "zproject_python.gsl" />
<bin name = "zproject_python_cffi.gsl" />
<bin name = "zproject_qml.gsl" />
<bin name = "zproject_qt.gsl" />
<bin name = "zproject_redhat.gsl" />
<bin name = "zproject_rpi.gsl" />
<bin name = "zproject_ruby.gsl" />
<bin name = "zproject_systemd.gsl" />
<bin name = "zproject_travis.gsl" />
<bin name = "zproject_vagrant.gsl" />
<bin name = "zproject_vs2008.gsl" />
<bin name = "zproject_vs20xx.gsl" />
<bin name = "zproject_vs20xx_props.gsl" />
<bin name = "zproject_known_projects.xml" />
</project>