blob: ad975964b31f838849d5b6fdf855d2ec6bbf2d1f [file] [log] [blame]
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This is the buildmaster config file for the 'chromium.perf' bot. It must
# be installed as 'master.cfg' in your buildmaster's base directory
# (although the filename can be changed with the --basedir option to
# 'mktap buildbot master').
# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .
# This file follows this naming convention:
# Factories: f_cr_rel_[type]
# Builders: b_chromium_rel_[os]_[type]
# BuildDir: chromium-rel-[os]-[type]
#
# os = xp/vista/linux/mac
# type = perf
from buildbot.scheduler import Scheduler
from master import gitiles_poller
from master import master_utils
from master import slaves_list
from master.factory import annotator_factory
from master.factory import remote_run_factory
import config
import master_site_config
ActiveMaster = master_site_config.ChromiumPerf
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
c['slavePortnum'] = ActiveMaster.slave_port
# Enable compression for any stdio log file larger than 10 MB.
c['logCompressionLimit'] = 1024 * 1024 * 10 # 10 MB
# Load the list of slaves.
slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumPerf')
config.DatabaseSetup(c)
def recipe_factory(recipe, **kwargs):
f_annotations = annotator_factory.AnnotatorFactory(ActiveMaster)
return f_annotations.BaseFactory(recipe=recipe, **kwargs)
def m_remote_run(recipe, **kwargs):
return remote_run_factory.RemoteRunFactory(
active_master=ActiveMaster,
repository='https://chromium.googlesource.com/chromium/tools/build.git',
recipe=recipe,
factory_properties={'path_config': 'kitchen'},
**kwargs)
# ------------------------------------------------------------------------------
# Change Sources.
# Polls config.Master.trunk_url for changes
master_poller = gitiles_poller.GitilesPoller(
'https://chromium.googlesource.com/chromium/src')
c['change_source'] = [master_poller]
# End Change Sources.
# ------------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Builders.
# The 'builders' list defines the Builders. Each one is configured with a
# dictionary, using the following keys:
# name (required): the name used to describe this bilder
# builddir (required): which subdirectory to run the builder in
# factory (required): a BuildFactory to define how the build is run
# periodicBuildTime (optional): if set, force a build every N seconds
# category (optional): it is not used in the normal 'buildbot' meaning. It is
# used by gatekeeper to determine which steps it should
# look for to close the tree.
#
_category_index = enumerate(
('builders', 'android', 'win', 'mac', 'linux'))
_category_index = {category: index + 1 for index, category in _category_index}
def _CategoryIndex(category):
return _category_index[category]
_builder_names = []
def _AddBuilder(name, platform, recipe=None, timeout=None):
if platform == 'android':
factory = recipe_factory
recipe = recipe or 'android/builder'
else:
factory = m_remote_run
recipe = recipe or 'chromium'
factory_kwargs = dict(
recipe=recipe,
)
if timeout:
factory_kwargs['timeout'] = timeout
c['builders'].append({
'name': name,
'factory': factory(**factory_kwargs),
'category':
'%d%s|%s' % (_CategoryIndex('builders'), 'builders', platform),
'mergeRequests': False,
})
_builder_names.append(name)
def _AddTester(name, platform):
c['builders'].append({
'name': name,
'factory': m_remote_run('chromium'),
'category': '%d%s|testers' % (_CategoryIndex(platform), platform),
})
c['builders'] = []
_AddBuilder('Android Builder Perf', 'android')
_AddBuilder('Android arm64 Builder Perf', 'android')
_AddBuilder('Android Compile Perf', 'android', recipe='chromium')
_AddBuilder('Android arm64 Compile Perf', 'android', recipe='chromium')
_AddBuilder('Win Builder Perf', 'win', timeout=3600)
# TODO(dtu): decrease the timeout when https://crbug.com/617982 is fixed.
_AddBuilder('Win x64 Builder Perf', 'win', timeout=7200)
_AddBuilder('Mac Builder Perf', 'mac')
# TODO(krasin): decrease the timeout when https://crbug.com/569732 is fixed.
_AddBuilder('Linux Builder Perf', 'linux', timeout=4800)
# 32 bit android
_AddTester('android-nexus5x-perf', 'android')
_AddTester('Android Nexus5 Perf', 'android')
_AddTester('Android One Perf', 'android')
# Webview bots
_AddTester('Android Nexus5X WebView Perf', 'android')
_AddTester('Android Nexus6 WebView Perf', 'android')
# Windows Desktop bots
_AddTester('Win 10 High-DPI Perf', 'win')
_AddTester('win-10-perf', 'win')
_AddTester('Win 7 Perf', 'win')
_AddTester('Win 7 Nvidia GPU Perf', 'win')
# Mac Desktop bots
_AddTester('mac-10_12_laptop_low_end-perf', 'mac')
_AddTester('mac-10_13_laptop_high_end-perf', 'mac')
# Linux desktop bots
_AddTester('linux-perf', 'linux')
# End Builders.
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# Schedulers.
## configure the Schedulers
c['schedulers'] = [
Scheduler(name='chromium',
branch='master',
builderNames=_builder_names)
]
# End Schedulers.
# ------------------------------------------------------------------------------
####### BUILDSLAVES
# Associate the slaves to the manual builders. The configuration is in
# slaves.cfg.
for builder in c['builders']:
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
# The 'slaves' list defines the set of allowable buildslaves. List all the
# slaves registered to a builder. Remove dupes.
c['slaves'] = master_utils.AutoSetupSlaves(c['builders'],
config.Master.GetBotPassword())
master_utils.VerifySetup(c, slaves)
####### STATUS TARGETS
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.Waterfall page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
#Must come before AutoSetupMaster().
c['buildbotURL'] = ActiveMaster.buildbot_url
# Adds common status and tools to this master.
master_utils.AutoSetupMaster(c, ActiveMaster,
public_html='../master.chromium/public_html',
templates=['./templates', '../master.chromium/templates'],
tagComparator=master_poller.comparator,
enable_http_status_push=ActiveMaster.is_production_host)
# The default is to keep 1000 builds and 500 log files. The log files from this
# master are very big, so keep fewer.
c['buildHorizon'] = 500
c['logHorizon'] = 200
####### PROJECT IDENTITY
# the 'projectName' string will be used to describe the project that this
# buildbot is working on. For example, it is used as the title of the
# waterfall HTML page. The 'projectURL' string will be used to provide a link
# from buildbot HTML pages to your project's home page.
c['projectName'] = ActiveMaster.project_name
c['projectURL'] = config.Master.project_url