use spaces rather then tabs + minor pep8 edits.
This commit is contained in:
@@ -50,6 +50,7 @@ from buildbot.config import BuilderConfig
|
|||||||
c['builders'] = []
|
c['builders'] = []
|
||||||
buildernames = []
|
buildernames = []
|
||||||
|
|
||||||
|
|
||||||
def add_builder(c, name, factory):
|
def add_builder(c, name, factory):
|
||||||
slavenames = []
|
slavenames = []
|
||||||
|
|
||||||
@@ -63,23 +64,30 @@ def add_builder(c, name, factory):
|
|||||||
|
|
||||||
# common steps
|
# common steps
|
||||||
|
|
||||||
|
|
||||||
def svn_step():
|
def svn_step():
|
||||||
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
|
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
|
||||||
|
|
||||||
|
|
||||||
def lib_svn_step(dir):
|
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)
|
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():
|
def cmake_compile_step():
|
||||||
return Compile(command=['make'], workdir='blender')
|
return Compile(command=['make'], workdir='blender')
|
||||||
|
|
||||||
|
|
||||||
def cmake_test_step():
|
def cmake_test_step():
|
||||||
return Test(workdir='blender') # make test
|
return Test(workdir='blender') # make test
|
||||||
|
|
||||||
|
|
||||||
def scons_compile_step():
|
def scons_compile_step():
|
||||||
return Compile(command=['python', 'scons/scons.py'], workdir='blender')
|
return Compile(command=['python', 'scons/scons.py'], workdir='blender')
|
||||||
|
|
||||||
|
|
||||||
class SlavePack(ShellCommand):
|
class SlavePack(ShellCommand):
|
||||||
pack_script = 'slave_pack.py'
|
pack_script = 'slave_pack.py'
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if self.getProperty('buildername').find('scons') >= 0:
|
if self.getProperty('buildername').find('scons') >= 0:
|
||||||
self.setCommand(['python', pack_script, 'scons'])
|
self.setCommand(['python', pack_script, 'scons'])
|
||||||
@@ -87,6 +95,7 @@ class SlavePack(ShellCommand):
|
|||||||
self.setCommand(['python', pack_script, 'cmake'])
|
self.setCommand(['python', pack_script, 'cmake'])
|
||||||
ShellCommand.start(self)
|
ShellCommand.start(self)
|
||||||
|
|
||||||
|
|
||||||
def file_upload(f, id):
|
def file_upload(f, id):
|
||||||
filename = 'buildbot_upload_' + id + '.zip'
|
filename = 'buildbot_upload_' + id + '.zip'
|
||||||
pack_script = 'slave_pack.py'
|
pack_script = 'slave_pack.py'
|
||||||
@@ -99,6 +108,7 @@ def file_upload(f, id):
|
|||||||
|
|
||||||
# linux cmake
|
# linux cmake
|
||||||
|
|
||||||
|
|
||||||
def linux_cmake(id):
|
def linux_cmake(id):
|
||||||
f = BuildFactory()
|
f = BuildFactory()
|
||||||
f.addStep(svn_step())
|
f.addStep(svn_step())
|
||||||
@@ -111,6 +121,7 @@ add_builder(c, 'linux_x86_64_cmake', linux_cmake)
|
|||||||
|
|
||||||
# mac cmake
|
# mac cmake
|
||||||
|
|
||||||
|
|
||||||
def mac_cmake(id):
|
def mac_cmake(id):
|
||||||
f = BuildFactory()
|
f = BuildFactory()
|
||||||
f.addStep(svn_step())
|
f.addStep(svn_step())
|
||||||
@@ -124,6 +135,7 @@ add_builder(c, 'mac_x86_64_cmake', mac_cmake)
|
|||||||
|
|
||||||
# win32 scons
|
# win32 scons
|
||||||
|
|
||||||
|
|
||||||
# TODO: add scons test target
|
# TODO: add scons test target
|
||||||
def win32_scons(id):
|
def win32_scons(id):
|
||||||
f = BuildFactory()
|
f = BuildFactory()
|
||||||
@@ -200,4 +212,3 @@ c['buildbotURL'] = "http://builder.blender.org/"
|
|||||||
# installations.
|
# installations.
|
||||||
|
|
||||||
c['db_url'] = "sqlite:///state.sqlite"
|
c['db_url'] = "sqlite:///state.sqlite"
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@ import shutil
|
|||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
|
|
||||||
# extension stripping
|
# extension stripping
|
||||||
def strip_extension(filename):
|
def strip_extension(filename):
|
||||||
extensions = ['.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe']
|
extensions = ['.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe']
|
||||||
@@ -34,6 +35,7 @@ def strip_extension(filename):
|
|||||||
|
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
||||||
# extract platform from package name
|
# extract platform from package name
|
||||||
def get_platform(filename):
|
def get_platform(filename):
|
||||||
# name is blender-version-platform.extension. we want to get the
|
# name is blender-version-platform.extension. we want to get the
|
||||||
@@ -114,4 +116,3 @@ try:
|
|||||||
except Exception, ex:
|
except Exception, ex:
|
||||||
sys.stderr.write('Failed to remove old packages: ' + str(ex) + '\n')
|
sys.stderr.write('Failed to remove old packages: ' + str(ex) + '\n')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
|
|
||||||
# find release directory
|
# find release directory
|
||||||
def find_release_directory():
|
def find_release_directory():
|
||||||
for d in os.listdir('.'):
|
for d in os.listdir('.'):
|
||||||
@@ -84,4 +85,3 @@ try:
|
|||||||
except Exception, ex:
|
except Exception, ex:
|
||||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user