Additional fixes
This commit is contained in:
40
master.cfg
40
master.cfg
@@ -74,8 +74,15 @@ def schedule_force_build(name):
|
||||
codebase="blender",
|
||||
branch=forcesched.StringParameter(
|
||||
name="branch",
|
||||
label="Branch:",
|
||||
default="master"),
|
||||
# Do not hide revision, can be handy!
|
||||
# Hide revision. We don't want to allow anyone to overwrite the
|
||||
# master build with an older version. Could be added back once we
|
||||
# have authentication.
|
||||
revision=forcesched.FixedParameter(
|
||||
name="revision",
|
||||
default="",
|
||||
hide=True),
|
||||
repository=forcesched.FixedParameter(
|
||||
name="repository",
|
||||
default="",
|
||||
@@ -169,20 +176,9 @@ def git_step(branch=''):
|
||||
submodules=True)
|
||||
|
||||
|
||||
def lib_svn_step(dir):
|
||||
# TODO(sergey): For some reason interpolation is always giving empty branch.
|
||||
# lib_repo = 'https://svn.blender.org/svnroot/bf-blender/%(src::branch)s/lib/'
|
||||
lib_repo = 'https://svn.blender.org/svnroot/bf-blender/trunk/lib/'
|
||||
return steps.SVN(name='lib svn ' + dir,
|
||||
repourl=util.Interpolate(lib_repo + dir),
|
||||
codebase='lib svn',
|
||||
mode='incremental',
|
||||
workdir='lib/' + dir)
|
||||
|
||||
|
||||
def rsync_step(id, branch, rsync_script):
|
||||
def rsync_step(python_command, id, branch, rsync_script):
|
||||
return ShellCommand(name='rsync',
|
||||
command=['python3', rsync_script, id, branch],
|
||||
command=[python_command, rsync_script, id, branch],
|
||||
description='uploading',
|
||||
descriptionDone='uploaded',
|
||||
workdir='install')
|
||||
@@ -200,8 +196,10 @@ def generic_builder(id, branch='', rsync=False):
|
||||
unpack_script = 'master_unpack.py'
|
||||
|
||||
f = BuildFactory()
|
||||
|
||||
f.addStep(lib_svn_step('tests'))
|
||||
if id.startswith('win'):
|
||||
python_command = 'python'
|
||||
else:
|
||||
python_command = 'python3'
|
||||
|
||||
f.addStep(git_step(branch))
|
||||
|
||||
@@ -209,23 +207,23 @@ def generic_builder(id, branch='', rsync=False):
|
||||
|
||||
f.addStep(ShellCommand(
|
||||
name='submodules and libraries update',
|
||||
command=['python3', update_script, id, git_branch],
|
||||
command=[python_command, update_script, id, git_branch],
|
||||
description='updating',
|
||||
descriptionDone='updated'))
|
||||
|
||||
f.addStep(Compile(
|
||||
command=['python3', compile_script, id, git_branch],
|
||||
command=[python_command, compile_script, id, git_branch],
|
||||
timeout=3600))
|
||||
f.addStep(Test(
|
||||
command=['python3', test_script, id, git_branch]))
|
||||
command=[python_command, test_script, id, git_branch]))
|
||||
f.addStep(ShellCommand(
|
||||
name='package',
|
||||
command=['python3', pack_script, id, git_branch],
|
||||
command=[python_command, pack_script, id, git_branch],
|
||||
description='packaging',
|
||||
descriptionDone='packaged'))
|
||||
|
||||
if rsync:
|
||||
f.addStep(rsync_step(id, git_branch, rsync_script))
|
||||
f.addStep(rsync_step(python_command, id, git_branch, rsync_script))
|
||||
else:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
workersrc='buildbot_upload.zip',
|
||||
|
@@ -35,11 +35,6 @@ class Package:
|
||||
self.platform = self._get_platform(self.filename)
|
||||
self.branch = self._get_branch(self.filename)
|
||||
|
||||
if self.platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % self.filename)
|
||||
sys.exit(1)
|
||||
|
||||
# extension stripping
|
||||
def _strip_extension(self, filename):
|
||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||
@@ -101,7 +96,7 @@ def get_download_dir(branch):
|
||||
elif branch == 'experimental-build':
|
||||
directory = os.path.join(download_prefix, "experimental")
|
||||
else:
|
||||
directory = os.path.join(download_prefix, "branches", branch)
|
||||
directory = os.path.join(download_prefix, branch)
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
|
||||
return directory
|
||||
@@ -130,6 +125,12 @@ def get_branch_platform(packages):
|
||||
# Extract branch and platform names
|
||||
branch = packages[0].branch
|
||||
platform = packages[0].platform
|
||||
|
||||
if platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % packages[0].filename)
|
||||
sys.exit(1)
|
||||
|
||||
for package in packages:
|
||||
if package.branch != branch or package.platform != platform:
|
||||
sys.stderr.write('All packages in the zip file must have the same branch and platform\n')
|
||||
|
Reference in New Issue
Block a user