Buildbot:
* Use rsync upload for Mac slave, rather than uploading entire file. This could be enabled for more slaves, should make more frequent builds possible. * Split Mac into 10.6 and 10.5 builds.
This commit is contained in:
@@ -77,17 +77,18 @@ def svn_step(branch=''):
|
|||||||
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 rsync_step(file_from, file_to):
|
def rsync_step(id, branch, rsync_script):
|
||||||
return ShellCommand(name='rsync', command=['rsync', '-v', '-P', file_from, 'brecht@builder.blender.org:/data/buildbot-master/' + file_to], haltOnFailure=True, description=['rsync'])
|
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
|
||||||
|
|
||||||
# generic builder
|
# generic builder
|
||||||
|
|
||||||
|
|
||||||
def generic_builder(id, libdir='', branch='', rsync=False):
|
def generic_builder(id, libdir='', branch='', rsync=False):
|
||||||
filename = 'buildbot_upload_' + id + '.zip'
|
filename = 'uploaded/buildbot_upload_' + id + '.zip'
|
||||||
compile_script = '../blender/build_files/buildbot/slave_compile.py'
|
compile_script = '../blender/build_files/buildbot/slave_compile.py'
|
||||||
test_script = '../blender/build_files/buildbot/slave_test.py'
|
test_script = '../blender/build_files/buildbot/slave_test.py'
|
||||||
pack_script = '../blender/build_files/buildbot/slave_pack.py'
|
pack_script = '../blender/build_files/buildbot/slave_pack.py'
|
||||||
|
rsync_script = '../blender/build_files/buildbot/slave_rsync.py'
|
||||||
unpack_script = 'master_unpack.py'
|
unpack_script = 'master_unpack.py'
|
||||||
|
|
||||||
f = BuildFactory()
|
f = BuildFactory()
|
||||||
@@ -95,11 +96,11 @@ def generic_builder(id, libdir='', branch='', rsync=False):
|
|||||||
if libdir != '':
|
if libdir != '':
|
||||||
f.addStep(lib_svn_step(libdir))
|
f.addStep(lib_svn_step(libdir))
|
||||||
|
|
||||||
f.addStep(Compile(command=['python', compile_script, id]))
|
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
|
||||||
f.addStep(Test(command=['python', test_script, id]))
|
f.addStep(Test(command=['python', test_script, id]))
|
||||||
f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
|
f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
|
||||||
if rsync:
|
if rsync:
|
||||||
f.addStep(rsync_step('../install/buildbot_upload.zip', filename))
|
f.addStep(rsync_step(id, branch, rsync_script))
|
||||||
elif id.find('cmake') != -1:
|
elif id.find('cmake') != -1:
|
||||||
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))
|
||||||
else:
|
else:
|
||||||
@@ -109,7 +110,8 @@ def generic_builder(id, libdir='', branch='', rsync=False):
|
|||||||
|
|
||||||
# builders
|
# builders
|
||||||
|
|
||||||
add_builder(c, 'mac_x86_64_scons', '', generic_builder)
|
add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder, '', True)
|
||||||
|
add_builder(c, 'mac_x86_64_10_5_scons', '', generic_builder, '', True)
|
||||||
#add_builder(c, 'salad_mac_x86_64_scons', 'darwin-9.x.universal', generic_builder, 'soc-2011-salad')
|
#add_builder(c, 'salad_mac_x86_64_scons', 'darwin-9.x.universal', generic_builder, 'soc-2011-salad')
|
||||||
add_builder(c, 'mac_i386_scons', 'darwin-9.x.universal', generic_builder)
|
add_builder(c, 'mac_i386_scons', 'darwin-9.x.universal', generic_builder)
|
||||||
add_builder(c, 'mac_ppc_scons', 'darwin-9.x.universal', generic_builder)
|
add_builder(c, 'mac_ppc_scons', 'darwin-9.x.universal', generic_builder)
|
||||||
|
45
build_files/buildbot/slave_rsync.py
Normal file
45
build_files/buildbot/slave_rsync.py
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ##### END GPL LICENSE BLOCK #####
|
||||||
|
|
||||||
|
# <pep8 compliant>
|
||||||
|
|
||||||
|
# Runs on buildbot slave, rsync zip directly to buildbot server rather
|
||||||
|
# than using upload which is much slower
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# get builder name
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
sys.stderr.write("Not enough arguments, expecting builder name\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
builder = sys.argv[1]
|
||||||
|
|
||||||
|
# rsync, this assumes ssh keys are setup so no password is needed
|
||||||
|
local_zip = "buildbot_upload.zip"
|
||||||
|
remote_folder = "builder.blender.org:/data/buildbot-master/uploaded/"
|
||||||
|
remote_zip = remote_folder + "buildbot_upload_" + builder + ".zip"
|
||||||
|
command = "rsync -avz %s %s" % (local_zip, remote_zip)
|
||||||
|
|
||||||
|
print(command)
|
||||||
|
|
||||||
|
ret = os.system(command)
|
||||||
|
sys.exit(ret)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user