Skip to content

Commit

Permalink
New master.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlijnWajer committed Jan 23, 2015
1 parent beae4c3 commit 1d44dee
Showing 1 changed file with 140 additions and 30 deletions.
170 changes: 140 additions & 30 deletions autobuild/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,89 @@ c['slavePortnum'] = 9989

simba_branches = {
'master' : {
'fpc' : '2.6.1',
'lazarus': '1.0.4',
#'fpc' : '2.7.1',
#'lazarus': '1.2.6',
#'build' : 'make',
#'platforms' : ('i386-win32',), # x86_64-linux, i386-linux
'fpc' : '2.6.4',
'lazarus': '1.2.6-fpc-2.6.4',
#'lazarus': '1.0.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64') # x86_64-linux, i386-linux
'platforms' : ('i386-win32', 'x86_64-win64'),#, 'x86_64-linux'),#, i386-linux
'libmml' : True,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'master'
},
'simba-next' : {
'fpc' : '2.6.1',
'lazarus': '1.0.4',
'fpc' : '2.6.4',
'lazarus': '1.2.6-fpc-2.6.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64') # x86_64-linux, i386-linux
'platforms' : ('i386-win32', 'x86_64-win64'),#, 'x86_64-linux'),#, i386-linux
'libmml' : True,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'simba-next'
},
'simba-prev' : {
'fpc' : '2.4.4',
'lazarus': '',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64', 'x86_64-linux', \
'i386-linux')
}
'i386-linux'),
'libmml' : False,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'simba-prev'
},
'lape-tmb' : {
'fpc' : '2.6.1',
'lazarus': '1.0.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64'), # x86_64-linux, i386-linux
'libmml' : False,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'lape-tmb'
},
'codecompletion-test' : {
#'fpc' : '2.4.4',
#'lazarus': '',
#'build' : 'make',
#'platforms' : ('i386-win32', 'x86_64-win64', 'x86_64-linux', \
# 'i386-linux')
'fpc' : '2.6.1',
'lazarus': '1.0.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64'), # x86_64-linux, i386-linux
'libmml' : True,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'codecompletion-test'
},
'olly-dbg' : {
#'fpc' : '2.4.4',
#'lazarus': '',
#'build' : 'make',
#'platforms' : ('i386-win32', 'x86_64-win64', 'x86_64-linux', \
# 'i386-linux')
'fpc' : '2.6.1',
'lazarus': '1.0.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64'), # x86_64-linux, i386-linux
'libmml' : True,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'olly-dbg'
},
'directx-tests' : {
#'fpc' : '2.4.4',
#'lazarus': '',
#'build' : 'make',
#'platforms' : ('i386-win32', 'x86_64-win64', 'x86_64-linux', \
# 'i386-linux')
'fpc' : '2.6.1',
'lazarus': '1.0.4',
'build' : 'make',
'platforms' : ('i386-win32', 'x86_64-win64'), # x86_64-linux, i386-linux
'libmml' : True,
'git' : 'git://github.com/MerlijnWajer/Simba.git',
'branch' : 'directx-tests'
},
}

