forked from wxWidgets/Phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaster.cfg
530 lines (408 loc) · 20.5 KB
/
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
# -*- python -*-
# ex: set syntax=python:
#-------------------------------------------------------------------------------
# This is the buildmaster config file for the wxPython Phoenix Buildbot,
# located at http://buildbot.wxpython.org:8010/. This file is located here in
# order to allow it to be versioned and backed up. However it is NOT
# automatically copied into the buildmaster's working folder, that must be
# done by hand after reviewing changes made here. It must be installed as
# 'master.cfg' in the buildmaster's base directory.
#-------------------------------------------------------------------------------
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
####### BUILDSLAVES
# The 'slaves' list defines the set of recognized buildslaves. Each element
# is a BuildSlave object, specifying a unique slave name and password. The
# same slave name and password must be configured on the slave.
# Passwords are stored separately and not maintained in the source repository
# for security's sake
import bbpasswd
reload(bbpasswd)
from buildbot.buildslave import BuildSlave
c['slaves'] = [#BuildSlave("osx-10.7-vm-py2.7", bbpasswd.PASSWD1,
# notify_on_missing='[email protected]',
# max_builds=1),
#BuildSlave("macosx-vm4", bbpasswd.PASSWD1,
# notify_on_missing='[email protected]',
# max_builds=1),
BuildSlave("macosx-vm6", bbpasswd.PASSWD1,
notify_on_missing='[email protected]',
max_builds=1),
BuildSlave("win7-py27", bbpasswd.PASSWD1,
notify_on_missing='[email protected]',
max_builds=1),
BuildSlave("ubuntu-x64_86-py27", bbpasswd.PASSWD1,
notify_on_missing='[email protected]',
max_builds=1),
#BuildSlave("osx_10.6-py27", bbpasswd.PASSWD1,
# notify_on_missing='[email protected]',
# max_builds=1),
#BuildSlave('vagrant-bldr', bbpasswd.PASSWD1,
# notify_on_missing='[email protected]',
# max_builds=1),
]
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
# This must match the value configured into the buildslaves (with their
# --master option)
c['slavePortnum'] = 9989
####### CHANGESOURCES
# The 'change_source' setting tells the buildmaster how it should find out
# about source code changes.
## c['change_source'] =
# See WebStatus setup below for alternate approach using GitHub's webhooks,
# where github will send us info about changes as they are pushed or merged,
# instead of having buildbot poll the repos itself.
# TODO: Switch to the wxWidgets/Phoenix repo
phoenixGitUrl = 'https://github.com/RobinD42/Phoenix.git'
phoenixGitBranch = 'wxPy-4.0.x'
####### SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes.
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.timed import Nightly
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes.filter import ChangeFilter
c['schedulers'] = []
c['schedulers'].append( SingleBranchScheduler(
name="sched-build",
change_filter=ChangeFilter(branch=phoenixGitBranch),
treeStableTimer=30,
builderNames=["build-win32-py27",
"build-win32-py35",
"build-win32-py36",
"build-win32-py37",
"build-win64-py27",
"build-win64-py35",
"build-win64-py36",
"build-win64-py37",
"build-osx-py27",
"build-osx-py35",
"build-osx-py36",
"build-osx-py37",
"build-gtk-py27",
"build-gtk-py35",
"build-gtk3-py27",
"build-gtk3-py35",
]))
c['schedulers'].append( Nightly(
name="sched-dist",
branch=phoenixGitBranch,
hour=1, minute=15,
onlyIfChanged=True,
builderNames=["dist-osx-py27",
"dist-osx-py34",
"dist-osx-py35",
"dist-osx-py36",
"dist-osx-py37",
"dist-win32-py27",
"dist-win32-py34",
"dist-win32-py35",
"dist-win32-py36",
"dist-win32-py37",
"dist-win64-py27",
"dist-win64-py34",
"dist-win64-py35",
"dist-win64-py36",
"dist-win64-py37",
]))
c['schedulers'].append( Nightly(
name="sched-docs",
branch=phoenixGitBranch,
hour=1, minute=10,
onlyIfChanged=True,
builderNames=["dist-docs"]))
c['schedulers'].append( Nightly(
name="sched-src",
branch=phoenixGitBranch,
hour=1, minute=10,
onlyIfChanged=True,
builderNames=["dist-src"]))
# c['schedulers'].append( Nightly(
# name="sched-vagrant",
# branch=phoenixGitBranch,
# hour=1, minute=10,
# onlyIfChanged=True,
# builderNames=["vagrant-bldr"]))
c['schedulers'].append( ForceScheduler(
name='sched-force',
builderNames=["build-win32-py27",
"build-win32-py35",
"build-win32-py36",
"build-win32-py37",
"build-win64-py27",
"build-win64-py35",
"build-win64-py36",
"build-win64-py37",
"build-osx-py27",
"build-osx-py35",
"build-osx-py36",
"build-osx-py37",
"build-gtk-py27",
"build-gtk-py35",
"build-gtk3-py27",
"build-gtk3-py35",
"dist-osx-py27",
"dist-osx-py34",
"dist-osx-py35",
"dist-osx-py36",
"dist-osx-py37",
"dist-win32-py27",
"dist-win32-py34",
"dist-win32-py35",
"dist-win32-py36",
"dist-win32-py37",
"dist-win64-py27",
"dist-win64-py34",
"dist-win64-py35",
"dist-win64-py36",
"dist-win64-py37",
"dist-docs",
"dist-src",
#"vagrant-bldr",
]))
####### BUILDERS
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them. Note that any particular build will
# only take place on one slave.
# NOTE on build properties. The following properties are defined in the
# factories generated in this function that can be used to customize the
# builds:
#
# fullclean: Set to 'yes' to fully clean the "build-*" builders before
# checking out the code. Normally they will try to do an incremental
# build to save time, but sometimes things change enough that
# incrementals won't work.
#
# buildargs: Adds additional flags or commands to the build.py command
# line. For example, adding '--releases' will (in theory) switch
# the "dist-*" builders from making snapshot builds to making release
# builds.
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Property, WithProperties
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
from buildbot.config import BuilderConfig
def makeFactory(port, buildType='buildOnly', pyVer='2.7'):
factory = BuildFactory()
# Was the build started from the force build form with a "fullclean"
# property set? If so, fully clobber the git workspace and start fresh.
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then rm -rf ../Phoenix; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir=""))
# By default do an incremental update, keeping prior build tree
mode = 'incremental'
method = None
clean = ''
# Start from a clean build tree for the daily "dist" builds
if buildType in ['dist', 'sdist', 'docs', 'vagrant']:
mode = 'full'
method = 'clobber'
# extra config options for git commands
gitConfig = {'core.autocrlf' : 'input'}
# all of them need to fetch the source
factory.addStep(Git(name='phoenix-git', repourl=phoenixGitUrl, branch=phoenixGitBranch,
workdir="Phoenix",
config=gitConfig,
progress=True,
clobberOnFailure=True,
submodules=True,
logEnviron=False,
timeout=2400,
mode=mode, method=method))
if buildType == 'sdist':
cmd = 'python -u build.py %s setrev dox touch etg sip build '\
'wxlib sdist sdist_demo --upload' % pyVer
elif buildType == 'docs':
cmd = 'python -u build.py %s setrev dox touch etg sip build wxlib ' \
'sphinx bdist_docs --upload' % pyVer
elif buildType == 'vagrant':
# TODO: This will also upload the source tarfile, which is redundant
# since there is another job for that. Is there an easy way around
# that?
cmd = 'python -u build.py setrev dox etg --nodoc sip sdist ' \
'build_vagrant --upload'
else:
cmd = 'python -u build.py %s %s setrev dox touch etg --nodoc sip build' % (pyVer, clean)
if port == 'osx':
if buildType == 'buildOnly':
# Only build one arch for the normal builds, so dependency
# tracking will be turned on so we can have faster turn-around
# times for those builds.
cmd += ' --mac_arch=i386'
else:
# Build both architectures for the distribution builders
cmd += ' --mac_arch=i386,x86_64'
if port == 'gtk2':
cmd += ' --gtk2'
if port == 'gtk3':
cmd += ' --gtk3'
if port in ['win32', 'win64']:
cmd += ' --cairo'
if port == 'win64':
cmd += ' --x64'
if buildType == 'dist':
cmd += ' bdist_wheel --upload --relwithdebug'
cmd = cmd.split() + [Property('buildargs', default='')]
factory.addStep(ShellCommand(command=cmd, workdir="Phoenix",
description="building", descriptionDone="build"))
return factory
c['builders'] = [
BuilderConfig(name="build-osx-py27",
slavenames=["macosx-vm6"],
factory=makeFactory('osx')),
BuilderConfig(name="build-osx-py35",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.5')),
BuilderConfig(name="build-osx-py36",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.6')),
BuilderConfig(name="build-osx-py37",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', pyVer='3.7')),
BuilderConfig(name="build-win32-py27",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='2.7')),
BuilderConfig(name="build-win32-py35",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.5')),
BuilderConfig(name="build-win32-py36",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.6')),
BuilderConfig(name="build-win32-py37",
slavenames=["win7-py27"],
factory=makeFactory('win32', pyVer='3.7')),
BuilderConfig(name="build-win64-py27",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='2.7')),
BuilderConfig(name="build-win64-py35",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.5')),
BuilderConfig(name="build-win64-py36",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.6')),
BuilderConfig(name="build-win64-py37",
slavenames=["win7-py27"],
factory=makeFactory('win64', pyVer='3.7')),
BuilderConfig(name="build-gtk-py27",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk2')),
BuilderConfig(name="build-gtk-py35",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk2', pyVer='3.5')),
BuilderConfig(name="build-gtk3-py27",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk3')),
BuilderConfig(name="build-gtk3-py35",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('gtk3', pyVer='3.5')),
BuilderConfig(name="dist-docs",
slavenames=["win7-py27"],
factory=makeFactory('', 'docs')),
BuilderConfig(name="dist-src",
slavenames=["ubuntu-x64_86-py27"],
factory=makeFactory('', 'sdist')),
BuilderConfig(name="dist-osx-py27",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist')),
BuilderConfig(name="dist-osx-py34",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.4')),
BuilderConfig(name="dist-osx-py35",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-osx-py36",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-osx-py37",
slavenames=["macosx-vm6"],
factory=makeFactory('osx', 'dist', pyVer='3.7')),
BuilderConfig(name="dist-win32-py27",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='2.7')),
BuilderConfig(name="dist-win32-py34",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.4')),
BuilderConfig(name="dist-win32-py35",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-win32-py36",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-win32-py37",
slavenames=["win7-py27"],
factory=makeFactory('win32', 'dist', pyVer='3.7')),
BuilderConfig(name="dist-win64-py27",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='2.7')),
BuilderConfig(name="dist-win64-py34",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.4')),
BuilderConfig(name="dist-win64-py35",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.5')),
BuilderConfig(name="dist-win64-py36",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.6')),
BuilderConfig(name="dist-win64-py37",
slavenames=["win7-py27"],
factory=makeFactory('win64', 'dist', pyVer='3.7')),
# BuilderConfig(name="vagrant-bldr",
# slavenames=["vagrant-bldr"],
# factory=makeFactory('osx', 'vagrant')),
]
####### STATUS TARGETS
# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.
c['status'] = []
# Define authentication and turn on some protected options
from buildbot.status import html
from buildbot.status.web import authz
from buildbot.status.web.auth import BasicAuth
authz_cfg = authz.Authz(
auth = BasicAuth(bbpasswd.USERS),
forceBuild = 'auth',
forceAllBuilds = 'auth',
gracefulShutdown = True,
#pingBuilder = True,
stopBuild = True,
stopAllBuilds = True,
cancelPendingBuild = True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg,
change_hook_dialects={
'base': True,
'github': True},
change_hook_auth=["file:changehook.passwd"],
order_console_by_time=True,
))
# email notification
from buildbot.status.mail import MailNotifier
mn = MailNotifier(fromaddr="[email protected]",
sendToInterestedUsers=False,
mode='problem',
extraRecipients=['[email protected]'])
c['status'].append(mn)
####### PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot
# installation's html.WebStatus home page (linked to the
# 'titleURL') and is embedded in the title of the waterfall HTML page.
c['title'] = "wxPython Phoenix"
c['titleURL'] = "http://wxpython.org"
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
c['buildbotURL'] = "http://buildbot.wxpython.org:8010/"
####### DB URL
# This specifies what database buildbot uses to store change and scheduler
# state. You can leave this at its default for all but the largest
# installations.
c['db_url'] = "sqlite:///state.sqlite"
c['changeHorizon'] = 200
c['buildHorizon'] = 100
c['eventHorizon'] = 50
c['logHorizon'] = 40
c['buildCacheSize'] = 15