Additional fixes
This commit is contained in:
40
master.cfg
40
master.cfg
@@ -74,8 +74,15 @@ def schedule_force_build(name):
|
|||||||
codebase="blender",
|
codebase="blender",
|
||||||
branch=forcesched.StringParameter(
|
branch=forcesched.StringParameter(
|
||||||
name="branch",
|
name="branch",
|
||||||
|
label="Branch:",
|
||||||
default="master"),
|
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(
|
repository=forcesched.FixedParameter(
|
||||||
name="repository",
|
name="repository",
|
||||||
default="",
|
default="",
|
||||||
@@ -169,20 +176,9 @@ def git_step(branch=''):
|
|||||||
submodules=True)
|
submodules=True)
|
||||||
|
|
||||||
|
|
||||||
def lib_svn_step(dir):
|
def rsync_step(python_command, id, branch, rsync_script):
|
||||||
# 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):
|
|
||||||
return ShellCommand(name='rsync',
|
return ShellCommand(name='rsync',
|
||||||
command=['python3', rsync_script, id, branch],
|
command=[python_command, rsync_script, id, branch],
|
||||||
description='uploading',
|
description='uploading',
|
||||||
descriptionDone='uploaded',
|
descriptionDone='uploaded',
|
||||||
workdir='install')
|
workdir='install')
|
||||||
@@ -200,8 +196,10 @@ def generic_builder(id, branch='', rsync=False):
|
|||||||
unpack_script = 'master_unpack.py'
|
unpack_script = 'master_unpack.py'
|
||||||
|
|
||||||
f = BuildFactory()
|
f = BuildFactory()
|
||||||
|
if id.startswith('win'):
|
||||||
f.addStep(lib_svn_step('tests'))
|
python_command = 'python'
|
||||||
|
else:
|
||||||
|
python_command = 'python3'
|
||||||
|
|
||||||
f.addStep(git_step(branch))
|
f.addStep(git_step(branch))
|
||||||
|
|
||||||
@@ -209,23 +207,23 @@ def generic_builder(id, branch='', rsync=False):
|
|||||||
|
|
||||||
f.addStep(ShellCommand(
|
f.addStep(ShellCommand(
|
||||||
name='submodules and libraries update',
|
name='submodules and libraries update',
|
||||||
command=['python3', update_script, id, git_branch],
|
command=[python_command, update_script, id, git_branch],
|
||||||
description='updating',
|
description='updating',
|
||||||
descriptionDone='updated'))
|
descriptionDone='updated'))
|
||||||
|
|
||||||
f.addStep(Compile(
|
f.addStep(Compile(
|
||||||
command=['python3', compile_script, id, git_branch],
|
command=[python_command, compile_script, id, git_branch],
|
||||||
timeout=3600))
|
timeout=3600))
|
||||||
f.addStep(Test(
|
f.addStep(Test(
|
||||||
command=['python3', test_script, id, git_branch]))
|
command=[python_command, test_script, id, git_branch]))
|
||||||
f.addStep(ShellCommand(
|
f.addStep(ShellCommand(
|
||||||
name='package',
|
name='package',
|
||||||
command=['python3', pack_script, id, git_branch],
|
command=[python_command, pack_script, id, git_branch],
|
||||||
description='packaging',
|
description='packaging',
|
||||||
descriptionDone='packaged'))
|
descriptionDone='packaged'))
|
||||||
|
|
||||||
if rsync:
|
if rsync:
|
||||||
f.addStep(rsync_step(id, git_branch, rsync_script))
|
f.addStep(rsync_step(python_command, id, git_branch, rsync_script))
|
||||||
else:
|
else:
|
||||||
f.addStep(FileUpload(name='upload',
|
f.addStep(FileUpload(name='upload',
|
||||||
workersrc='buildbot_upload.zip',
|
workersrc='buildbot_upload.zip',
|
||||||
|
@@ -35,11 +35,6 @@ class Package:
|
|||||||
self.platform = self._get_platform(self.filename)
|
self.platform = self._get_platform(self.filename)
|
||||||
self.branch = self._get_branch(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
|
# extension stripping
|
||||||
def _strip_extension(self, filename):
|
def _strip_extension(self, filename):
|
||||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||||
@@ -101,7 +96,7 @@ def get_download_dir(branch):
|
|||||||
elif branch == 'experimental-build':
|
elif branch == 'experimental-build':
|
||||||
directory = os.path.join(download_prefix, "experimental")
|
directory = os.path.join(download_prefix, "experimental")
|
||||||
else:
|
else:
|
||||||
directory = os.path.join(download_prefix, "branches", branch)
|
directory = os.path.join(download_prefix, branch)
|
||||||
os.makedirs(directory, exist_ok=True)
|
os.makedirs(directory, exist_ok=True)
|
||||||
|
|
||||||
return directory
|
return directory
|
||||||
@@ -130,6 +125,12 @@ def get_branch_platform(packages):
|
|||||||
# Extract branch and platform names
|
# Extract branch and platform names
|
||||||
branch = packages[0].branch
|
branch = packages[0].branch
|
||||||
platform = packages[0].platform
|
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:
|
for package in packages:
|
||||||
if package.branch != branch or package.platform != platform:
|
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')
|
sys.stderr.write('All packages in the zip file must have the same branch and platform\n')
|
||||||
|
Reference in New Issue
Block a user