Put latest buildbot config files to git
This commit is contained in:
parent
75f518ccb9
commit
67766f7715
|
@ -3,6 +3,12 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
|
||||
|
||||
# List of the branches available for force build
|
||||
FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
|
||||
|
||||
"""
|
||||
Stock Twisted directory lister doesn't provide any information about last file
|
||||
modification time, we hack the class a bit in order to have such functionaliity
|
||||
|
@ -11,7 +17,6 @@ modification time, we hack the class a bit in order to have such functionaliity
|
|||
|
||||
from buildbot.status.web.base import DirectoryLister
|
||||
|
||||
|
||||
def get_files_and_directories(self, directory):
|
||||
from twisted.web.static import (getTypeAndEncoding,
|
||||
formatFileSize)
|
||||
|
@ -113,7 +118,7 @@ def schedule_force_build(name):
|
|||
codebases=[forcesched.CodebaseParameter(
|
||||
codebase="blender",
|
||||
branch=forcesched.ChoiceStringParameter(
|
||||
name="branch", choices=["master", "experimental-build"], default="master"),
|
||||
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
|
||||
# Do not hide revision, can be handy!
|
||||
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True)),
|
||||
|
@ -127,18 +132,22 @@ def schedule_force_build(name):
|
|||
|
||||
|
||||
def schedule_build(name, hour, minute=0):
|
||||
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": ""},
|
||||
"blender-addons": {"repository": ""},
|
||||
"blender-addons-contrib": {"repository": ""},
|
||||
"scons": {"repository": ""},
|
||||
"lib svn": {"repository": ""}},
|
||||
branch=None,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
for current_branch in NIGHT_SCHEDULE_BRANCHES:
|
||||
scheduler_name = "nightly " + name
|
||||
if current_branch:
|
||||
scheduler_name += ' ' + current_branch
|
||||
c['schedulers'].append(timed.Nightly(name=scheduler_name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": "", "branch": "master"},
|
||||
"blender-addons": {"repository": "", "branch": "master"},
|
||||
"blender-addons-contrib": {"repository": "", "branch": "master"},
|
||||
"scons": {"repository": "", "branch": "master"},
|
||||
"lib svn": {"repository": "", "branch": "master"}},
|
||||
branch=current_branch,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
|
||||
|
||||
# BUILDERS
|
||||
|
@ -295,6 +304,8 @@ add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
|
|||
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
|
||||
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
|
||||
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
|
||||
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
|
||||
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
|
||||
|
|
|
@ -30,12 +30,12 @@ import zipfile
|
|||
# extension stripping
|
||||
def strip_extension(filename):
|
||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||
filename_noext, ext = os.path.splitext(filename)
|
||||
if ext in extensions:
|
||||
return strip_extension(filename_noext) # may have .tar.bz2
|
||||
else:
|
||||
return filename
|
||||
|
||||
for ext in extensions:
|
||||
if filename.endswith(ext):
|
||||
filename = filename[:-len(ext)]
|
||||
|
||||
return filename
|
||||
|
||||
# extract platform from package name
|
||||
def get_platform(filename):
|
||||
|
@ -48,12 +48,11 @@ def get_platform(filename):
|
|||
tokens = filename.split("-")
|
||||
platforms = ('osx', 'mac', 'bsd',
|
||||
'win', 'linux', 'source',
|
||||
'solaris',
|
||||
'mingw')
|
||||
'irix', 'solaris', 'mingw')
|
||||
platform_tokens = []
|
||||
found = False
|
||||
|
||||
for token in tokens:
|
||||
for i, token in enumerate(tokens):
|
||||
if not found:
|
||||
for platform in platforms:
|
||||
if platform in token.lower():
|
||||
|
@ -65,11 +64,10 @@ def get_platform(filename):
|
|||
|
||||
return '-'.join(platform_tokens)
|
||||
|
||||
|
||||
def get_branch(filename):
|
||||
tokens = filename.split("-")
|
||||
branch = ""
|
||||
|
||||
|
||||
for token in tokens:
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
@ -112,16 +110,16 @@ branch = get_branch(packagename)
|
|||
|
||||
if platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % packagename)
|
||||
'from package: %r\n' % packagename)
|
||||
sys.exit(1)
|
||||
|
||||
# extract
|
||||
directory = 'public_html/download'
|
||||
if not branch or branch == 'master':
|
||||
directory = 'public_html/download'
|
||||
elif branch == 'experimental-build':
|
||||
directory = 'public_html/download/experimental'
|
||||
# else: put 'official' branches in their own public subdir of download/ ?
|
||||
else:
|
||||
directory = 'public_html/download'
|
||||
|
||||
try:
|
||||
zf = z.open(package)
|
||||
|
@ -131,8 +129,6 @@ try:
|
|||
|
||||
zf.close()
|
||||
z.close()
|
||||
|
||||
os.remove(filename)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Reference in New Issue