1# -*- python -*- 2# ex: set syntax=python: 3#------------------------------------------------------------------------------- 4# This is the buildmaster config file for the wxPython Phoenix Buildbot, 5# located at http://buildbot.wxpython.org:8010/. This file is located here in 6# order to allow it to be versioned and backed up. However it is NOT 7# automatically copied into the buildmaster's working folder, that must be 8# done by hand after reviewing changes made here. It must be installed as 9# 'master.cfg' in the buildmaster's base directory. 10#------------------------------------------------------------------------------- 11 12# This is the dictionary that the buildmaster pays attention to. We also use 13# a shorter alias to save typing. 14c = BuildmasterConfig = {} 15 16 17 18####### BUILDSLAVES 19 20# The 'slaves' list defines the set of recognized buildslaves. Each element 21# is a BuildSlave object, specifying a unique slave name and password. The 22# same slave name and password must be configured on the slave. 23 24# Passwords are stored separately and not maintained in the source repository 25# for security's sake 26import bbpasswd 27reload(bbpasswd) 28 29from buildbot.buildslave import BuildSlave 30c['slaves'] = [#BuildSlave("osx-10.7-vm-py2.7", bbpasswd.PASSWD1, 31 # notify_on_missing='robin@alldunn.com', 32 # max_builds=1), 33 34 #BuildSlave("macosx-vm4", bbpasswd.PASSWD1, 35 # notify_on_missing='robin@alldunn.com', 36 # max_builds=1), 37 38 BuildSlave("macosx-vm6", bbpasswd.PASSWD1, 39 notify_on_missing='robin@alldunn.com', 40 max_builds=1), 41 42 BuildSlave("win7-py27", bbpasswd.PASSWD1, 43 notify_on_missing='robin@alldunn.com', 44 max_builds=1), 45 46 BuildSlave("ubuntu-x64_86-py27", bbpasswd.PASSWD1, 47 notify_on_missing='robin@alldunn.com', 48 max_builds=1), 49 50 #BuildSlave("osx_10.6-py27", bbpasswd.PASSWD1, 51 # notify_on_missing='robin@alldunn.com', 52 # max_builds=1), 53 54 #BuildSlave('vagrant-bldr', bbpasswd.PASSWD1, 55 # notify_on_missing='robin@alldunn.com', 56 # max_builds=1), 57 ] 58 59# 'slavePortnum' defines the TCP port to listen on for connections from slaves. 60# This must match the value configured into the buildslaves (with their 61# --master option) 62c['slavePortnum'] = 9989 63 64 65####### CHANGESOURCES 66 67# The 'change_source' setting tells the buildmaster how it should find out 68# about source code changes. 69 70## c['change_source'] = 71 72# See WebStatus setup below for alternate approach using GitHub's webhooks, 73# where github will send us info about changes as they are pushed or merged, 74# instead of having buildbot poll the repos itself. 75 76 77# TODO: Switch to the wxWidgets/Phoenix repo 78phoenixGitUrl = 'https://github.com/RobinD42/Phoenix.git' 79phoenixGitBranch = 'wxPy-4.0.x' 80 81 82 83 84####### SCHEDULERS 85 86# Configure the Schedulers, which decide how to react to incoming changes. 87 88from buildbot.schedulers.basic import SingleBranchScheduler 89from buildbot.schedulers.timed import Nightly 90from buildbot.schedulers.forcesched import ForceScheduler 91from buildbot.changes.filter import ChangeFilter 92 93 94c['schedulers'] = [] 95c['schedulers'].append( SingleBranchScheduler( 96 name="sched-build", 97 change_filter=ChangeFilter(branch=phoenixGitBranch), 98 treeStableTimer=30, 99 builderNames=["build-win32-py27", 100 "build-win32-py35", 101 "build-win32-py36", 102 "build-win32-py37", 103 "build-win64-py27", 104 "build-win64-py35", 105 "build-win64-py36", 106 "build-win64-py37", 107 "build-osx-py27", 108 "build-osx-py35", 109 "build-osx-py36", 110 "build-osx-py37", 111 "build-gtk-py27", 112 "build-gtk-py35", 113 "build-gtk3-py27", 114 "build-gtk3-py35", 115 ])) 116 117 118c['schedulers'].append( Nightly( 119 name="sched-dist", 120 branch=phoenixGitBranch, 121 hour=1, minute=15, 122 onlyIfChanged=True, 123 builderNames=["dist-osx-py27", 124 "dist-osx-py34", 125 "dist-osx-py35", 126 "dist-osx-py36", 127 "dist-osx-py37", 128 "dist-win32-py27", 129 "dist-win32-py34", 130 "dist-win32-py35", 131 "dist-win32-py36", 132 "dist-win32-py37", 133 "dist-win64-py27", 134 "dist-win64-py34", 135 "dist-win64-py35", 136 "dist-win64-py36", 137 "dist-win64-py37", 138 ])) 139 140 141c['schedulers'].append( Nightly( 142 name="sched-docs", 143 branch=phoenixGitBranch, 144 hour=1, minute=10, 145 onlyIfChanged=True, 146 builderNames=["dist-docs"])) 147 148c['schedulers'].append( Nightly( 149 name="sched-src", 150 branch=phoenixGitBranch, 151 hour=1, minute=10, 152 onlyIfChanged=True, 153 builderNames=["dist-src"])) 154 155# c['schedulers'].append( Nightly( 156# name="sched-vagrant", 157# branch=phoenixGitBranch, 158# hour=1, minute=10, 159# onlyIfChanged=True, 160# builderNames=["vagrant-bldr"])) 161 162c['schedulers'].append( ForceScheduler( 163 name='sched-force', 164 builderNames=["build-win32-py27", 165 "build-win32-py35", 166 "build-win32-py36", 167 "build-win32-py37", 168 "build-win64-py27", 169 "build-win64-py35", 170 "build-win64-py36", 171 "build-win64-py37", 172 "build-osx-py27", 173 "build-osx-py35", 174 "build-osx-py36", 175 "build-osx-py37", 176 "build-gtk-py27", 177 "build-gtk-py35", 178 "build-gtk3-py27", 179 "build-gtk3-py35", 180 "dist-osx-py27", 181 "dist-osx-py34", 182 "dist-osx-py35", 183 "dist-osx-py36", 184 "dist-osx-py37", 185 "dist-win32-py27", 186 "dist-win32-py34", 187 "dist-win32-py35", 188 "dist-win32-py36", 189 "dist-win32-py37", 190 "dist-win64-py27", 191 "dist-win64-py34", 192 "dist-win64-py35", 193 "dist-win64-py36", 194 "dist-win64-py37", 195 "dist-docs", 196 "dist-src", 197 #"vagrant-bldr", 198 ])) 199 200 201####### BUILDERS 202 203# The 'builders' list defines the Builders, which tell Buildbot how to perform a build: 204# what steps, and which slaves can execute them. Note that any particular build will 205# only take place on one slave. 206 207# NOTE on build properties. The following properties are defined in the 208# factories generated in this function that can be used to customize the 209# builds: 210# 211# fullclean: Set to 'yes' to fully clean the "build-*" builders before 212# checking out the code. Normally they will try to do an incremental 213# build to save time, but sometimes things change enough that 214# incrementals won't work. 215# 216# buildargs: Adds additional flags or commands to the build.py command 217# line. For example, adding '--releases' will (in theory) switch 218# the "dist-*" builders from making snapshot builds to making release 219# builds. 220 221from buildbot.process.factory import BuildFactory 222from buildbot.process.properties import Property, WithProperties 223from buildbot.steps.source.git import Git 224from buildbot.steps.shell import ShellCommand 225from buildbot.config import BuilderConfig 226 227 228def makeFactory(port, buildType='buildOnly', pyVer='2.7'): 229 factory = BuildFactory() 230 231 # Was the build started from the force build form with a "fullclean" 232 # property set? If so, fully clobber the git workspace and start fresh. 233 cmd = ['bash', '-c', 234 WithProperties('if [ %(fullclean:-no)s == yes ]; then rm -rf ../Phoenix; echo fully cleaned; fi'), 235 ] 236 factory.addStep(ShellCommand(command=cmd, description='fullclean?', workdir="")) 237 238 239 # By default do an incremental update, keeping prior build tree 240 mode = 'incremental' 241 method = None 242 clean = '' 243 244 # Start from a clean build tree for the daily "dist" builds 245 if buildType in ['dist', 'sdist', 'docs', 'vagrant']: 246 mode = 'full' 247 method = 'clobber' 248 249 # extra config options for git commands 250 gitConfig = {'core.autocrlf' : 'input'} 251 252 # all of them need to fetch the source 253 factory.addStep(Git(name='phoenix-git', repourl=phoenixGitUrl, branch=phoenixGitBranch, 254 workdir="Phoenix", 255 config=gitConfig, 256 progress=True, 257 clobberOnFailure=True, 258 submodules=True, 259 logEnviron=False, 260 timeout=2400, 261 mode=mode, method=method)) 262 263 if buildType == 'sdist': 264 cmd = 'python -u build.py %s setrev dox touch etg sip build '\ 265 'wxlib sdist sdist_demo --upload' % pyVer 266 267 elif buildType == 'docs': 268 cmd = 'python -u build.py %s setrev dox touch etg sip build wxlib ' \ 269 'sphinx bdist_docs --upload' % pyVer 270 271 elif buildType == 'vagrant': 272 # TODO: This will also upload the source tarfile, which is redundant 273 # since there is another job for that. Is there an easy way around 274 # that? 275 cmd = 'python -u build.py setrev dox etg --nodoc sip sdist ' \ 276 'build_vagrant --upload' 277 278 else: 279 cmd = 'python -u build.py %s %s setrev dox touch etg --nodoc sip build' % (pyVer, clean) 280 if port == 'osx': 281 if buildType == 'buildOnly': 282 # Only build one arch for the normal builds, so dependency 283 # tracking will be turned on so we can have faster turn-around 284 # times for those builds. 285 cmd += ' --mac_arch=i386' 286 else: 287 # Build both architectures for the distribution builders 288 cmd += ' --mac_arch=i386,x86_64' 289 if port == 'gtk2': 290 cmd += ' --gtk2' 291 if port == 'gtk3': 292 cmd += ' --gtk3' 293 if port in ['win32', 'win64']: 294 cmd += ' --cairo' 295 if port == 'win64': 296 cmd += ' --x64' 297 if buildType == 'dist': 298 cmd += ' bdist_wheel --upload --relwithdebug' 299 300 cmd = cmd.split() + [Property('buildargs', default='')] 301 factory.addStep(ShellCommand(command=cmd, workdir="Phoenix", 302 description="building", descriptionDone="build")) 303 return factory 304 305 306 307c['builders'] = [ 308 BuilderConfig(name="build-osx-py27", 309 slavenames=["macosx-vm6"], 310 factory=makeFactory('osx')), 311 312 BuilderConfig(name="build-osx-py35", 313 slavenames=["macosx-vm6"], 314 factory=makeFactory('osx', pyVer='3.5')), 315 316 BuilderConfig(name="build-osx-py36", 317 slavenames=["macosx-vm6"], 318 factory=makeFactory('osx', pyVer='3.6')), 319 320 BuilderConfig(name="build-osx-py37", 321 slavenames=["macosx-vm6"], 322 factory=makeFactory('osx', pyVer='3.7')), 323 324 325 326 327 BuilderConfig(name="build-win32-py27", 328 slavenames=["win7-py27"], 329 factory=makeFactory('win32', pyVer='2.7')), 330 331 BuilderConfig(name="build-win32-py35", 332 slavenames=["win7-py27"], 333 factory=makeFactory('win32', pyVer='3.5')), 334 335 BuilderConfig(name="build-win32-py36", 336 slavenames=["win7-py27"], 337 factory=makeFactory('win32', pyVer='3.6')), 338 339 BuilderConfig(name="build-win32-py37", 340 slavenames=["win7-py27"], 341 factory=makeFactory('win32', pyVer='3.7')), 342 343 BuilderConfig(name="build-win64-py27", 344 slavenames=["win7-py27"], 345 factory=makeFactory('win64', pyVer='2.7')), 346 347 BuilderConfig(name="build-win64-py35", 348 slavenames=["win7-py27"], 349 factory=makeFactory('win64', pyVer='3.5')), 350 351 BuilderConfig(name="build-win64-py36", 352 slavenames=["win7-py27"], 353 factory=makeFactory('win64', pyVer='3.6')), 354 355 BuilderConfig(name="build-win64-py37", 356 slavenames=["win7-py27"], 357 factory=makeFactory('win64', pyVer='3.7')), 358 359 360 361 BuilderConfig(name="build-gtk-py27", 362 slavenames=["ubuntu-x64_86-py27"], 363 factory=makeFactory('gtk2')), 364 365 BuilderConfig(name="build-gtk-py35", 366 slavenames=["ubuntu-x64_86-py27"], 367 factory=makeFactory('gtk2', pyVer='3.5')), 368 369 BuilderConfig(name="build-gtk3-py27", 370 slavenames=["ubuntu-x64_86-py27"], 371 factory=makeFactory('gtk3')), 372 373 BuilderConfig(name="build-gtk3-py35", 374 slavenames=["ubuntu-x64_86-py27"], 375 factory=makeFactory('gtk3', pyVer='3.5')), 376 377 378 BuilderConfig(name="dist-docs", 379 slavenames=["win7-py27"], 380 factory=makeFactory('', 'docs')), 381 382 BuilderConfig(name="dist-src", 383 slavenames=["ubuntu-x64_86-py27"], 384 factory=makeFactory('', 'sdist')), 385 386 387 388 BuilderConfig(name="dist-osx-py27", 389 slavenames=["macosx-vm6"], 390 factory=makeFactory('osx', 'dist')), 391 392 BuilderConfig(name="dist-osx-py34", 393 slavenames=["macosx-vm6"], 394 factory=makeFactory('osx', 'dist', pyVer='3.4')), 395 396 BuilderConfig(name="dist-osx-py35", 397 slavenames=["macosx-vm6"], 398 factory=makeFactory('osx', 'dist', pyVer='3.5')), 399 400 BuilderConfig(name="dist-osx-py36", 401 slavenames=["macosx-vm6"], 402 factory=makeFactory('osx', 'dist', pyVer='3.6')), 403 404 BuilderConfig(name="dist-osx-py37", 405 slavenames=["macosx-vm6"], 406 factory=makeFactory('osx', 'dist', pyVer='3.7')), 407 408 409 BuilderConfig(name="dist-win32-py27", 410 slavenames=["win7-py27"], 411 factory=makeFactory('win32', 'dist', pyVer='2.7')), 412 413 BuilderConfig(name="dist-win32-py34", 414 slavenames=["win7-py27"], 415 factory=makeFactory('win32', 'dist', pyVer='3.4')), 416 417 BuilderConfig(name="dist-win32-py35", 418 slavenames=["win7-py27"], 419 factory=makeFactory('win32', 'dist', pyVer='3.5')), 420 421 BuilderConfig(name="dist-win32-py36", 422 slavenames=["win7-py27"], 423 factory=makeFactory('win32', 'dist', pyVer='3.6')), 424 425 BuilderConfig(name="dist-win32-py37", 426 slavenames=["win7-py27"], 427 factory=makeFactory('win32', 'dist', pyVer='3.7')), 428 429 BuilderConfig(name="dist-win64-py27", 430 slavenames=["win7-py27"], 431 factory=makeFactory('win64', 'dist', pyVer='2.7')), 432 433 BuilderConfig(name="dist-win64-py34", 434 slavenames=["win7-py27"], 435 factory=makeFactory('win64', 'dist', pyVer='3.4')), 436 437 BuilderConfig(name="dist-win64-py35", 438 slavenames=["win7-py27"], 439 factory=makeFactory('win64', 'dist', pyVer='3.5')), 440 441 BuilderConfig(name="dist-win64-py36", 442 slavenames=["win7-py27"], 443 factory=makeFactory('win64', 'dist', pyVer='3.6')), 444 445 BuilderConfig(name="dist-win64-py37", 446 slavenames=["win7-py27"], 447 factory=makeFactory('win64', 'dist', pyVer='3.7')), 448 449 450 # BuilderConfig(name="vagrant-bldr", 451 # slavenames=["vagrant-bldr"], 452 # factory=makeFactory('osx', 'vagrant')), 453 ] 454 455 456 457####### STATUS TARGETS 458 459# 'status' is a list of Status Targets. The results of each build will be 460# pushed to these targets. buildbot/status/*.py has a variety to choose from, 461# including web pages, email senders, and IRC bots. 462 463c['status'] = [] 464 465# Define authentication and turn on some protected options 466from buildbot.status import html 467from buildbot.status.web import authz 468from buildbot.status.web.auth import BasicAuth 469 470authz_cfg = authz.Authz( 471 auth = BasicAuth(bbpasswd.USERS), 472 forceBuild = 'auth', 473 forceAllBuilds = 'auth', 474 gracefulShutdown = True, 475 #pingBuilder = True, 476 stopBuild = True, 477 stopAllBuilds = True, 478 cancelPendingBuild = True, 479) 480 481c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg, 482 change_hook_dialects={ 483 'base': True, 484 'github': True}, 485 change_hook_auth=["file:changehook.passwd"], 486 order_console_by_time=True, 487 )) 488 489 490# email notification 491 492from buildbot.status.mail import MailNotifier 493mn = MailNotifier(fromaddr="buildbot@riobu.com", 494 sendToInterestedUsers=False, 495 mode='problem', 496 extraRecipients=['robin@alldunn.com']) 497 498c['status'].append(mn) 499 500####### PROJECT IDENTITY 501 502# the 'title' string will appear at the top of this buildbot 503# installation's html.WebStatus home page (linked to the 504# 'titleURL') and is embedded in the title of the waterfall HTML page. 505 506c['title'] = "wxPython Phoenix" 507c['titleURL'] = "http://wxpython.org" 508 509# the 'buildbotURL' string should point to the location where the buildbot's 510# internal web server (usually the html.WebStatus page) is visible. This 511# typically uses the port number set in the Waterfall 'status' entry, but 512# with an externally-visible host name which the buildbot cannot figure out 513# without some help. 514 515c['buildbotURL'] = "http://buildbot.wxpython.org:8010/" 516 517####### DB URL 518 519# This specifies what database buildbot uses to store change and scheduler 520# state. You can leave this at its default for all but the largest 521# installations. 522c['db_url'] = "sqlite:///state.sqlite" 523 524 525 526c['changeHorizon'] = 200 527c['buildHorizon'] = 100 528c['eventHorizon'] = 50 529c['logHorizon'] = 40 530c['buildCacheSize'] = 15 531