-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlvhex-master-master.cfg
767 lines (694 loc) · 26.7 KB
/
dlvhex-master-master.cfg
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# -*- python -*-
# ex: set syntax=python:
from twisted.spread import pb
pb.MAX_BROKER_REFS = 3000
make_timeout = 1200
make_check_timeout = 1200
# locks
from buildbot import locks
# we globally lock racer, because racer is restarted by the dlplugin's tests
racer_lock = locks.MasterLock("racer")
# we lock "make install" exclusively against "make check" and "make distcheck" shared
# (if during a make install a check detects a partially installed plugin, the check will spuriously fail)
install_check_lock = locks.SlaveLock("installcheck")
# configuration
base_giturl = '[email protected]:hexhex/'
base_instdir = '/var/lib/buildbot/instdirs/'
boosts = ['1_42', '1_43', '1_44', '1_45', '1_46', '1_47', '1_48', '1_49', '1_50', '1_51', '1_52', '1_53', '1_54', '1_55', 'release', 'trunk']
clang_incompatible_boosts = set(['1_42', '1_43', '1_44', '1_45'])
compilers = \
{ # keys are used for creating directory names!
'g++-4.5':
{
'CC':'gcc-4.5',
'CXX':'g++-4.5',
'PATHPREFIX':'',
},
'g++-4.6':
{
'CC':'gcc-4.6',
'CXX':'g++-4.6',
'PATHPREFIX':'',
},
'g++-snapshot':
{
'CC':'/usr/lib/gcc-snapshot/bin/gcc',
'CXX':'/usr/lib/gcc-snapshot/bin/g++',
'PATHPREFIX':'',
},
'clang-3.0':
{
'CC': base_instdir+'/clang-3.0/bin/clang',
'CXX': base_instdir+'/clang-3.0/bin/clang++',
'PATHPREFIX': base_instdir+'/clang-3.0/bin/:',
},
'clang-3.1':
{
'CC': base_instdir+'/clang-3.1/bin/clang',
'CXX': base_instdir+'/clang-3.1/bin/clang++',
'PATHPREFIX': base_instdir+'/clang-3.1/bin/:',
},
'clang-trunk':
{
'CC': base_instdir+'/clang-trunk/bin/clang',
'CXX': base_instdir+'/clang-trunk/bin/clang++',
'PATHPREFIX': base_instdir+'/clang-trunk/bin/:',
},
#'clang-trunk-manualtest1':
#{
# 'CC': base_instdir+'/clang-trunk-manualtest1/bin/clang',
# 'CXX': base_instdir+'/clang-trunk-manualtest1/bin/clang++',
# 'PATHPREFIX': base_instdir+'/clang-trunk-manualtest1/bin/:',
#},
#'clang-trunk-manualtest2':
#{
# 'CC': base_instdir+'/clang-trunk-manualtest2/bin/clang',
# 'CXX': base_instdir+'/clang-trunk-manualtest2/bin/clang++',
# 'PATHPREFIX': base_instdir+'/clang-trunk-manualtest2/bin/:',
#},
}
# the following describes all softwares we can test (independen from environments)
# first level is the dlvhex, second level are the plugins
dlvhexes = \
{ # keys are used for creating directory names!
# trunk with plugins (debug version)
'master':
{
'repo':'core',
'branch':'master',
'release_version':False, # this means that failure of make distcheck produces only a warning
'configure_options': ['--enable-debug'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'branch':'master' },
'script': { 'repo':'scriptplugin', 'branch':'master' },
'aggregate': { 'repo': 'aggregateplugin', 'branch':'master' },
'wordnet': { 'repo': 'wordnetplugin', 'branch':'master' },
'mcsie': { 'repo': 'mcsieplugin', 'branch':'master' },
}
},
# branch 2.x with plugins (debug version)
'2x':
{
'repo':'core',
'branch':'release2x',
'release_version':True,
'configure_options': ['--enable-debug'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'branch':'release2x' },
'script': { 'repo':'scriptplugin', 'branch':'release2x' },
'aggregate': { 'repo':'aggregateplugin', 'branch':'release2x' },
'wordnet': { 'repo':'wordnetplugin', 'branch':'release2x' },
'mcsie': { 'repo': 'mcsieplugin', 'branch':'release2x' },
}
},
# branch 2.x versions just for dlvhex build type testing (no plugins)
'2x_release': {
'repo':'core',
'branch':'release2x',
'release_version':True,
'configure_options': ['--enable-release'],
'plugins': {}
},
'2x_debug': {
'repo':'core',
'branch':'release2x',
'release_version':True,
'configure_options': ['--enable-debug'],
'plugins': {}
},
'2x_benchmark': {
'repo':'core',
'branch':'release2x',
'release_version':True,
'configure_options': ['--enable-benchmark'],
'plugins': {}
},
'2x_clingo': {
'repo':'core',
'branch':'release2x',
'release_version':True,
'use_clingo':'3.0.3',
'plugins':
{ # keys are used for creating directory names!
'mcsie': { 'repo':'mcsieplugin', 'branch':'release2x' },
}
},
# branch 1.x with plugins (default configuration)
'1x':
{
'repo':'core',
'branch':'release1x',
'release_version':True,
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'branch':'release1x' },
'script': { 'repo':'scriptplugin', 'branch':'release1x' },
'aggregate': { 'repo':'aggregateplugin', 'branch':'release1x' },
'wordnet': { 'repo':'wordnetplugin', 'branch':'release1x' },
'dl': { 'repo': 'dlplugin', 'branch':'release1x',
'locks': [ racer_lock.access('exclusive') ], },
'mcsie': { 'repo':'mcsieplugin', 'branch':'release1x' },
'xpath': { 'repo':'xpathplugin', 'branch':'release1x' },
'merging': { 'repo':'mergingplugin', 'branch':'release1x' },
}
},
# release 2.3.0
'2.3.0':
{
'repo':'core',
'tag':'Release_2_3_0',
'release_version':True,
'configure_options': ['--enable-release'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_2_0_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_2_0_0' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_2_0_0' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_2_0_0' },
'mcsie': { 'repo':'mcsieplugin', 'tag':'Release_2_0_0' },
}
},
# release 2.2.0
'2.2.0':
{
'repo':'core',
'tag':'Release_2_2_0',
'release_version':True,
'configure_options': ['--enable-release'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_2_0_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_2_0_0' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_2_0_0' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_2_0_0' },
'mcsie': { 'repo':'mcsieplugin', 'tag':'Release_2_0_0' },
}
},
# release 2.1.0
'2.1.0':
{
'repo':'core',
'tag':'Release_2_1_0',
'release_version':True,
'configure_options': ['--enable-release'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_2_0_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_2_0_0' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_2_0_0' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_2_0_0' },
}
},
# release 2.0.0
'2.0.0':
{
'repo':'core',
'tag':'Release_2_0_0',
'release_version':True,
'configure_options': ['--enable-release'],
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_2_0_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_2_0_0' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_2_0_0' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_2_0_0' },
}
},
# release 1.7.4
'1.7.4':
{
'repo':'core',
'tag':'Release_1_7_4',
'incompatible_compilers': ['clang-trunk','clang-2.9'],
'release_version':True,
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_1_7_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_1_7_2' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_1_7_1' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_1_7_0' },
'dl': { 'repo': 'dlplugin', 'tag':'Release_1_7_1',
'locks': [ racer_lock.access('exclusive') ], },
'mcsie': { 'repo':'mcsieplugin', 'tag':'Release_1_7_1' },
}
},
# release 1.7.3
'1.7.3':
{
'repo':'core',
'tag':'Release_1_7_3',
'incompatible_compilers': ['clang-trunk','clang-2.9'],
'release_version':True,
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_1_7_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_1_7_2' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_1_7_1' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_1_7_0' },
'dl': { 'repo': 'dlplugin', 'tag':'Release_1_7_1',
'locks': [ racer_lock.access('exclusive') ], },
'mcsie': { 'repo':'mcsieplugin', 'tag':'Release_1_7_1' },
}
},
# release 1.7.2
'1.7.2':
{
'repo':'core',
'tag':'Release_1_7_2',
'incompatible_compilers': ['clang-trunk','clang-2.9'],
'release_version':True,
'plugins':
{ # keys are used for creating directory names!
'string': { 'repo':'stringplugin', 'tag':'Release_1_7_0' },
'script': { 'repo':'scriptplugin', 'tag':'Release_1_7_1' },
'aggregate': { 'repo':'aggregateplugin', 'tag':'Release_1_7_0' },
'wordnet': { 'repo':'wordnetplugin', 'tag':'Release_1_7_0' },
'dl': { 'repo': 'dlplugin', 'tag':'Release_1_7_1',
'locks': [ racer_lock.access('exclusive') ], },
'mcsie': { 'repo':'mcsieplugin', 'tag':'Release_1_7_1' },
}
},
}
# TODO semweb dlvhex-rdfplugin tests: they use other repo, can we integrate it here nevertheless?
# environments:
#
# first we create environments for building dlvhex:
# each dlvhex environment uses a certain compiler and a certain boost version.
# for each dlvhex environment and each dlvhex branch, a corresponding builder is created,
# this builder triggers schedulers for all plugins using that dlvhex
environments = {}
for b in boosts:
currentbenv = {
'PATH' : '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'BOOST_ROOT' : base_instdir+'boost-'+b,
#'LDFLAGS' : '-L'+base_instdir+'boost-'+b+'/lib/',
#'CPPFLAGS' : '-I'+base_instdir+'boost-'+b+'/include/',
}
for toolid in compilers:
if (toolid[:5] == 'clang') and (b in clang_incompatible_boosts):
continue
compiler = compilers[toolid]
currentenv = currentbenv.copy()
currentenv['PATH'] = compiler['PATHPREFIX']+currentenv['PATH']
currentenv['CC'] = compiler['CC']
#currentenv['LD'] = compiler['CC']
currentenv['CXX'] = compiler['CXX']
#currentenv['LDXX'] = compiler['CXX']
envname = 'boost-%s-%s' % (b,toolid)
print "creating environment %s" % (envname,)
currentenv['buildbot_boost_id'] = b
currentenv['buildbot_compiler_id'] = toolid
environments[envname] = currentenv
c = BuildmasterConfig = {}
####### BUILDSLAVES
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("dlvhex-slave", "dlvhex-pwd", max_builds=3)]
c['slavePortnum'] = 10013
####### CHANGESOURCES
# TODO
####### BUILDERS
from buildbot.steps import source, shell, trigger
from buildbot.process import factory
from buildbot.scheduler import Triggerable
# now create builders for dlvhexes
# we store builders/schedulers into a dictionary { <buildername> : <builder> }
# and then convert this dictionary into [ <builder> ] as required by buildbot
dlvhex_builders = {}
plugin_builders = {}
plugin_schedulers = {}
# which builders do we want to have?
# (generate only these)
nightly_builders = [
# release versions
"dlvhex-1.7.4-boost-1_42-g++-4.5-builder",
"dlvhex-2.3.0-boost-1_48-g++-4.5-builder",
"dlvhex-2.3.0-boost-1_52-clang-3.0-builder",
"dlvhex-2.3.0-boost-1_55-clang-3.1-builder",
# 1x branch
"dlvhex-1x-boost-1_42-g++-4.5-builder",
"dlvhex-1x-boost-1_48-g++-4.6-builder",
"dlvhex-1x-boost-1_48-g++-snapshot-builder",
"dlvhex-1x-boost-1_48-clang-3.0-builder",
"dlvhex-1x-boost-1_48-clang-3.1-builder",
# 2x branch
"dlvhex-2x-boost-1_43-g++-4.5-builder",
"dlvhex-2x-boost-1_50-g++-4.5-builder",
"dlvhex-2x-boost-1_55-clang-3.0-builder",
# special settings
"dlvhex-2x_release-boost-1_48-clang-3.0-builder",
"dlvhex-2x_debug-boost-1_48-clang-3.0-builder",
"dlvhex-2x_benchmark-boost-1_48-clang-3.0-builder",
]
additional_builders = [
"dlvhex-2x-boost-release-clang-3.0-builder",
"dlvhex-2x-boost-release-clang-3.1-builder",
"dlvhex-2x-boost-trunk-clang-trunk-builder",
"dlvhex-2x-boost-release-clang-trunk-builder",
"dlvhex-2x-boost-1_53-clang-3.1-builder",
"dlvhex-2x-boost-1_54-clang-3.1-builder",
"dlvhex-2x-boost-1_53-g++-4.5-builder",
"dlvhex-2x-boost-1_54-g++-4.5-builder",
"dlvhex-2x-boost-1_55-g++-4.5-builder",
]
create_these_builders = set(nightly_builders + additional_builders)
for branchid in dlvhexes:
for envid in environments:
builddir = 'dlvhex-%s-%s' % (branchid,envid)
instdir = builddir
buildername = builddir+'-builder'
if buildername in create_these_builders:
print 'creating builder "%s" for envid "%s" branchid "%s"' % (buildername,envid,branchid)
else:
print 'skipping builder "%s" for envid "%s" branchid "%s"' % (buildername,envid,branchid)
continue
env = environments[envid]
plugin_env = env.copy()
print "environment = ", plugin_env
plugin_env['PKG_CONFIG_PATH'] = base_instdir + instdir + '/lib/pkgconfig/'+':/usr/lib/pkgconfig/'
plugin_env['PATH'] = base_instdir + instdir + '/bin/:'+plugin_env['PATH']
release_version = dlvhexes[branchid]['release_version']
repo = dlvhexes[branchid]['repo']
what = None
if 'branch' in dlvhexes[branchid]:
what = dlvhexes[branchid]['branch']
else:
what = dlvhexes[branchid]['tag']
if ('incompatible_compilers' in dlvhexes[branchid]) and \
(env['buildbot_compiler_id'] in dlvhexes[branchid]['incompatible_compilers']):
print 'skipping builder "%s" due to incompatible compiler' % (buildername,)
continue
configure_options = []
if 'configure_options' in dlvhexes[branchid]:
configure_options = dlvhexes[branchid]['configure_options']
if 'use_clingo' in dlvhexes[branchid]:
if env['buildbot_compiler_id'] != 'g++-4.5':
continue
if env['buildbot_boost_id'] not in set(['1_44', '1_45', '1_46']):
continue
clingo_ver = dlvhexes[branchid]['use_clingo']
configure_options.append(
'--with-libclingo='+base_instdir+
('clingo-%s-%s-boost-%s' % (clingo_ver, env['buildbot_compiler_id'], env['buildbot_boost_id'])))
# create plugin builders triggerable by this dlvhex builder
plugin_schedulers_to_trigger = []
for pluginid in dlvhexes[branchid]['plugins']:
plugin = dlvhexes[branchid]['plugins'][pluginid]
plugin_repo = plugin['repo']
plugin_what = None
if 'branch' in plugin:
plugin_what = plugin['branch']
else:
plugin_what = plugin['tag']
plugin_locks = []
if 'locks' in plugin:
plugin_locks = plugin['locks']
plugin_builddir = 'plugin-%s-dlvhex-%s-%s' % (pluginid,branchid,envid)
plugin_instdir = instdir
plugin_buildername = plugin_builddir+'-builder'
print 'creating builder "%s"' % (plugin_buildername,)
pf = factory.BuildFactory()
# remove everything (currently no better way known to PS)
# using "workdir='../'" seems buggy
pf.addStep(shell.ShellCommand(
name='cleanup chmod',
command=['bash', '-c', 'find . -mindepth 1 -not -type l -print0|xargs --null --no-run-if-empty chmod 777'],
haltOnFailure=True))
pf.addStep(shell.ShellCommand(
name='cleanup rm',
command=['bash', '-c', 'find . -mindepth 1 -print0|xargs --null --no-run-if-empty rm -rf'],
haltOnFailure=True))
# get status of removal (for debugging)
pf.addStep(shell.ShellCommand(
name='list',
command=['ls', '-al'],
haltOnFailure=True))
# clone
pf.addStep(shell.ShellCommand(
name='clone',
command=['git', 'clone', base_giturl + plugin_repo, '-n', './'],
haltOnFailure=True,
flunkOnFailure=(not release_version)))
# update to branch/tag
pf.addStep(shell.ShellCommand(
name='checkout',
command=['git', 'checkout', plugin_what],
haltOnFailure=True))
# init submodules
pf.addStep(shell.ShellCommand(
name='init submodules',
command=['git', 'submodule', 'init'],
haltOnFailure=True))
# update submodules
pf.addStep(shell.ShellCommand(
name='update submodules',
command=['git', 'submodule', 'update', '--recursive'],
haltOnFailure=True))
pf.addStep(shell.ShellCommand(
name='bootstrap',
command=['./bootstrap.sh'],
haltOnFailure=True))
# attempt make clean (never fail) to allow for clean reconfigure
pf.addStep(shell.ShellCommand(
name='make distclean',
command=['make','distclean'],
haltOnFailure=False,
flunkOnFailure=False))
pf.addStep(shell.ShellCommand(
name='configure',
command=['./configure', '--prefix='+base_instdir+plugin_instdir],
haltOnFailure=True))
# first uninstall to make sure nothing interferes!
pf.addStep(shell.ShellCommand(
name='make uninstall',
command=['make','uninstall'],
haltOnFailure=False,
flunkOnFailure=False,
locks=[install_check_lock.access('exclusive')]))
pf.addStep(shell.ShellCommand(
name='make',
command=['make'],
haltOnFailure=True,
timeout=make_timeout))
pf.addStep(shell.ShellCommand(
name='make check',
command=['make', 'check'],
haltOnFailure=False,
locks=plugin_locks + [install_check_lock.access('counting')],
timeout=make_check_timeout))
pf.addStep(shell.ShellCommand(
name='make distcheck',
command=['make', 'distcheck'],
haltOnFailure=False,
flunkOnFailure=False,
warnOnFailure=True,
locks=plugin_locks + [install_check_lock.access('counting')],
timeout=make_timeout+make_check_timeout))
pf.addStep(shell.ShellCommand(
name='make install',
command=['make', 'install'],
locks=[install_check_lock.access('exclusive')]))
pbuilder = {
'name': plugin_buildername,
'slavename': 'dlvhex-slave',
'builddir': plugin_builddir,
'factory': pf,
'env': plugin_env,
}
plugin_builders[plugin_buildername] = pbuilder
plugin_schedulers[plugin_buildername] = Triggerable(
name=plugin_buildername,builderNames=[plugin_buildername])
plugin_schedulers_to_trigger.append(plugin_buildername)
# create dlvhex builder, triggering plugin builder schedulers
f = factory.BuildFactory()
# remove everything (currently no better way known to PS)
# using "workdir='../'" seems buggy
f.addStep(shell.ShellCommand(
name='cleanup chmod',
command=['bash', '-c', 'find . -mindepth 1 -not -type l -print0|xargs --null --no-run-if-empty chmod 777'],
haltOnFailure=True))
f.addStep(shell.ShellCommand(
name='cleanup rm',
command=['bash', '-c', 'find . -mindepth 1 -print0|xargs --null --no-run-if-empty rm -rf'],
haltOnFailure=True))
# get status of removal (for debugging)
f.addStep(shell.ShellCommand(
name='list',
command=['ls', '-al'],
haltOnFailure=True))
# clone
f.addStep(shell.ShellCommand(
name='clone',
command=['git', 'clone', base_giturl + repo, '-n', './'],
haltOnFailure=True,
flunkOnFailure=(not release_version)))
# update to branch/tag
f.addStep(shell.ShellCommand(
name='checkout',
command=['git', 'checkout', what],
haltOnFailure=True))
# init submodules
f.addStep(shell.ShellCommand(
name='init submodules',
command=['git', 'submodule', 'init'],
haltOnFailure=True))
# update submodules
f.addStep(shell.ShellCommand(
name='update submodules',
command=['git', 'submodule', 'update', '--recursive'],
haltOnFailure=True))
f.addStep(shell.ShellCommand(
name='bootstrap',
command=['./bootstrap.sh'],
haltOnFailure=True))
# attempt make distclean (never fail) to allow for clean reconfigure
f.addStep(shell.ShellCommand(
name='make distclean',
command=['make','distclean'],
haltOnFailure=False,
flunkOnFailure=False))
f.addStep(shell.ShellCommand(
name='configure',
command=['./configure', '--prefix='+base_instdir+instdir] +
configure_options,
haltOnFailure=True))
# first uninstall to make sure nothing interferes!
f.addStep(shell.ShellCommand(
name='make uninstall',
command=['make','uninstall'],
haltOnFailure=False,
flunkOnFailure=False,
locks=[install_check_lock.access('exclusive')]))
f.addStep(shell.ShellCommand(
name='make',
command=['make'],
haltOnFailure=True,
timeout=make_timeout))
f.addStep(shell.ShellCommand(
name='make check',
command=['make', 'check'],
haltOnFailure=False,
locks=[install_check_lock.access('counting')],
timeout=make_check_timeout))
f.addStep(shell.ShellCommand(
name='make distcheck',
command=['make', 'distcheck'],
haltOnFailure=False,
warnOnFailure=True,
locks=[install_check_lock.access('counting')],
timeout=make_timeout+make_check_timeout))
f.addStep(shell.ShellCommand(
name='make doxygen-doc',
command=['make', 'doxygen-doc']))
f.addStep(shell.ShellCommand(
name='make install',
command=['make', 'install'],
locks=[install_check_lock.access('exclusive')]))
if len(plugin_schedulers_to_trigger) > 0:
f.addStep(trigger.Trigger(
schedulerNames=plugin_schedulers_to_trigger,
waitForFinish=False,
updateSourceStamp=True)) # updateSourceStamp = ensure that plugins use same revision as dlvhex
builder = {
'name': buildername,
'slavename': 'dlvhex-slave',
'builddir': builddir,
'factory': f,
'env': env.copy(),
}
dlvhex_builders[buildername] = builder
c['builders'] = list(dlvhex_builders.itervalues()) + list(plugin_builders.itervalues())
c['schedulers'] = []
c['schedulers'] += list(plugin_schedulers.itervalues())
####### SCHEDULERS
from buildbot.scheduler import Nightly
c['schedulers'].append(Nightly(name="dlvhex-nightly",
branch=None,
builderNames=nightly_builders,
hour=3,
minute=30))
####### STATUS TARGETS
c['status'] = []
from buildbot.status import html
c['status'].append(html.WebStatus(http_port=8013,allowForce=True))
from buildbot.status import mail
c['status'].append(mail.MailNotifier(
fromaddr="[email protected]",
extraRecipients=["[email protected]"],
sendToInterestedUsers=False,
relayhost="wagner.kr.tuwien.ac.at",
))
####### DEBUGGING OPTIONS
# if you set 'debugPassword', then you can connect to the buildmaster with
# the diagnostic tool in contrib/debugclient.py . From this tool, you can
# manually force builds and inject changes, which may be useful for testing
# your buildmaster without actually committing changes to your repository (or
# before you have a functioning 'sources' set up). The debug tool uses the
# same port number as the slaves do: 'slavePortnum'.
#c['debugPassword'] = "debugpassword"
# if you set 'manhole', you can ssh into the buildmaster and get an
# interactive python shell, which may be useful for debugging buildbot
# internals. It is probably only useful for buildbot developers. You can also
# use an authorized_keys file, or plain telnet.
#from buildbot import manhole
#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
# "admin", "password")
####### PROJECT IDENTITY
c['projectName'] = "dlvhex"
c['projectURL'] = "http://www.kr.tuwien.ac.at/research/systems/dlvhex/"
c['buildbotURL'] = "http://gluck.kr.tuwien.ac.at:8013/"
# Horizons
#
# Buildbot stores historical information on disk in the form of "Pickle" files
# and compressed logfiles. In a large installation, these can quickly consume
# disk space, yet in many cases developers never consult this historical
# information.
#
# The changeHorizon key determines how many changes the master will keep a
# record of. One place these changes are displayed is on the waterfall page. This
# parameter defaults to 0, which means keep all changes indefinitely.
#
# The buildHorizon specifies the minimum number of builds for each builder which
# should be kept on disk. The eventHorizon specifies the minimum number of events
# to keep--events mostly describe connections and disconnections of slaves, and
# are seldom helpful to developers. The logHorizon gives the minimum number of
# builds for which logs should be maintained; this parameter must be less than or
# equal to buildHorizon. Builds older than logHorizon but not older than
# buildHorizon will maintain their overall status and the status of each step,
# but the logfiles will be deleted.
c['changeHorizon'] = 200
c['buildHorizon'] = 100
c['eventHorizon'] = 50
c['logHorizon'] = 40
c['buildCacheSize'] = 15
# Log Handling
#
# The logCompressionLimit enables compression of build logs on disk
# for logs that are bigger than the given size, or disables that
# completely if set to False. The default value is 4096, which should
# be a reasonable default on most file systems. This setting has no
# impact on status plugins, and merely affects the required disk space
# on the master for build logs.
#
# The logCompressionMethod controls what type of compression is used
# for build logs. The default is 'bz2', and the other valid option is
# 'gz'. 'bz2' offers better compression at the expense of more CPU
# time.
#
# The logMaxSize parameter sets an upper limit (in bytes) to how large
# logs from an individual build step can be. The default value is
# None, meaning no upper limit to the log size. Any output exceeding
# logMaxSize will be truncated, and a message to this effect will be
# added to the log's HEADER channel.
#
# If logMaxSize is set, and the output from a step exceeds the
# maximum, the logMaxTailSize parameter controls how much of the end
# of the build log will be kept. The effect of setting this parameter
# is that the log will contain the first logMaxSize bytes and the last
# logMaxTailSize bytes of output. Don't set this value too high, as
# the the tail of the log is kept in memory.
c['logCompressionLimit'] = 16384
c['logCompressionMethod'] = 'gz'
c['logMaxSize'] = 3*1024*1024 # 3MiB
c['logMaxTailSize'] = 32768