arch_map = {
Expand All @@ -71,8 +136,6 @@ copypathsps = '/srv/buildbot/copysps.sh'
isspath = '/srv/buildbot/iss.sh'


#simba_branches = ('master', 'simba-next', 'simba-prev', 'ocr-fixes')

####### CHANGESOURCES

# the 'change_source' setting tells the buildmaster how it should find out
Expand All @@ -81,19 +144,26 @@ isspath = '/srv/buildbot/iss.sh'
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []

c['change_source'].append(GitPoller(
'git://github.com/MerlijnWajer/Simba.git',
workdir='gitpoller-workdir-master', branch='master',
pollinterval=120))
c['change_source'].append(GitPoller(
'git://github.com/MerlijnWajer/Simba.git',
workdir='gitpoller-workdir-simba-prev', branch='simba-prev',
pollinterval=120))
c['change_source'].append(GitPoller(
'git://github.com/MerlijnWajer/Simba.git',
workdir='gitpoller-workdir-simba-next', branch='simba-next',
for k, v in simba_branches.iteritems():
branch = v['branch']
c['change_source'].append(GitPoller(
v['git'],
workdir='gitpoller-workdir-%s' % k, branch=k,
pollinterval=120))

#c['change_source'].append(GitPoller(
# 'git://github.com/MerlijnWajer/Simba.git',
# workdir='gitpoller-workdir-master', branch='master',
# pollinterval=120))
#c['change_source'].append(GitPoller(
# 'git://github.com/MerlijnWajer/Simba.git',
# workdir='gitpoller-workdir-simba-prev', branch='simba-prev',
# pollinterval=120))
#c['change_source'].append(GitPoller(
# 'git://github.com/MerlijnWajer/Simba.git',
# workdir='gitpoller-workdir-simba-next', branch='simba-next',
# pollinterval=120))

if sps:
c['change_source'].append(GitPoller(
'git://github.com/SRL/SPS.git',
Expand All @@ -109,10 +179,11 @@ from buildbot.changes.gitpoller import GitPoller
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.changes import filter
c['schedulers'] = []
for _branch in simba_branches:
for _name, dat in simba_branches.iteritems():
_branch = dat['branch']
c['schedulers'].append(
SingleBranchScheduler(
name=_branch,
name=_name,
change_filter=filter.ChangeFilter(branch=_branch),
treeStableTimer=None,
builderNames=[_branch]
Expand Down Expand Up @@ -142,14 +213,18 @@ def simba_branch_build_factory(_branch, data):
# Clean (AND BUILD!)
# XXX: Set lazpath, path, etc here.
if data['lazarus'] != '':
lp = 'LAZARUS_PATH=%s-%s-%s' % (laz_base_path, data['lazarus'], \
lpdir = '%s-%s-%s' % (laz_base_path, data['lazarus'], \
arch_map[arch])
else:
lp = 'LAZARUS_PATH=%s' % laz_base_path
lpdir = '%s' % laz_base_path

lp = 'LAZARUS_PATH=%s' % lpdir

ppc = 'FPC_PATH=%s-%s/lib/fpc/%s/%s' % (ppc_base_path, data['fpc'],
ppc_path="%s-%s/lib/fpc/%s/%s" % (ppc_base_path, data['fpc'],
data['fpc'], arch_comp[arch])

ppc = 'FPC_PATH=%s' % ppc_path

bf.addStep(ShellCommand(command=["make", "-C", "Projects/Simba", \
lp, ppc, "clean", arch, "distrib=1"]))

Expand All @@ -161,9 +236,28 @@ def simba_branch_build_factory(_branch, data):
# TODO: Removed for now.
#bf.addStep(ShellCommand(command=["make", "-C", "Projects/OCRTool", \
# lazpath, "clean", arch]))

if data['libmml']:
_laz = ('-' if data['lazarus'] else '') + data['lazarus']
bf.addStep(ShellCommand(command=["%s" %
('%s/lazbuild' % lpdir),
"Projects/libmml/mml.lpr", '--lazarusdir=%s' % lpdir,
"--cpu=%s" %
arch.split('-')[0], '--ws=%s' % ('win32' if 'win' in arch else
'gtk2'),
'--os=%s' % arch.split('-')[1],
'--compiler=%s' % ppc_path, "-d", "-B"]))

soext = '.dll' if 'win' in arch else '.so'
bf.addStep(ShellCommand(command=["strip", "--strip-all",
"Projects/libmml/mml%s" % soext]))
bf.addStep(ShellCommand(command=["mv", "Projects/libmml/mml%s" %
soext, "Projects/libmml/libmml.%s" % arch + soext]))

bf.addStep(ShellCommand(command=["bash", copypath, \
buildpath % _branch, _branch]))


return bf

####### BUILDERS
Expand All @@ -182,22 +276,38 @@ for _branch, data in simba_branches.iteritems():
fact[_branch] = simba_branch_build_factory(_branch, data)

if sps:
data['fpc'] = '2.6.1'
bf = BuildFactory()
bf.addStep(Git(repourl='git://github.com/SRL/SPS.git',
mode='copy', branch='master', submodules=True))

for arch in ('x86_64-linux', 'i386-linux', 'x86_64-win64', 'i386-win32'):
bf.addStep(ShellCommand(command=["make", "-C", "plugin/source", lazpath, "clean", arch]))
for arch in data['platforms']:
if data['lazarus'] != '':
lpdir = '%s-%s-%s' % (laz_base_path, data['lazarus'], \
arch_map[arch])
else:
lpdir = '%s' % laz_base_path

lp = 'LAZARUS_PATH=%s' % lpdir

ppc_path="%s-%s/lib/fpc/%s/%s" % (ppc_base_path, data['fpc'],
data['fpc'], arch_comp[arch])

ppc = 'FPC_PATH=%s' % ppc_path
bf.addStep(ShellCommand(command=["make", "-C", "plugin/source", lp, ppc, "clean", arch]))
bf.addStep(ShellCommand(command=["bash", copypathsps, buildpath % 'sps', 'master']))

#for arch in ('x86_64-linux', 'i386-linux', 'x86_64-win64', 'i386-win32'):

fact['sps'] = bf

from buildbot.config import BuilderConfig

c['builders'] = []
for _branch in simba_branches:
for _name, dat in simba_branches.iteritems():
_branch = dat['branch']
c['builders'].append(
BuilderConfig(name=_branch,
BuilderConfig(name=_name,
slavenames=["simba-slave"],
factory=fact[_branch])
)
Expand Down

0 comments on commit 1d44dee

Please sign in to comment.