Created
October 11, 2014 22:10
-
-
Save socantre/5b313940638ac06e34c6 to your computer and use it in GitHub Desktop.
buildbot master config for llvm/clang/libc++/lld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- python -*- | |
# ex: set syntax=python: | |
c = BuildmasterConfig = {} | |
####### authentication credentials | |
web_status_users = [("user","fakefakefake")] | |
slaves = [("local-slave", "fakefakefake"), | |
("win81_x64-slave", "fakefakefake")] | |
####### BUILDSLAVES | |
from buildbot.buildslave import BuildSlave | |
c['slaves'] = [BuildSlave(slavename, password) for (slavename,password) in slaves] | |
c['protocols'] = {'pb': {'port': 9989}} | |
####### CHANGESOURCES | |
from buildbot.changes.gitpoller import GitPoller | |
c['change_source'] = [] | |
c['change_source'].append(GitPoller('http://llvm.org/git/llvm.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
c['change_source'].append(GitPoller('http://llvm.org/git/clang.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
c['change_source'].append(GitPoller('http://llvm.org/git/compiler-rt.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
c['change_source'].append(GitPoller('http://llvm.org/git/libcxx.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
c['change_source'].append(GitPoller('http://llvm.org/git/lld.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
c['change_source'].append(GitPoller('http://llvm.org/git/clang-tools-extra.git', workdir='gitpoller-workdir', project='LLVM', branch='master', pollinterval=300)) | |
all_repositories = { | |
'http://llvm.org/git/llvm.git' : 'LLVM', | |
'http://llvm.org/git/clang.git' : 'clang', | |
'http://llvm.org/git/compiler-rt.git' : 'LLVM-rt', | |
'http://llvm.org/git/libcxx.git' : 'libc++', | |
'http://llvm.org/git/lld.git' : 'lld', | |
'http://llvm.org/git/clang-tools-extra.git' : 'clang-tools' | |
} | |
def codebaseGenerator(chdict): | |
return all_repositories[chdict['repository']] | |
c['codebaseGenerator'] = codebaseGenerator | |
####### SCHEDULERS | |
from buildbot.schedulers.basic import SingleBranchScheduler | |
from buildbot.schedulers.timed import Nightly | |
from buildbot.schedulers.forcesched import ForceScheduler | |
from buildbot.changes import filter | |
scheduler_codebases = {cb : {'repository' : repo } for (repo,cb) in all_repositories.items()} | |
c['schedulers'] = [] | |
c['schedulers'].append(Nightly( | |
name="Daily 4PM ET", | |
branch='master', | |
codebases = scheduler_codebases, | |
builderNames=["local-full_build", "win81_x64-full_build"], | |
hour=16)) | |
c['schedulers'].append(SingleBranchScheduler( | |
name="updates", | |
change_filter=filter.ChangeFilter(project='LLVM', branch='master', codebase=[cb for (repo,cb) in all_repositories.items()]), | |
codebases = scheduler_codebases, | |
createAbsoluteSourceStamps=True, | |
builderNames=["local-incremental_build", "win81_x64-incremental_build"])) | |
c['schedulers'].append(ForceScheduler( | |
name="force", | |
codebases = scheduler_codebases, | |
builderNames=["local-full_build", "win81_x64-full_build", "local-incremental_build", "win81_x64-incremental_build"])) | |
####### BUILDERS | |
c['builders'] = [] | |
from buildbot.process.factory import BuildFactory | |
from buildbot.steps.source.git import Git | |
from buildbot.steps.shell import ShellCommand | |
from buildbot.steps.shell import Configure | |
from buildbot.steps.shell import Compile | |
from buildbot.steps.shell import Test | |
from buildbot.config import BuilderConfig | |
from buildbot.steps.slave import RemoveDirectory | |
incremental_build = BuildFactory() | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/llvm.git', workdir='build/llvm', mode='incremental', branch='master', codebase="LLVM" )) | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/clang.git', workdir='build/llvm/tools/clang', mode='incremental', branch='master', codebase="clang" )) | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/compiler-rt.git', workdir='build/llvm/projects/compiler-rt', mode='incremental', branch='master', codebase="LLVM-rt" )) | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/libcxx.git', workdir='build/llvm/projects/libcxx', mode='incremental', branch='master', codebase="libc++" )) | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/lld.git', workdir='build/llvm/tools/lld', mode='incremental', branch='master', codebase="lld" )) | |
incremental_build.addStep(Git(repourl='http://llvm.org/git/clang-tools-extra.git', workdir='build/llvm/tools/clang/tools/extra', mode='incremental', branch='master', codebase="clang-tools")) | |
incremental_build.addStep(Compile(command=["cmake", "--build", "."], workdir='build/build')) | |
incremental_build.addStep(Test(command=["cmake", "--build", ".", "--target", "clang-test"], workdir='build/build')) | |
c['builders'].append(BuilderConfig(name="local-incremental_build", slavenames=["local-slave"], factory=incremental_build)) | |
c['builders'].append(BuilderConfig(name="win81_x64-incremental_build", slavenames=["win81_x64-slave"], factory=incremental_build)) | |
full_build = BuildFactory() | |
full_build.addStep(Git(repourl='http://llvm.org/git/llvm.git', workdir='build/llvm', mode='full', method='fresh', branch='master', codebase="LLVM" )) | |
full_build.addStep(Git(repourl='http://llvm.org/git/clang.git', workdir='build/llvm/tools/clang', mode='full', method='fresh', branch='master', codebase="clang" )) | |
full_build.addStep(Git(repourl='http://llvm.org/git/compiler-rt.git', workdir='build/llvm/projects/compiler-rt', mode='full', method='fresh', branch='master', codebase="LLVM-rt" )) | |
full_build.addStep(Git(repourl='http://llvm.org/git/libcxx.git', workdir='build/llvm/projects/libcxx', mode='full', method='fresh', branch='master', codebase="libc++" )) | |
full_build.addStep(Git(repourl='http://llvm.org/git/lld.git', workdir='build/llvm/tools/lld', mode='full', method='fresh', branch='master', codebase="lld" )) | |
full_build.addStep(Git(repourl='http://llvm.org/git/clang-tools-extra.git', workdir='build/llvm/tools/clang/tools/extra', mode='full', method='fresh', branch='master', codebase="clang-tools")) | |
full_build.addStep(RemoveDirectory(dir="build/build")) | |
full_build.addStep(Configure(command=["cmake", "-G", "Ninja", "../llvm"], workdir='build/build')) | |
full_build.addStep(Compile(command=["cmake", "--build", "."], workdir='build/build')) | |
full_build.addStep(Test(command=["cmake", "--build", ".", "--target", "clang-test"], workdir='build/build')) | |
c['builders'].append(BuilderConfig(name="local-full_build", slavenames=["local-slave"], factory=full_build)) | |
c['builders'].append(BuilderConfig(name="win81_x64-full_build", slavenames=["win81_x64-slave"], factory=full_build)) | |
####### STATUS TARGETS | |
c['status'] = [] | |
from buildbot.status import html | |
from buildbot.status.web import authz, auth | |
authz_cfg=authz.Authz( | |
auth=auth.BasicAuth(web_status_users), | |
gracefulShutdown = False, | |
forceBuild = 'auth', | |
forceAllBuilds = 'auth', | |
pingBuilder = 'auth', | |
stopBuild = 'auth', | |
stopAllBuilds = 'auth', | |
cancelPendingBuild = 'auth', | |
) | |
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) | |
####### PROJECT IDENTITY | |
c['title'] = "LLVM" | |
c['titleURL'] = "http://llvm.org/" | |
c['buildbotURL'] = "http://localhost:8010/" | |
####### DB URL | |
c['db'] = { | |
'db_url' : "sqlite:///state.sqlite", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment