BuildBot: various changes to support building branches.
[blender.git] / build_files / buildbot / master.cfg
index 6913ed2dab007038773499a9a468e1db9329603f..b4d69a289eecd0d7f83fbe78109e30985f7345a1 100644 (file)
@@ -53,7 +53,7 @@ c['builders'] = []
 buildernames = []
 
 
-def add_builder(c, name, libdir, factory):
+def add_builder(c, name, libdir, factory, branch=''):
     slavenames = []
 
     for slave in master_private.slaves:
@@ -61,16 +61,18 @@ def add_builder(c, name, libdir, factory):
             slavenames.append(slave['name'])
 
     if len(slavenames) > 0:
-        f = factory(name, libdir)
+        f = factory(name, libdir, branch)
         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 svn_step(branch=''):
+    if branch:
+        return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/branches/%%BRANCH%%', mode='update', defaultBranch=branch, workdir='blender')
+    else:
+        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)
@@ -78,7 +80,7 @@ def lib_svn_step(dir):
 # generic builder
 
 
-def generic_builder(id, libdir=""):
+def generic_builder(id, libdir='', branch=''):
     filename = 'buildbot_upload_' + id + '.zip'
     compile_script = '../blender/build_files/buildbot/slave_compile.py'
     test_script = '../blender/build_files/buildbot/slave_test.py'
@@ -86,13 +88,13 @@ def generic_builder(id, libdir=""):
     unpack_script = 'master_unpack.py'
 
     f = BuildFactory()
-    f.addStep(svn_step())
+    f.addStep(svn_step(branch))
     if libdir != '':
         f.addStep(lib_svn_step(libdir))
 
     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(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
     if id.find('cmake') != -1:
         f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
     else:
@@ -102,12 +104,19 @@ def generic_builder(id, libdir=""):
 
 # builders
 
-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, 'mac_x86_64_scons', 'darwin-9.x.universal', generic_builder)
+add_builder(c, 'salad_mac_x86_64_scons', 'darwin-9.x.universal', generic_builder, 'soc-2011-salad')
+add_builder(c, 'mac_i386_scons', 'darwin-9.x.universal', generic_builder)
+add_builder(c, 'mac_ppc_scons', 'darwin-9.x.universal', generic_builder)
+#add_builder(c, 'linux_x86_64_cmake', '', generic_builder)
+add_builder(c, 'linux_i386_scons', '', generic_builder)
+add_builder(c, 'salad_linux_i386_scons', '', generic_builder, 'soc-2011-salad')
 add_builder(c, 'linux_x86_64_scons', '', generic_builder)
+add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 'soc-2011-salad')
 add_builder(c, 'win32_scons', 'windows', generic_builder)
+add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 'soc-2011-salad')
+#add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
+#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)
 
 # SCHEDULERS
 #
@@ -149,7 +158,7 @@ authz_cfg = authz.Authz(
     pingBuilder=False,
     stopBuild=False,
     stopAllBuilds=False,
-    cancelPendingBuild=False,
+    cancelPendingBuild=True,
 )
 
 c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))