[llvm-commits] [zorg] r124265 - in /zorg/trunk/buildbot/llvmlab: ./ master/ master/Makefile master/buildbot.tac master/config/ master/config/__init__.py master/config/builders.py master/config/local.cfg master/config/schedulers.py master/config/slaves.py master/config/status.py master/master.cfg master/org.llvm.lab.master.plist master/state.sqlite
David Dean
david_dean at apple.com
Tue Jan 25 17:26:48 PST 2011
Author: ddean
Date: Tue Jan 25 19:26:48 2011
New Revision: 124265
URL: http://llvm.org/viewvc/llvm-project?rev=124265&view=rev
Log:
add initial lab.llvm.org buildbot master configuration
Added:
zorg/trunk/buildbot/llvmlab/
zorg/trunk/buildbot/llvmlab/master/
zorg/trunk/buildbot/llvmlab/master/Makefile
zorg/trunk/buildbot/llvmlab/master/buildbot.tac
zorg/trunk/buildbot/llvmlab/master/config/
zorg/trunk/buildbot/llvmlab/master/config/__init__.py
zorg/trunk/buildbot/llvmlab/master/config/builders.py
zorg/trunk/buildbot/llvmlab/master/config/local.cfg
zorg/trunk/buildbot/llvmlab/master/config/schedulers.py
zorg/trunk/buildbot/llvmlab/master/config/slaves.py
zorg/trunk/buildbot/llvmlab/master/config/status.py
zorg/trunk/buildbot/llvmlab/master/master.cfg
zorg/trunk/buildbot/llvmlab/master/org.llvm.lab.master.plist
zorg/trunk/buildbot/llvmlab/master/state.sqlite (with props)
Added: zorg/trunk/buildbot/llvmlab/master/Makefile
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/Makefile?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/Makefile (added)
+++ zorg/trunk/buildbot/llvmlab/master/Makefile Tue Jan 25 19:26:48 2011
@@ -0,0 +1,34 @@
+# -*- makefile -*-
+
+# This is a simple makefile which lives in a buildmaster/buildslave
+# directory (next to the buildbot.tac file). It allows you to start/stop the
+# master or slave in a launchd-friendly way by doing 'make start' or 'make stop'
+# and includes some other targets for convenience.
+
+ZORGROOT := $(shell pwd)/../../..
+
+start:
+ launchctl start org.llvm.smooshlab.master
+
+start-standalone:
+ env PYTHONPATH=$(ZORGROOT):$(ZORGROOT)/buildbot:"$$PYTHONPATH" /usr/bin/twistd \
+ --nodaemon \
+ --python=buildbot.tac \
+ --logfile=twistd.log \
+ --prefix=smooshlab
+
+# This stops the buildbot cleanly so launchd will not restart it, use
+# 'make start' to restart it correctly via launchctl
+stop:
+ buildbot stop .
+
+restart: stop start
+
+# Reloads the master.cfg and associated files.
+sighup:
+ buildbot sighup .
+
+reconfig: sighup
+
+checkconfig:
+ env PYTHONPATH=$(ZORGROOT):$(ZORGROOT)/buildbot:"$$PYTHONPATH" buildbot checkconfig
Added: zorg/trunk/buildbot/llvmlab/master/buildbot.tac
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/buildbot.tac?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/buildbot.tac (added)
+++ zorg/trunk/buildbot/llvmlab/master/buildbot.tac Tue Jan 25 19:26:48 2011
@@ -0,0 +1,12 @@
+# -*- Python -*-
+
+from twisted.application import service
+from buildbot.master import BuildMaster
+import os
+
+basedir = os.path.dirname(os.path.abspath(__file__))
+configfile = r'master.cfg'
+
+application = service.Application('buildmaster')
+BuildMaster(basedir, configfile).setServiceParent(application)
+
Added: zorg/trunk/buildbot/llvmlab/master/config/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/__init__.py?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/__init__.py (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/__init__.py Tue Jan 25 19:26:48 2011
@@ -0,0 +1,9 @@
+import builders
+import slaves
+import status
+
+# Load local options.
+import os
+import ConfigParser
+options = ConfigParser.RawConfigParser()
+options.read(os.path.join(os.path.dirname(__file__), 'local.cfg'))
Added: zorg/trunk/buildbot/llvmlab/master/config/builders.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/builders.py?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/builders.py (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/builders.py Tue Jan 25 19:26:48 2011
@@ -0,0 +1,553 @@
+import buildbot
+import buildbot.process.factory
+from buildbot.steps.shell import WithProperties
+from buildbot.steps.trigger import Trigger
+from buildbot.schedulers import basic, timed, triggerable
+from buildbot.steps import source
+from buildbot.steps.transfer import FileUpload, FileDownload
+
+def setProperty(f, new_property, new_value):
+ f.addStep(buildbot.steps.shell.SetProperty(
+ command=['echo', new_value],
+ property=new_property,
+ description=['set property', new_property],
+ workdir='.'))
+ return f
+
+def pullsrc(f, repo_name, URL, dir, pull_mode='clobber', def_branch='trunk'):
+ f.addStep(source.SVN(name='pull ' + repo_name,
+ mode=pull_mode,
+ baseURL=URL,
+ defaultBranch=def_branch, workdir=dir, always_purge='True'
+ ))
+ return f
+
+
+def pullClang(f):
+ pullsrc(f, 'clang', 'http://llvm.org/svn/llvm-project/cfe/', 'llvm/tools/clang', 'update')
+ return f
+
+def pullllvm(f):
+ pullsrc(f, 'llvm', 'http://llvm.org/svn/llvm-project/llvm/', 'llvm', 'update')
+ return f
+
+def pulltest_suite(f):
+ pullsrc(f, 'llvm tests', 'http://llvm.org/svn/llvm-project/test-suite/', 'test-suite', 'update')
+ return f
+
+def pullclang_tests(f):
+ pullsrc(f, 'clang tests', 'http://llvm.org/svn/llvm-project/clang-tests/', 'test-suite', 'update')
+ return f
+
+def pulllibcxx(f):
+ pullsrc(f, 'libc++', 'http://llvm.org/svn/llvm-project/libcxx/', 'libcxx')
+ return f
+
+def pullboostrunner(f):
+#alwaysUseLatest
+#pullsrc(f, 'boost runner', 'http://svn.boost.org/svn/boost/%%BRANCH%%/tools/regression/src/', 'boost_runner')
+ f.addStep(source.SVN(name='pull boost runner',
+ mode='clobber',
+ baseURL='http://svn.boost.org/svn/boost/%%BRANCH%%/tools/regression/src/',
+ defaultBranch='trunk', workdir='boost_runner', alwaysUseLatest='True',
+ ))
+ return f
+
+def getBuildDir(f):
+ f.addStep(buildbot.steps.shell.SetProperty(name='get_builddir',
+ command=['pwd'],
+ property='builddir',
+ description='set build dir',
+ workdir='.'))
+ return f
+
+def GetCompilerArtifacts(f):
+ if WithProperties('%(revision)s')=='None':
+ src_file = WithProperties('~/artifacts/%(use_builder)s/%(got_revision)s/%(use_compiler)s.tar.gz')
+ else:
+ src_file = WithProperties('~/artifacts/%(use_builder)s/%(revision)s/%(use_compiler)s.tar.gz')
+ f.addStep(FileDownload(mastersrc=src_file,
+ slavedest=WithProperties('%(builddir)s/%(use_compiler)s.tar.gz')
+ ))
+ #extract compiler artifacts used for this build
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='unzip',
+ command=['tar', '-zxvf', WithProperties('%(use_compiler)s.tar.gz'),],
+ haltOnFailure=True,
+ description=['extract', WithProperties('%(use_compiler)s')],
+ workdir='.',
+ ))
+ return f
+
+def cleanCompilerDir(f):
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ command=['rm', '-rf', WithProperties('%(use_compiler:-)s')],
+ haltOnFailure=False,
+ description=['rm dir', WithProperties('%(use_compiler:-)s')],
+ workdir='.',))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ command=['rm', '-rf', WithProperties('%(use_compiler:-)s.tar.gz')],
+ haltOnFailure=False,
+ description=['rm archive', WithProperties('%(use_compiler:-)s')],
+ workdir='.',))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ command=['rm', '-rf', WithProperties('%(compiler_built:-)s')],
+ haltOnFailure=False,
+ description=['rm dir', WithProperties('%(compiler_built:-)s')],
+ workdir='.',))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ command=['rm', '-rf', WithProperties('%(compiler_built:-)s.tar.gz')],
+ haltOnFailure=False,
+ description=['rm archive', WithProperties('%(compiler_built:-)s')],
+ workdir='.',))
+ return f
+
+def uploadArtifacts(f):
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='tar_and_zip',
+ command=['tar', 'czvf', WithProperties('%(compiler_built)s.tar.gz'),
+ WithProperties('./%(compiler_built)s/')],
+ haltOnFailure=True,
+ description=['tar', '&', 'zip'],
+ workdir='.',
+ ))
+ archive_src = WithProperties('%(builddir)s/%(compiler_built)s.tar.gz')
+ archive_dest = WithProperties('~/artifacts/%(buildername)s/%(got_revision)s/%(compiler_built)s.tar.gz')
+ f.addStep(FileUpload(slavesrc=archive_src, masterdest=archive_dest))
+ return f
+
+def regressionTests(f):
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='run_llvm_tests',
+ command=['make', '-j', WithProperties('%(jobs)s'),
+ ],
+ haltOnFailure=True,
+ description=['llvm', 'tests'],
+ env={'PATH': WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s/test')))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='run_clang_tests',
+ command=['make', '-j', WithProperties('%(jobs)s'),
+ ],
+ haltOnFailure=True,
+ description=['clang', 'tests'],
+ env={'PATH': WithProperties('%(builddir)s/%(compiler_built)s/%(compiler_type)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s/tools/clang/test')))
+ return f
+
+
+def createPhase1():
+ # create the factory
+ f = buildbot.process.factory.BuildFactory()
+ f = clangStage1(f)
+ f = uploadArtifacts(f)
+ f = regressionTests(f)
+ return f
+
+
+def clangStage1(f,config_options=''):
+ # Determine the build directory.
+ f = getBuildDir(f)
+ f = setProperty(f, 'compiler_built', 'stage1')
+ # clean out the directory used for the stage 1 compiler
+ #f = cleanCompilerDir(f)
+ # pull sources
+ f = pullllvm(f)
+ f = pullClang(f)
+ # do config/make
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='configure',
+ command=[
+ '../llvm/configure', '--enable-optimized', '--disable-bindings',
+ '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
+ ],
+ haltOnFailure=True,
+ description=['configure'],
+ workdir=WithProperties('%(compiler_built)s')))
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='make',
+ command=['make', '-j', WithProperties('%(jobs)s'),],
+ haltOnFailure=True,
+ description=['make'],
+ workdir=WithProperties('%(compiler_built)s')))
+ return f
+
+def clangHost(config_options):
+ # create the factory
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ f = getBuildDir(f)
+ f = setProperty(f, 'compiler_built', 'stage2')
+ f = setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ # clean out the directory/archives used for the stage 1 compiler
+ # clean out the directory used to build compiler
+ f = cleanCompilerDir(f)
+ # pull sources
+ f = pullllvm(f)
+ f = pullClang(f)
+ #Download artifacts from phase 1 compiler build
+ f = GetCompilerArtifacts(f)
+ # configure to use stage1 compiler (artifacts from phase 1 build)
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='configure_with_host',
+ command=[
+ '../llvm/configure', '--disable-bindings',
+ '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
+ WithProperties('CC=%(use_path)s/bin/clang'),
+ WithProperties('CXX=%(use_path)s/bin/clang++'),
+ config_options],
+ haltOnFailure=True,
+ description=['configure'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s')))
+ # build stage 2 compiler
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='stage_2_make',
+ command=['make', '-j', WithProperties('%(jobs)s')],
+ haltOnFailure=True,
+ description=['make'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s')))
+ # save artifacts of thids build for use by other builders
+ f = uploadArtifacts(f)
+ f = regressionTests(f)
+ return f
+
+def getGatedFactory(buildphase, next):
+ f = buildbot.process.factory.BuildFactory()
+ f.addStep(Trigger(schedulerNames=[buildphase],
+ waitForFinish=True,
+ haltOnFailure=True,
+ updateSourceStamp=True,
+ set_properties={'revision': WithProperties('%(revision)s'), 'got_revision': WithProperties('%(revision)s')}
+# set_properties={'use_compiler': WithProperties('%(use_compiler:-stage1)s'),
+# 'use_builder': WithProperties('%(use_builder:-phase1)s')},
+ ))
+ f.addStep(Trigger(schedulerNames=[next],
+ waitForFinish=False,
+ updateSourceStamp=True,
+ set_properties={'revision': WithProperties('%(revision)s'), 'got_revision': WithProperties('%(revision)s')}
+ ))
+ return f
+
+def PublishGoodBuild():
+ f = buildbot.process.factory.BuildFactory()
+ #add steps to prepare a release and announce a good build
+ return f
+
+def Placeholder():
+ f = buildbot.process.factory.BuildFactory()
+ return f
+
+def makePhaseBuilder(bldname, trigger1, trigger2, bldslaves):
+ return { 'name' : bldname,
+ 'factory' : getGatedFactory(trigger1, trigger2),
+ 'slavenames' : bldslaves ,
+ 'category' : 'status',
+ }
+
+def HostedClang(myname, compiler_type, use_compiler, use_type, slaves, config_options=''):
+ return { 'name' : myname,
+ 'builddir' : 'build.'+myname,
+ 'factory' : clangHost(config_options),
+ 'slavenames' : slaves,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': compiler_type, 'use_builder': use_compiler,
+ 'use_type': use_type, 'use_compiler': 'stage1'
+ }}
+
+def NightlyFactory(compiler, compiler_dir, options):
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ f = getBuildDir(f)
+ f = setProperty(f, 'use_builder', compiler)
+ f = setProperty(f, 'use_compiler', compiler_dir)
+ f = setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ #clean out the directory/archives prior to extracting compiler
+ f = cleanCompilerDir(f)
+ # pull test-suite
+ f = pulltest_suite(f)
+ #Download compiler artifacts to be used for this build
+ f = GetCompilerArtifacts(f)
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='sanity_test',
+ command=[WithProperties('%(use_path)s/bin/clang'),
+ '--version'],
+ haltOnFailure=True,
+ description=['sanity test'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir='.'))
+ # run tests
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='configure_tests',
+ command=['./configure',
+ WithProperties('CC=%(use_path)s/bin/clang'),
+ WithProperties('CXX=%(use_path)s/bin/clang++'),
+ 'CFLAGS='+options,
+ 'CXXFLAGS='+options,
+ # WithProperties('--with-llvmsrc=%(builddir)s/llvm'),
+ # WithProperties('--with-llvmobj=%(builddir)s/'+compiler_dir),
+ #options
+ ],
+ haltOnFailure=True,
+ description=['configure tests'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir='test-suite'))
+# f.addStep(buildbot.steps.shell.ShellCommand(
+# name='run_nightly_tests',
+# command=['make', WithProperties('-j%(jobs)s'), 'ENABLE_PARALLEL_REPORT=1',
+# 'DISABLE_CBE=1', 'DISABLE_JIT=1', 'TEST=nightly', 'report'
+# ],
+# haltOnFailure=True,
+# env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+# description=['run tests'],
+# workdir='test-suite'))
+ return f
+
+def Nightly(compiler, compiler_type, compiler_dir, slaves, options=''):
+ return { 'name' : 'nightly_'+ compiler + options,
+ 'builddir' : 'build.nightly.'+ compiler + options,
+ 'factory' : NightlyFactory(compiler, compiler_dir, options),
+ 'slavenames' : slaves,
+ 'category' : 'tests',
+ 'properties' : {'use_builder': compiler, 'use_type': compiler_type,
+ 'use_compiler': compiler_dir
+ }}
+
+def stage1Clang(compiler, compiler_type, slave):
+ return { 'name' : compiler,
+ 'builddir' : 'build.'+ compiler,
+ 'factory' : createPhase1(),
+ 'slavename' : slave,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': compiler_type
+ }}
+
+def HostStage3Clang(config_options):
+ # create the factory
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ f = getBuildDir(f)
+ f = setProperty(f, 'compiler_built', 'stage3')
+ f = setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ # clean out the directory/archives used for the stage 2 compiler
+ # clean out the directory used to build compiler
+ f = cleanCompilerDir(f)
+ # pull sources
+ f = pullllvm(f)
+ f = pullClang(f)
+ #Download artifacts from phase 1 compiler build
+ f = GetCompilerArtifacts(f)
+ # configure to use stage1 compiler (artifacts from phase 1 build)
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='configure_with_host',
+ command=[
+ '../llvm/configure', '--enable-optimized', '--disable-bindings',
+ '--with-llvmcc=clang', '--without-llvmgcc', '--without-llvmgxx',
+ WithProperties('CC=%(use_path)s/bin/clang'),
+ WithProperties('CXX=%(use_path)s/bin/clang++'),
+ config_options],
+ haltOnFailure=True,
+ description=['configure'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s')))
+ # build stage 2 compiler
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='stage_3_make',
+ command=['make', '-j', WithProperties('%(jobs)s')],
+ haltOnFailure=True,
+ description=['make'],
+ env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+ workdir=WithProperties('%(compiler_built)s')))
+ # save artifacts of thids build for use by other builders
+ f = uploadArtifacts(f)
+ f = regressionTests(f)
+ f.addStep(Trigger(schedulerNames=['stage3Nightly'],
+ waitForFinish=True,
+ updateSourceStamp=True,
+ set_properties={'revision': WithProperties('%(revision)s'), 'got_revision': WithProperties('%(revision)s')}
+ ))
+ return f
+
+def stage3Clang(use_compiler, use_type, slaves, config_options=''):
+ return { 'name' : use_compiler + '-stage3',
+ 'builddir' : 'build.'+ use_compiler + '-stage3',
+ 'factory' : HostStage3Clang(config_options),
+ 'slavenames' : slaves,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': use_type, 'use_builder': use_compiler,
+ 'use_type': use_type, 'use_compiler': 'stage2'
+ }}
+
+def gccTestSuite(use_compiler, use_type, slaves, config_options=''):
+ return { 'name' : 'gccTestSuite-'+ use_compiler,
+ 'builddir' : 'build.'+ 'gccTestSuite-'+ use_compiler,
+ 'factory' : gccRunSuite(config_options),
+ 'slavenames' : slaves,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': use_type, 'use_builder': use_compiler,
+ 'use_type': use_type, 'use_compiler': 'stage2'
+ }}
+
+def libcxx(use_compiler, use_type, slaves, config_options=''):
+ return { 'name' : 'libcxx-'+ use_compiler,
+ 'builddir' : 'build.'+ 'libcxx-'+ use_compiler,
+ 'factory' : runlibcxx(config_options),
+ 'slavenames' : slaves,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': use_type, 'use_builder': use_compiler,
+ 'use_type': use_type, 'use_compiler': 'stage2'
+ }}
+
+def boost(tag, use_compiler, use_type, slaves, config_options=''):
+ return { 'name' : 'boost-' + tag + '-' + use_compiler,
+ 'builddir' : 'build.'+ 'boost-' + tag + '-' + use_compiler,
+ 'factory' : runboost(config_options),
+ 'slavenames' : slaves,
+ 'category' : 'clang',
+ 'properties' : {'compiler_type': use_type, 'use_builder': use_compiler,
+ 'use_type': use_type, 'use_compiler': 'stage2',
+ 'boost_tag': tag
+ }}
+
+def gccRunSuite(config_options):
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ getBuildDir(f)
+ setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ cleanCompilerDir(f)
+ # pull test-suite
+ pullclang_tests(f)
+ #Download compiler artifacts to be used for this build
+ GetCompilerArtifacts(f)
+ # run tests
+# f.addStep(buildbot.steps.shell.ShellCommand(
+# name='make_check',
+# command=['make', 'check',
+# WithProperties('CC_UNDER_TEST=%(use_path)s/bin/clang'),
+# WithProperties('CXX_UNDER_TEST=%(use_path)s/bin/clang++'),],
+# haltOnFailure=True,
+# description=['make check'],
+# env={'PATH': WithProperties('/usr/local/bin/:%(use_path)s/bin:${PATH}')},
+# workdir='test-suite/gcc-4_2-testsuite'))
+ return f
+
+def runlibcxx(config_options):
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ getBuildDir(f)
+ setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ cleanCompilerDir(f)
+ # pull test-suite
+ pulllibcxx(f)
+ #Download compiler artifacts to be used for this build
+ GetCompilerArtifacts(f)
+ # run tests
+# f.addStep(buildbot.steps.shell.ShellCommand(
+# name='buildit',
+# command=['./buildit',],
+# haltOnFailure=True,
+# description=['build libc++'],
+# env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+# workdir='libcxx/lib'))
+# f.addStep(buildbot.steps.shell.ShellCommand(
+# name='testit',
+# command=['testit',],
+# haltOnFailure=True,
+# description=['test libc++'],
+# env={'PATH': WithProperties('%(use_path)s/bin:${PATH}')},
+# workdir='libcxx/test'))
+ return f
+
+def runboost(config_options):
+ f = buildbot.process.factory.BuildFactory()
+ # Determine the build directory.
+ getBuildDir(f)
+ setProperty(f, 'use_path', WithProperties('%(builddir)s/%(use_compiler)s/%(use_type)s'))
+ cleanCompilerDir(f)
+ # pull test-suite
+ pullboostrunner(f)
+ #Download compiler artifacts to be used for this build
+ GetCompilerArtifacts(f)
+ # run tests
+ # runner=llvmlab
+ # BOOST_ROOT=builddir/boost
+ # echo using borland : "integration" : %CD:\=/%/integration/bin/bcc32 : ; > %MYJAMFILE%
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='user-config.jam',
+ command=['echo', 'using', 'clang', ':', 'darwin-4.2.1', ':',
+ WithProperties('%(use_path)s/bin/clang'), ':', config_options,
+ ';', '>', 'user-config.jam'],
+ haltOnFailure=True,
+ description=['create user-config.jam'],
+ workdir='.',
+ ))
+ #--bjam-options=target-os=windows --bjam-options=-l300 --bjam-options=--debug-level=3 --bjam-options=--user-config=%MYJAMFILE% --have-source --skip-script-download --ftp=ftp://boost:4peiV8Xwxfv9@ftp.siliconman.net >runner.log
+ f.addStep(buildbot.steps.shell.ShellCommand(
+ name='run.py',
+ command=['python', 'boost_runner/run.py', WithProperties('--tag=%(boost_tag)s'),
+ '--runner=llvmlab', '--bjam-options=--toolset=clang-darwin',
+ WithProperties('--bjam-options=--user-config=%(builddir)s/userconfig.jam'),
+ '--ftp=ftp://boost:4peiV8Xwxfv9@ftp.siliconman.net',
+ WithProperties('--bjam-options=-j%(jobs)s'),'--user=""',],
+ haltOnFailure=True,
+ description=['boost regression harness'],
+ workdir='.',
+ timeout=14400
+ ))
+ return f
+
+def get_builders(all_slaves):
+ phase1 = 'clang-x86_64-osx10-gcc42-RA'
+ final_reference = 'clang-x86_64-osx10-RA'
+ typeDA = 'Debug+Asserts'
+ typeR = 'Release'
+ typeRA = 'Release+Asserts'
+ phase1_slave = 'llvmlab.local'
+ #phase2_slaves = [ 'leone.apple.com', 'dtqa09.apple.com' ]
+ #phaseRunners = [ 'leone.apple.com', 'dtqa09.apple.com' ]
+ snow_leopard_slaves = all_slaves
+ barolo_slaves = []
+ phase2_slaves = filter(lambda x:x not in [phase1_slave], snow_leopard_slaves)
+ phaseRunners = filter(lambda x:x not in [phase1_slave], snow_leopard_slaves)
+ return [
+ #Build to announce good build and prepare potential release candidate
+ { 'name' : 'Validated Build',
+ 'factory' : PublishGoodBuild(),
+ 'slavenames' : phaseRunners,
+ 'category' : 'status',
+ },
+ #parent builds for each phase
+ makePhaseBuilder('phase1 - sanity', 'doPhase1','phase2', phaseRunners),
+ makePhaseBuilder('phase2 - living', 'doPhase2','phase3', phaseRunners),
+ makePhaseBuilder('phase3 - tree health', 'doPhase3','phase4', phaseRunners),
+ makePhaseBuilder('phase4 - validation', 'doPhase4','GoodBuild', phaseRunners),
+ # phase 1 build
+ stage1Clang(phase1, typeRA, phase1_slave),
+ #phase 2 Builds
+ HostedClang ('clang-x86_64-osx10-DA', typeDA, phase1, typeRA, [phase1_slave]),
+ HostedClang (final_reference, typeRA, phase1, typeRA, phase2_slaves, '--enable-optimized'),
+ Nightly(phase1, typeRA, 'stage1', phase2_slaves),
+ #phase3 builds
+ Nightly('clang-x86_64-osx10-DA', typeDA, 'stage2', phase2_slaves),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves, '-O0'),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves, '-Os'),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves, '-O3'),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves, '-flto'),
+ Nightly(final_reference, typeRA, 'stage2', phase2_slaves, '-g'),
+
+ #phase4 builds
+ stage3Clang(final_reference, typeRA, phase2_slaves),
+ gccTestSuite(final_reference, typeRA, phase2_slaves),
+ Nightly(final_reference+ '-stage3', typeRA, 'stage3', all_slaves, '-g'),
+ libcxx(final_reference, typeRA, phase2_slaves),
+ boost('trunk', final_reference, typeRA, phase2_slaves),
+ #A Placeholder builder is required for triggers which haven't had builders
+ #configured yet, otherwise build will hang
+# { 'name' : 'Placeholder',
+# 'factory' : Placeholder(),
+# 'slavenames' : phaseRunners,
+# 'category' : 'clang',
+# },
+ ]
Added: zorg/trunk/buildbot/llvmlab/master/config/local.cfg
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/local.cfg?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/local.cfg (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/local.cfg Tue Jan 25 19:26:48 2011
@@ -0,0 +1,11 @@
+[Master Options]
+# Someone who is automatically CC'ed on all failure messages and on
+# failed email lookups.
+default_email=david_dean at apple.com
+
+# Debugging options.
+debug_password=
+enable_manhole=false
+manhole_port=tcp:9999:interface=127.0.0.1
+manhole_user=admin
+manhole_password=password
Added: zorg/trunk/buildbot/llvmlab/master/config/schedulers.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/schedulers.py?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/schedulers.py (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/schedulers.py Tue Jan 25 19:26:48 2011
@@ -0,0 +1,57 @@
+from buildbot.scheduler import Scheduler
+from buildbot.schedulers import triggerable
+from buildbot.process.properties import WithProperties
+
+def get_schedulers():
+
+ vcScheduler = Scheduler(name='all',branch=None,
+ treeStableTimer=2*60,
+ builderNames=['phase1 - sanity',])
+ startphase1 = triggerable.Triggerable(name='doPhase1',
+ builderNames=['clang-x86_64-osx10-gcc42-RA',])
+
+ gate1 = triggerable.Triggerable(name='phase2',
+ builderNames=['phase2 - living',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+ startphase2 = triggerable.Triggerable(name='doPhase2',
+ builderNames=['clang-x86_64-osx10-DA',
+ 'clang-x86_64-osx10-RA',
+ 'nightly_clang-x86_64-osx10-gcc42-RA',
+ ],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+
+ gate2 = triggerable.Triggerable(name='phase3',
+ builderNames=['phase3 - tree health',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+ startphase3 = triggerable.Triggerable(name='doPhase3',
+ builderNames=['nightly_clang-x86_64-osx10-DA',
+ 'nightly_clang-x86_64-osx10-RA',
+ 'nightly_clang-x86_64-osx10-RA-O0',
+ 'nightly_clang-x86_64-osx10-RA-Os',
+ 'nightly_clang-x86_64-osx10-RA-O3',
+ 'nightly_clang-x86_64-osx10-RA-g',
+ 'nightly_clang-x86_64-osx10-RA-flto',
+ ],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+
+ gate3 = triggerable.Triggerable(name='phase4',
+ builderNames=['phase4 - validation',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+ startphase4 = triggerable.Triggerable(name='doPhase4',
+ builderNames=['clang-x86_64-osx10-RA-stage3',
+ 'gccTestSuite-clang-x86_64-osx10-RA',
+ 'libcxx-clang-x86_64-osx10-RA',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+
+ LastOne = triggerable.Triggerable(name='GoodBuild',
+ builderNames=['Validated Build',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+
+ stage3Nightly = triggerable.Triggerable(name='stage3Nightly',
+ builderNames=['nightly_clang-x86_64-osx10-RA-stage3-g',],
+ properties = {'revision':WithProperties('%(got_revision)s')})
+
+
+ return [vcScheduler, startphase1, gate1, startphase2, gate2,
+ startphase3, gate3, startphase4, LastOne, stage3Nightly]
+
Added: zorg/trunk/buildbot/llvmlab/master/config/slaves.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/slaves.py?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/slaves.py (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/slaves.py Tue Jan 25 19:26:48 2011
@@ -0,0 +1,29 @@
+import buildbot
+import buildbot.buildslave
+import os
+
+def create_slave(name, *args, **kwargs):
+ return buildbot.buildslave.BuildSlave(name, password='password',
+ *args, **kwargs)
+
+def get_build_slaves():
+ yield create_slave("llvmlab.local",
+ notify_on_missing="david_dean at apple.com",
+ properties = { 'jobs' : 4 },
+ max_builds = 1)
+ yield create_slave("lab-mini-01.local",
+ notify_on_missing="david_dean at apple.com",
+ properties = { 'jobs' : 2 },
+ max_builds = 2)
+ yield create_slave("lab-mini-02.local",
+ notify_on_missing="david_dean at apple.com",
+ properties = { 'jobs' : 2 },
+ max_builds = 2)
+ yield create_slave("lab-mini-03.local",
+ notify_on_missing="david_dean at apple.com",
+ properties = { 'jobs' : 2 },
+ max_builds = 2)
+ yield create_slave("lab-mini-04.local",
+ notify_on_missing="david_dean at apple.com",
+ properties = { 'jobs' : 2 },
+ max_builds = 2)
Added: zorg/trunk/buildbot/llvmlab/master/config/status.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/config/status.py?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/config/status.py (added)
+++ zorg/trunk/buildbot/llvmlab/master/config/status.py Tue Jan 25 19:26:48 2011
@@ -0,0 +1,20 @@
+import os
+import buildbot
+import buildbot.status.html
+import buildbot.status.mail
+import buildbot.status.words
+
+import config
+from zorg.buildbot.util.ConfigEmailLookup import ConfigEmailLookup
+
+def get_status_targets(standard_builders):
+ default_email = config.options.get('Master Options', 'default_email')
+ return [
+ buildbot.status.html.WebStatus(
+ http_port = 8013, allowForce = True),
+ buildbot.status.mail.MailNotifier(
+ fromaddr = "daniel_dunbar at apple.com",
+ extraRecipients = [default_email],
+ mode = "all",
+ builders = standard_builders),
+ ]
Added: zorg/trunk/buildbot/llvmlab/master/master.cfg
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/master.cfg?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/master.cfg (added)
+++ zorg/trunk/buildbot/llvmlab/master/master.cfg Tue Jan 25 19:26:48 2011
@@ -0,0 +1,107 @@
+# -*- python -*-
+# ex: set syntax=python:
+
+"""
+Top level build bot configuration file.
+"""
+
+# Expect llvm_zorg to be checked out at the top level.
+import os, sys
+path = os.path.join(os.environ.get('HOME'), 'llvm_zorg', 'buildbot')
+if path not in sys.path:
+ sys.path.append(path)
+path = os.path.join(os.environ.get('HOME'), 'llvm_zorg')
+if path not in sys.path:
+ sys.path.append(path)
+
+# This is the dictionary that the buildmaster pays attention to. We also use
+# a shorter alias to save typing.
+c = BuildmasterConfig = {}
+
+import config
+import config.schedulers
+
+# Reload stuff automatically.
+#
+# FIXME: Find better way.
+reload(config.slaves)
+reload(config.schedulers)
+reload(config.builders)
+reload(config.status)
+reload(config)
+import config
+
+####### DB URL
+
+# This specifies what database buildbot uses to store change and scheduler
+# state.
+c['db_url'] = "sqlite:///state.sqlite"
+
+####### BUILDSLAVES
+
+c['slaves'] = list(config.slaves.get_build_slaves())
+c['slavePortnum'] = 9994
+
+####### CHANGESOURCES
+
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes. Any class which implements IChangeSource can be
+# put here: there are several in buildbot/changes/*.py to choose from.
+
+import os
+kStableTimeout = 2 * 60
+
+import buildbot.changes.svnpoller
+from buildbot.changes.pb import PBChangeSource
+
+class LLVMPoller(buildbot.changes.svnpoller.SVNPoller):
+ def __init__(self, project, pollinterval=120, histmax=10):
+ buildbot.changes.svnpoller.SVNPoller.__init__(self,
+ project=project,
+ svnurl='http://llvm.org/svn/llvm-project/%s/trunk' % project,
+ pollinterval=pollinterval,
+ histmax=histmax,
+ revlinktmpl='http://llvm.org/viewvc/llvm-project/?view=rev&revision=%s')
+c['change_source'] = []
+if True:
+ c['change_source'].append(LLVMPoller("llvm"))
+ c['change_source'].append(LLVMPoller("cfe"))
+# c['change_source'].append(LLVMPoller("llvm-gcc-4.2/trunk"))
+ c['change_source'].append(LLVMPoller("test-suite"))
+
+####### BUILDERS
+
+slaves_name = [s.slavename for s in c['slaves']]
+c['builders'] = builders = list(config.builders.get_builders(slaves_name) )
+
+####### STATUS TARGETS
+
+# Schedule builds and email for all non-experimental builders.
+standard_builders = [b['name'] for b in builders
+ if not b['category'].endswith('.exp')]
+c['status'] = config.status.get_status_targets(standard_builders)
+
+####### RESOURCE USAGE
+
+# Number of build records to maintain per builder.
+c['buildHorizon'] = 4000
+
+# Number of logs to maintain per builder.
+c['logHorizon'] = 600
+
+# Number of events (connect, disconnect, etc.) to maintain.
+c['eventHorizon'] = 100
+
+# Number of builds to cache in memory.
+c['buildCacheSize'] = 500
+
+####### SCHEDULERS
+
+c['schedulers'] = schedulers = list(config.schedulers.get_schedulers())
+
+####### PROJECT IDENTITY
+
+c['projectName'] = "lab.llvm.org"
+c['projectURL'] = "http://lab.llvm.org/"
+c['buildbotURL'] = "http://lab.llvm.org:8013/"
+
Added: zorg/trunk/buildbot/llvmlab/master/org.llvm.lab.master.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/org.llvm.lab.master.plist?rev=124265&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/org.llvm.lab.master.plist (added)
+++ zorg/trunk/buildbot/llvmlab/master/org.llvm.lab.master.plist Tue Jan 25 19:26:48 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.llvm.lab.master</string>
+
+ <!-- Change this to the user you want to run buildbot as -->
+ <key>UserName</key>
+ <string>buildmaster</string>
+
+ <!-- Change this to your buildbot working directory -->
+ <key>WorkingDirectory</key>
+ <string>/Users/buildmaster/llvm_zorg/buildbot/llvmlab/master</string>
+
+ <key>ProgramArguments</key>
+ <array>
+ <string>/venv/buildbot/bin/python</string>
+ <string>/usr/bin/twistd</string>
+ <string>--nodaemon</string>
+ <string>--python=buildbot.tac</string>
+ <string>--logfile=twistd.log</string>
+ <string>--prefix=llvmlab</string>
+ </array>
+
+ <key>KeepAlive</key>
+ <dict>
+ <key>SuccessfulExit</key>
+ <false/>
+ </dict>
+
+ <key>RunAtLoad</key>
+ <true/>
+
+<key>SoftResourceLimits</key>
+ <dict>
+ <key>NumberOfFiles</key>
+ <integer>4096</integer>
+ </dict>
+ <key>HardResourceLimits</key>
+ <dict>
+ <key>NumberOfFiles</key>
+ <integer>4096</integer>
+ </dict>
+</dict>
+</plist>
Added: zorg/trunk/buildbot/llvmlab/master/state.sqlite
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/state.sqlite?rev=124265&view=auto
==============================================================================
Binary file - no diff available.
Propchange: zorg/trunk/buildbot/llvmlab/master/state.sqlite
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
More information about the llvm-commits
mailing list