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,23 +64,30 @@ 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:
|
||||
self.setCommand(['python', pack_script, 'scons'])
|
||||
@@ -87,6 +95,7 @@ class SlavePack(ShellCommand):
|
||||
self.setCommand(['python', pack_script, 'cmake'])
|
||||
ShellCommand.start(self)
|
||||
|
||||
|
||||
def file_upload(f, id):
|
||||
filename = 'buildbot_upload_' + id + '.zip'
|
||||
pack_script = 'slave_pack.py'
|
||||
@@ -99,6 +108,7 @@ def file_upload(f, id):
|
||||
|
||||
# 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()
|
||||
@@ -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