mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
411 lines
16 KiB
Python
411 lines
16 KiB
Python
# -*- 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 = {}
|
|
|
|
wxGitUrl = 'https://github.com/RobinD42/wxWidgets.git'
|
|
wxGitBranch = 'WX_3_0_BRANCH' #'wxPy-3.0-branch'
|
|
|
|
phoenixGitUrl = 'https://github.com/RobinD42/Phoenix.git'
|
|
phoenixGitBranch = 'master'
|
|
|
|
|
|
|
|
####### 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 souce 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='robin@alldunn.com',
|
|
max_builds=1),
|
|
|
|
BuildSlave("win7-py27", bbpasswd.PASSWD1,
|
|
notify_on_missing='robin@alldunn.com',
|
|
max_builds=1),
|
|
|
|
BuildSlave("ubuntu-x64_86-py27", bbpasswd.PASSWD1,
|
|
notify_on_missing='robin@alldunn.com',
|
|
max_builds=1),
|
|
|
|
BuildSlave("osx_10.6-py27", bbpasswd.PASSWD1,
|
|
notify_on_missing='robin@alldunn.com',
|
|
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.
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
####### 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
|
|
|
|
|
|
def my_filter_fn(change):
|
|
if change.repository == phoenixGitUrl and change.branch == phoenixGitBranch:
|
|
return True
|
|
if change.repository == wxGitUrl and change.branch == wxGitBranch:
|
|
return True
|
|
return False
|
|
my_filter = ChangeFilter(filter_fn=my_filter_fn)
|
|
|
|
|
|
c['schedulers'] = []
|
|
c['schedulers'].append( SingleBranchScheduler(
|
|
name="sched-build",
|
|
change_filter=my_filter,
|
|
treeStableTimer=30,
|
|
builderNames=["build-win32-py27",
|
|
"build-win32-py33",
|
|
"build-win32-py34",
|
|
"build-win64-py27",
|
|
"build-win64-py33",
|
|
"build-win64-py34",
|
|
"build-osx-py27-2",
|
|
"build-osx-py33",
|
|
"build-osx-py34",
|
|
"build-gtk-py27",
|
|
"build-gtk-py33",
|
|
]))
|
|
|
|
|
|
c['schedulers'].append( Nightly(
|
|
name="sched-dist",
|
|
change_filter=my_filter,
|
|
branch=None,
|
|
hour=21, minute=0,
|
|
onlyIfChanged=True,
|
|
builderNames=["dist-osx-py27-2",
|
|
"dist-osx-py33",
|
|
"dist-osx-py34",
|
|
"dist-win32-py27",
|
|
"dist-win32-py33",
|
|
"dist-win32-py34",
|
|
"dist-win64-py27",
|
|
"dist-win64-py33",
|
|
"dist-win64-py34",
|
|
]))
|
|
|
|
c['schedulers'].append( Nightly(
|
|
name="sched-docs",
|
|
change_filter=my_filter,
|
|
branch=None,
|
|
hour=1, minute=10,
|
|
onlyIfChanged=True,
|
|
builderNames=["build-docs"]))
|
|
|
|
c['schedulers'].append( ForceScheduler(
|
|
name='sched-force',
|
|
builderNames=["build-win32-py27",
|
|
"build-win32-py33",
|
|
"build-win32-py34",
|
|
"build-win64-py27",
|
|
"build-win64-py33",
|
|
"build-win64-py34",
|
|
"build-osx-py27-2",
|
|
"build-osx-py33",
|
|
"build-osx-py34",
|
|
"build-gtk-py27",
|
|
"build-gtk-py33",
|
|
"dist-osx-py27-2",
|
|
"dist-osx-py33",
|
|
"dist-osx-py34",
|
|
"dist-win32-py27",
|
|
"dist-win32-py33",
|
|
"dist-win32-py34",
|
|
"dist-win64-py27",
|
|
"dist-win64-py33",
|
|
"dist-win64-py34",
|
|
"build-docs",
|
|
]))
|
|
|
|
|
|
####### 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.
|
|
|
|
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, clobber the SVN checkout folders.
|
|
cmd = ['bash', '-c',
|
|
WithProperties('if [ %(fullclean:-no)s == yes ]; then rm -rf ../wxWidgets ../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 builds
|
|
if buildType in ['dist', 'docs']:
|
|
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='wx-git', repourl=wxGitUrl, branch=wxGitBranch,
|
|
workdir="wxWidgets",
|
|
config=gitConfig,
|
|
progress=True,
|
|
clobberOnFailure=True,
|
|
alwaysUseLatest=True,
|
|
mode=mode, method=method))
|
|
factory.addStep(Git(name='phoenix-git', repourl=phoenixGitUrl, branch=phoenixGitBranch,
|
|
workdir="Phoenix",
|
|
config=gitConfig,
|
|
progress=True,
|
|
clobberOnFailure=True,
|
|
alwaysUseLatest=True,
|
|
mode=mode, method=method))
|
|
|
|
if buildType == 'docs':
|
|
cmd = 'python -u build.py %s setrev dox touch etg sip build wxlib wxtools wxpy ' \
|
|
'sphinx docs_bdist sdist --upload' % pyVer
|
|
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 in ['win32', 'win64']:
|
|
cmd += ' --cairo'
|
|
if port == 'win64':
|
|
cmd += ' --x64'
|
|
if buildType == 'dist':
|
|
cmd += ' bdist_wheel --upload'
|
|
|
|
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-2",
|
|
slavenames=["osx-10.7-vm-py2.7"],
|
|
factory=makeFactory('osx')),
|
|
|
|
BuilderConfig(name="build-osx-py33",
|
|
slavenames=["osx_10.6-py27"],
|
|
factory=makeFactory('osx', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="build-osx-py34",
|
|
slavenames=["osx_10.6-py27"],
|
|
factory=makeFactory('osx', pyVer='3.4')),
|
|
|
|
|
|
|
|
BuilderConfig(name="build-win32-py27",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', pyVer='2.7')),
|
|
|
|
BuilderConfig(name="build-win32-py33",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="build-win32-py34",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', pyVer='3.4')),
|
|
|
|
BuilderConfig(name="build-win64-py27",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', pyVer='2.7')),
|
|
|
|
BuilderConfig(name="build-win64-py33",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="build-win64-py34",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', pyVer='3.4')),
|
|
|
|
|
|
|
|
BuilderConfig(name="build-gtk-py27",
|
|
slavenames=["ubuntu-x64_86-py27"],
|
|
factory=makeFactory('gtk')),
|
|
|
|
BuilderConfig(name="build-gtk-py33",
|
|
slavenames=["ubuntu-x64_86-py27"],
|
|
factory=makeFactory('gtk', pyVer='3.3')),
|
|
|
|
|
|
|
|
BuilderConfig(name="build-docs",
|
|
slavenames=["ubuntu-x64_86-py27"],
|
|
factory=makeFactory('', 'docs')),
|
|
|
|
|
|
|
|
BuilderConfig(name="dist-osx-py27-2",
|
|
slavenames=["osx-10.7-vm-py2.7"],
|
|
factory=makeFactory('osx', 'dist')),
|
|
|
|
BuilderConfig(name="dist-osx-py33",
|
|
slavenames=["osx_10.6-py27"],
|
|
factory=makeFactory('osx', 'dist', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="dist-osx-py34",
|
|
slavenames=["osx_10.6-py27"],
|
|
factory=makeFactory('osx', 'dist', pyVer='3.4')),
|
|
|
|
|
|
BuilderConfig(name="dist-win32-py27",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', 'dist', pyVer='2.7')),
|
|
|
|
BuilderConfig(name="dist-win32-py33",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', 'dist', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="dist-win32-py34",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win32', 'dist', pyVer='3.4')),
|
|
|
|
BuilderConfig(name="dist-win64-py27",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', 'dist', pyVer='2.7')),
|
|
|
|
BuilderConfig(name="dist-win64-py33",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', 'dist', pyVer='3.3')),
|
|
|
|
BuilderConfig(name="dist-win64-py34",
|
|
slavenames=["win7-py27"],
|
|
factory=makeFactory('win64', 'dist', pyVer='3.4')),
|
|
|
|
]
|
|
|
|
|
|
|
|
####### 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"],
|
|
))
|
|
|
|
|
|
# email notification
|
|
|
|
from buildbot.status.mail import MailNotifier
|
|
mn = MailNotifier(fromaddr="buildbot@riobu.com",
|
|
sendToInterestedUsers=False,
|
|
mode='problem',
|
|
extraRecipients=['robin@alldunn.com'])
|
|
|
|
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
|