use spaces rather then tabs + minor pep8 edits.
This commit is contained in:
@@ -50,6 +50,7 @@ from buildbot.config import BuilderConfig
|
||||
c['builders'] = []
|
||||
buildernames = []
|
||||
|
||||
|
||||
def add_builder(c, name, factory):
|
||||
slavenames = []
|
||||
|
||||
@@ -63,30 +64,38 @@ def add_builder(c, name, factory):
|
||||
|
||||
# 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:
|
||||
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):
|
||||
filename = 'buildbot_upload_' + id + '.zip'
|
||||
pack_script = 'slave_pack.py'
|
||||
@@ -94,11 +103,12 @@ def file_upload(f, id):
|
||||
|
||||
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(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'))
|
||||
|
||||
# linux cmake
|
||||
|
||||
|
||||
def linux_cmake(id):
|
||||
f = BuildFactory()
|
||||
f.addStep(svn_step())
|
||||
@@ -111,6 +121,7 @@ add_builder(c, 'linux_x86_64_cmake', linux_cmake)
|
||||
|
||||
# mac cmake
|
||||
|
||||
|
||||
def mac_cmake(id):
|
||||
f = BuildFactory()
|
||||
f.addStep(svn_step())
|
||||
@@ -124,6 +135,7 @@ add_builder(c, 'mac_x86_64_cmake', mac_cmake)
|
||||
|
||||
# win32 scons
|
||||
|
||||
|
||||
# TODO: add scons test target
|
||||
def win32_scons(id):
|
||||
f = BuildFactory()
|
||||
@@ -166,16 +178,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))
|
||||
@@ -200,4 +212,3 @@ c['buildbotURL'] = "http://builder.blender.org/"
|
||||
# installations.
|
||||
|
||||
c['db_url'] = "sqlite:///state.sqlite"
|
||||
|
||||
|
@@ -24,6 +24,7 @@ import shutil
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
|
||||
# extension stripping
|
||||
def strip_extension(filename):
|
||||
extensions = ['.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe']
|
||||
@@ -34,6 +35,7 @@ def strip_extension(filename):
|
||||
|
||||
return filename
|
||||
|
||||
|
||||
# extract platform from package name
|
||||
def get_platform(filename):
|
||||
# name is blender-version-platform.extension. we want to get the
|
||||
@@ -114,4 +116,3 @@ try:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to remove old packages: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
|
@@ -25,6 +25,7 @@ import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
|
||||
# find release directory
|
||||
def find_release_directory():
|
||||
for d in os.listdir('.'):
|
||||
@@ -84,4 +85,3 @@ try:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
|
Reference in New Issue
Block a user