blob: 866b4f9cc2141f91e399aa317d3cd67df2d39e7d [file] [log] [blame]
# -*- python -*-
# ex: set syntax=python:
# Extend paths to allow loading zorg and config modules.
import os, sys
path = os.path.join(os.environ.get('HOME'), 'zorg', 'buildbot', 'osuosl', 'master')
if path not in sys.path:
sys.path.append(path)
path = os.path.join(os.environ.get('HOME'), '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
# Reload stuff automatically.
#
# FIXME: Find better way.
reload(config.slaves)
reload(config.builders)
reload(config.status)
reload(config)
####### BUILDSLAVES
c['slaves'] = config.slaves.get_build_slaves()
c['slavePortnum'] = 9990
####### CHANGESOURCES
from buildbot.changes.pb import PBChangeSource
from zorg.buildbot.changes.llvmgitpoller import LLVMPoller as llvmgitpoller
from zorg.buildbot.changes.llvmpoller import LLVMPoller as llvmsvnpoller
llvm_projects = [
"llvm",
"cfe",
"clang-tests-external",
"clang-tools-extra",
"polly",
"compiler-rt",
"libcxx",
"libcxxabi",
"libunwind",
"lld",
"lldb",
"openmp",
"lnt",
"test-suite"]
c['change_source'] = [PBChangeSource()]
c['change_source'].append(
llvmsvnpoller(projects=llvm_projects))
c['change_source'].append(
llvmgitpoller(projects=llvm_projects,
repourl='http://git.lab.llvm.org/llvm/llvm-project.git',
workdir='gitpoller-workdir',
pollinterval=120))
####### RESOURCE USAGE
# Number of build records to maintain per builder.
c['buildHorizon'] = 200
# Number of logs to maintain per builder.
c['logHorizon'] = 200
# Number of events (connect, disconnect, etc.) to maintain.
c['eventHorizon'] = 100
# Number of builds to cache in memory.
c['buildCacheSize'] = 200
# Do not compress logs to reduce server load.
# We have a designated build master with large enough HDD.
c['logCompressionLimit'] = False
####### BUILDERS
c['builders'] = builders = list(config.builders.get_builders())
####### STATUS TARGETS
# Schedule builds and email for all non-experimental and non-LNT builders.
# The LNT performance buildbots have a very long delay and commonly fail
# late and if they fail, all of them fail together. As the same failures
# are are normally also catched by the faster non-LNT bots, there is no need
# to warn everybody about failures in the performance bots. Tobias Grosser
# will keep track of such.
standard_builders = [b['name'] for b in builders
if not b['category'].endswith('.exp') and
not b['category'].endswith('.on-demand') and
# List of builders to keep quite
not b['name'].startswith('perf-x86_64') and
not b['name'] == 'sanitizer_x86_64-freebsd' and
not b['name'] == 'clang-native-arm-lnt-perf' and
not b['name'] == 'sanitizer_x86_64-freebsd']
# TODO: Fix buildbot.status.words.IRC to accept a list of builders to report
# instead of defining categories to report. Otherwise we could report more
# than requested.
standard_categories = [b['category'] for b in builders
if not b['category'].endswith('.exp') and
not b['category'].endswith('.on-demand') and
not b['name'].startswith('perf-x86_64')]
c['status'] = config.status.get_status_targets(standard_builders,
standard_categories)
####### SCHEDULERS
from buildbot.scheduler import Scheduler
from buildbot.schedulers import triggerable
from buildbot.schedulers.filter import ChangeFilter
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.timed import Nightly
def depends_on(projects):
"""
Returns a ChangeFilter for the given projects.
"""
return ChangeFilter(project=projects, branch='trunk')
def get_standard_for(category):
"""
Returns a list of standard builder names for the given category.
"""
return [
b['name'] for b in builders
if b['category'] == category]
def get_all_for(category):
"""
Returns a list of builder names for the given category, including
expiremental builders but excluding builder which could be assigned to
automatic schedulers.
"""
return [
b['name'] for b in builders
if (not getattr(b['factory'], 'depends_on_projects', None)) and (
b['category'] == category or
b['category'] == category + '.exp')
]
c['schedulers'] = [SingleBranchScheduler(name="llvm_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("llvm"),
change_filter=depends_on(
"llvm"))]
c['schedulers'].append(SingleBranchScheduler(name="clang_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("clang"),
change_filter=depends_on([
"llvm",
"cfe",
"clang-tools-extra"])))
c['schedulers'].append(SingleBranchScheduler(name="clang_fast_scheduler",
treeStableTimer=10,
builderNames=get_all_for("clang_fast"),
change_filter=depends_on([
"llvm",
"cfe",
"compiler-rt",
"lld",
"clang-tools-extra"])))
c['schedulers'].append(SingleBranchScheduler(name="polly_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("polly"),
change_filter=depends_on([
"cfe",
"llvm",
"polly"])))
c['schedulers'].append(SingleBranchScheduler(name="lldb_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("lldb"),
change_filter=depends_on([
"llvm",
"cfe",
"lld",
"lldb"])))
c['schedulers'].append(SingleBranchScheduler(name="sanitizer_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("sanitizer"),
change_filter=depends_on([
"llvm",
"cfe",
"compiler-rt",
"libcxx",
"libcxxabi",
"libunwind",
"lld"])))
c['schedulers'].append(SingleBranchScheduler(name="openmp_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("openmp"),
change_filter=depends_on([
"openmp"])))
c['schedulers'].append(SingleBranchScheduler(name="libcxx_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("libcxx"),
change_filter=depends_on([
"libcxx",
"libcxxabi",
"libunwind"])))
c['schedulers'].append(Nightly(name="aosp_scheduler",
builderNames=get_all_for("aosp"),
hour=19,
minute=0,
branch=None))
c['schedulers'].append(SingleBranchScheduler(name="rev_iter_scheduler",
treeStableTimer=2*60,
builderNames=get_all_for("rev_iter"),
change_filter=depends_on(["cfe",
"llvm",
"polly"])))
c['schedulers'].extend(
config.schedulers.getSingleBranchSchedulers(c['builders'], c['schedulers'])
)
####### PROJECT IDENTITY
c['title'] = "LLVM"
c['titleURL'] = "http://llvm.org/"
c['buildbotURL'] = "http://lab.llvm.org:8011/"
####### DB URL
c['db_url'] = "postgresql://localhost/buildmasterdb"