2 # ex: set syntax=python:
6 # Dictionary that the buildmaster pays attention to.
7 c = BuildmasterConfig = {}
11 # We load the slaves and their passwords from a separator file, so we can have
14 from buildbot.buildslave import BuildSlave
19 for slave in master_private.slaves:
20 c['slaves'].append(BuildSlave(slave['name'], slave['password']))
22 # TCP port through which slaves connect
24 c['slavePortnum'] = 9989
28 from buildbot.changes.svnpoller import SVNPoller
30 c['change_source'] = SVNPoller(
31 'https://svn.blender.org/svnroot/bf-blender/trunk/',
36 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
37 # what steps, and which slaves can execute them. Note that any particular build will
38 # only take place on one slave.
40 from buildbot.process.factory import BuildFactory
41 from buildbot.steps.source import SVN
42 from buildbot.steps.shell import ShellCommand
43 from buildbot.steps.shell import Compile
44 from buildbot.steps.shell import Test
45 from buildbot.steps.transfer import FileUpload
46 # from buildbot.steps.transfer import FileDownload
47 from buildbot.steps.master import MasterShellCommand
48 from buildbot.config import BuilderConfig
56 def add_builder(c, name, libdir, factory):
59 for slave in master_private.slaves:
60 if name in slave['builders']:
61 slavenames.append(slave['name'])
63 if len(slavenames) > 0:
64 f = factory(name, libdir)
65 c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
66 buildernames.append(name)
72 return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
75 def lib_svn_step(dir):
76 return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
81 def generic_builder(id, libdir=""):
82 filename = 'buildbot_upload_' + id + '.zip'
83 compile_script = '../blender/build_files/buildbot/slave_compile.py'
84 test_script = '../blender/build_files/buildbot/slave_test.py'
85 pack_script = '../blender/build_files/buildbot/slave_pack.py'
86 unpack_script = 'master_unpack.py'
91 f.addStep(lib_svn_step(libdir))
93 f.addStep(Compile(command=['python', compile_script, id]))
94 f.addStep(Test(command=['python', test_script, id]))
95 f.addStep(ShellCommand(name='package', command=['python', pack_script, id], description='packaging', descriptionDone='packaged'))
96 if id.find('cmake') != -1:
97 f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
99 f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
100 f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
105 add_builder(c, 'mac_x86_64_cmake', 'darwin-9.x.universal', generic_builder)
106 add_builder(c, 'mac_i386_cmake', 'darwin-9.x.universal', generic_builder)
107 add_builder(c, 'mac_ppc_cmake', 'darwin-9.x.universal', generic_builder)
108 add_builder(c, 'linux_x86_64_cmake', '', generic_builder)
109 add_builder(c, 'linux_x86_64_scons', '', generic_builder)
110 add_builder(c, 'win32_scons', 'windows', generic_builder)
114 # Decide how to react to incoming changes.
116 # from buildbot.scheduler import Scheduler
117 from buildbot.schedulers import timed
120 #c['schedulers'].append(Scheduler(name="all", branch=None,
121 # treeStableTimer=None,
123 #c['schedulers'].append(timed.Periodic(name="nightly",
124 # builderNames=buildernames,
125 # periodicBuildTimer=24*60*60))
127 c['schedulers'].append(timed.Nightly(name='nightly',
128 builderNames=buildernames,
134 # 'status' is a list of Status Targets. The results of each build will be
135 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
136 # including web pages, email senders, and IRC bots.
140 from buildbot.status import html
141 from buildbot.status.web import authz
143 authz_cfg = authz.Authz(
144 # change any of these to True to enable; see the manual for more
146 gracefulShutdown=False,
147 forceBuild=True, # use this to test your slave once it is set up
148 forceAllBuilds=False,
152 cancelPendingBuild=False,
155 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
159 c['projectName'] = "Blender"
160 c['projectURL'] = "http://www.blender.org"
162 # the 'buildbotURL' string should point to the location where the buildbot's
163 # internal web server (usually the html.WebStatus page) is visible. This
164 # typically uses the port number set in the Waterfall 'status' entry, but
165 # with an externally-visible host name which the buildbot cannot figure out
168 c['buildbotURL'] = "http://builder.blender.org/"
172 # This specifies what database buildbot uses to store change and scheduler
173 # state. You can leave this at its default for all but the largest
176 c['db_url'] = "sqlite:///state.sqlite"