diff options
Diffstat (limited to 'build_files/buildbot/master.cfg')
-rw-r--r-- | build_files/buildbot/master.cfg | 107 |
1 files changed, 41 insertions, 66 deletions
diff --git a/build_files/buildbot/master.cfg b/build_files/buildbot/master.cfg index c4c8d8108e1..aee6f1175eb 100644 --- a/build_files/buildbot/master.cfg +++ b/build_files/buildbot/master.cfg @@ -36,7 +36,7 @@ c['change_source'] = SVNPoller( # only take place on one slave. from buildbot.process.factory import BuildFactory -from buildbot.steps.source import SVN +from buildbot.steps.source import SVN from buildbot.steps.shell import ShellCommand from buildbot.steps.shell import Compile from buildbot.steps.shell import Test @@ -50,102 +50,76 @@ from buildbot.config import BuilderConfig c['builders'] = [] buildernames = [] - -def add_builder(c, name, factory): +def add_builder(c, name, libdir, factory): slavenames = [] for slave in master_private.slaves: if name in slave['builders']: slavenames.append(slave['name']) - f = factory(name) - c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender')) - buildernames.append(name) + if len(slavenames) > 0: + f = factory(name, libdir) + c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender')) + buildernames.append(name) # common steps - def svn_step(): return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender') - def lib_svn_step(dir): return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir) - -def cmake_compile_step(): - return Compile(command=['make'], workdir='blender') - - -def cmake_test_step(): - return Test(workdir='blender') # make test - - def scons_compile_step(): return Compile(command=['python', 'scons/scons.py'], workdir='blender') - -class SlavePack(ShellCommand): - pack_script = 'slave_pack.py' - - def start(self): - if self.getProperty('buildername').find('scons') >= 0: - self.setCommand(['python', pack_script, 'scons']) - else: - self.setCommand(['python', pack_script, 'cmake']) - ShellCommand.start(self) - - -def file_upload(f, id): +def scons_file_upload(f, id): filename = 'buildbot_upload_' + id + '.zip' - pack_script = 'slave_pack.py' unpack_script = 'master_unpack.py' - f.addStep(FileDownload(name='download', mastersrc=pack_script, slavedest=pack_script)) - f.addStep(ShellCommand(name='package', command=['python', pack_script], description='packaging', descriptionDone='packaged')) - f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024)) + f.addStep(Compile(name='package', command=['python', 'scons/scons.py', 'BF_QUICK=slnt', 'buildslave'], description='packaging', descriptionDone='packaged', workdir='blender')) + f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024, workdir='install')) f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked')) -# linux cmake +# generic +def generic_builder(id, libdir=''): + filename = 'buildbot_upload_' + id + '.zip' + compile_script = '../blender/build_files/buildbot/slave_compile.py' + test_script = '../blender/build_files/buildbot/slave_test.py' + pack_script = '../blender/build_files/buildbot/slave_pack.py' + unpack_script = 'master_unpack.py' -def linux_cmake(id): f = BuildFactory() f.addStep(svn_step()) - f.addStep(cmake_compile_step()) - f.addStep(cmake_test_step()) - file_upload(f, id) - return f - -add_builder(c, 'linux_x86_64_cmake', linux_cmake) - -# mac cmake - + if libdir != '': + f.addStep(lib_svn_step(libdir)) -def mac_cmake(id): - f = BuildFactory() - f.addStep(svn_step()) - f.addStep(lib_svn_step('darwin-9.x.universal')) - f.addStep(cmake_compile_step()) - f.addStep(cmake_test_step()) - file_upload(f, id) + f.addStep(Compile(command=['python', compile_script, id])) + f.addStep(Test(command=['python', test_script, id])) + f.addStep(ShellCommand(name='package', command=['python', pack_script, id], description='packaging', descriptionDone='packaged')) + f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024)) + f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked')) return f -add_builder(c, 'mac_x86_64_cmake', mac_cmake) +add_builder(c, 'mac_x86_64_cmake', 'darwin-9.x.universal', generic_builder) +add_builder(c, 'mac_i386_cmake', 'darwin-9.x.universal', generic_builder) +add_builder(c, 'mac_ppc_cmake', 'darwin-9.x.universal', generic_builder) +add_builder(c, 'linux_x86_64_cmake', '', generic_builder) +add_builder(c, 'linux_x86_64_scons', '', generic_builder) # win32 scons - # TODO: add scons test target -def win32_scons(id): +def win32_scons(id, libdir): f = BuildFactory() f.addStep(svn_step()) - f.addStep(lib_svn_step('windows')) + f.addStep(lib_svn_step(libdir)) f.addStep(scons_compile_step()) - file_upload(f, id) + scons_file_upload(f, id) return f -add_builder(c, 'win32_scons', win32_scons) +add_builder(c, 'win32_scons', 'windows', win32_scons) # SCHEDULERS # @@ -178,16 +152,16 @@ c['status'] = [] from buildbot.status import html from buildbot.status.web import auth, authz -authz_cfg = authz.Authz( +authz_cfg=authz.Authz( # change any of these to True to enable; see the manual for more # options - gracefulShutdown=False, - forceBuild=True, # use this to test your slave once it is set up - forceAllBuilds=False, - pingBuilder=False, - stopBuild=False, - stopAllBuilds=False, - cancelPendingBuild=False, + gracefulShutdown = False, + forceBuild = True, # use this to test your slave once it is set up + forceAllBuilds = False, + pingBuilder = False, + stopBuild = False, + stopAllBuilds = False, + cancelPendingBuild = False, ) c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) @@ -212,3 +186,4 @@ c['buildbotURL'] = "http://builder.blender.org/" # installations. c['db_url'] = "sqlite:///state.sqlite" + |