blob: bc236f7fdd62eafcaed15290584107ad2348fc97 [file] [log] [blame]
# -*- python -*-
# ex: set syntax=python:
# Copyright 2013 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.
from buildbot.changes.filter import ChangeFilter
from buildbot.scheduler import Nightly
from buildbot.schedulers.basic import AnyBranchScheduler
from buildbot.schedulers.basic import SingleBranchScheduler
from common import chromium_utils
from master import gitiles_poller
from master import master_utils
from master import slaves_list
from master.factory import annotator_factory
import branches_cfg
import config
import master_site_config
import os
import re
# Get the branches currently tracked on the waterfall, plus the names for the
# slaves on these branches from the branches_cfg.py file.
stable_branch = branches_cfg.stable_branch
beta_branch = branches_cfg.beta_branch
ActiveMaster = master_site_config.V8Branches
MAIL_NOTIFIER = ActiveMaster.is_production_host
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
c['status'] = []
####### DATABASE
config.DatabaseSetup(c)
####### CHANGESOURCES
comparator = gitiles_poller.GitilesRevisionComparator()
c['change_source'] = [
gitiles_poller.GitilesPoller(
'https://chromium.googlesource.com/v8/v8',
branches=[re.compile(r'refs/branch\-heads/\d+\.\d+')],
pollInterval=10,
category='release',
comparator=comparator,
),
]
####### SCHEDULERS
s_v8_stable = SingleBranchScheduler(
name='v8_stable',
branch=stable_branch,
treeStableTimer=10,
builderNames=[
'V8 Linux - stable branch',
'V8 Linux - stable branch - debug',
'V8 Linux64 - stable branch',
'V8 Linux64 - stable branch - debug',
'V8 arm - sim - stable branch',
'V8 arm - sim - stable branch - debug',
'V8 mipsel - sim - stable branch',
'V8 mips64el - sim - stable branch',
'V8 ppc - sim - stable branch',
'V8 ppc64 - sim - stable branch',
'V8 s390 - sim - stable branch',
'V8 s390x - sim - stable branch'],
)
s_v8_beta = SingleBranchScheduler(
name='v8_beta',
branch=beta_branch,
treeStableTimer=10,
builderNames=[
'V8 Linux - beta branch',
'V8 Linux - beta branch - debug',
'V8 Linux64 - beta branch',
'V8 Linux64 - beta branch - debug',
'V8 arm - sim - beta branch',
'V8 arm - sim - beta branch - debug',
'V8 mipsel - sim - beta branch',
'V8 mips64el - sim - beta branch',
'V8 ppc - sim - beta branch',
'V8 ppc64 - sim - beta branch',
'V8 s390 - sim - beta branch',
'V8 s390x - sim - beta branch'],
)
s_v8_tag = AnyBranchScheduler(
name='v8_tag',
change_filter=ChangeFilter(category='release'),
treeStableTimer=600,
builderNames=['Auto-tag'],
)
c['schedulers'] = [s_v8_stable, s_v8_beta, s_v8_tag]
builders = []
# ----------------------------------------------------------------------------
# FACTORIES
m_annotator = annotator_factory.AnnotatorFactory()
# ----------------------------------------------------------------------------
# BUILDER DEFINITIONS
CATEGORY_STABLE = '1Stable|release'
CATEGORY_STABLE_MIPS = '1Stable|release|mips'
CATEGORY_STABLE_PPC = '1Stable|release|ppc'
CATEGORY_STABLE_S390 = '1Stable|release|s390'
CATEGORY_BETA = '2Beta|release'
CATEGORY_BETA_MIPS = '2Beta|release|mips'
CATEGORY_BETA_PPC = '2Beta|release|ppc'
CATEGORY_BETA_S390 = '2Beta|release|s390'
CATEGORY_TAG = '3Tag|tag'
b_v8_linux_stable = {
'name': 'V8 Linux - stable branch',
'builddir': 'v8-linux-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_linux_stable_debug = {
'name': 'V8 Linux - stable branch - debug',
'builddir': 'v8-linux-stable-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_linux_beta = {
'name': 'V8 Linux - beta branch',
'builddir': 'v8-linux-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_linux_beta_debug = {
'name':'V8 Linux - beta branch - debug',
'builddir': 'v8-linux-beta-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_linux64_stable = {
'name': 'V8 Linux64 - stable branch',
'builddir': 'v8-linux64-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_linux64_stable_debug = {
'name': 'V8 Linux64 - stable branch - debug',
'builddir': 'v8-linux64-stable-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_linux64_beta = {
'name': 'V8 Linux64 - beta branch',
'builddir': 'v8-linux64-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_linux64_beta_debug = {
'name': 'V8 Linux64 - beta branch - debug',
'builddir': 'v8-linux64-beta-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_arm_stable = {
'name': 'V8 arm - sim - stable branch',
'builddir': 'v8-arm-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_arm_stable_debug = {
'name': 'V8 arm - sim - stable branch - debug',
'builddir': 'v8-arm-stable-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE,
'auto_reboot' : False,
}
b_v8_arm_beta = {
'name': 'V8 arm - sim - beta branch',
'builddir': 'v8-arm-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_arm_beta_debug = {
'name': 'V8 arm - sim - beta branch - debug',
'builddir': 'v8-arm-beta-debug',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA,
'auto_reboot' : False,
}
b_v8_mipsel_stable = {
'name': 'V8 mipsel - sim - stable branch',
'builddir': 'v8-mipsel-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_MIPS,
'auto_reboot' : False,
}
b_v8_mipsel_beta = {
'name': 'V8 mipsel - sim - beta branch',
'builddir': 'v8-mipsel-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_MIPS,
'auto_reboot' : False,
}
b_v8_mips64el_stable = {
'name': 'V8 mips64el - sim - stable branch',
'builddir': 'v8-mips64el-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_MIPS,
'auto_reboot' : False,
}
b_v8_mips64el_beta = {
'name': 'V8 mips64el - sim - beta branch',
'builddir': 'v8-mips64el-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_MIPS,
'auto_reboot' : False,
}
b_v8_ppc_stable = {
'name': 'V8 ppc - sim - stable branch',
'builddir': 'v8-ppc-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_PPC,
'auto_reboot' : False,
}
b_v8_ppc_beta = {
'name': 'V8 ppc - sim - beta branch',
'builddir': 'v8-ppc-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_PPC,
'auto_reboot' : False,
}
b_v8_ppc64_stable = {
'name': 'V8 ppc64 - sim - stable branch',
'builddir': 'v8-ppc64-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_PPC,
'auto_reboot' : False,
}
b_v8_ppc64_beta = {
'name': 'V8 ppc64 - sim - beta branch',
'builddir': 'v8-ppc64-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_PPC,
'auto_reboot' : False,
}
b_v8_s390_stable = {
'name': 'V8 s390 - sim - stable branch',
'builddir': 'v8-s390-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_S390,
'auto_reboot' : False,
}
b_v8_s390_beta = {
'name': 'V8 s390 - sim - beta branch',
'builddir': 'v8-s390-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_S390,
'auto_reboot' : False,
}
b_v8_s390x_stable = {
'name': 'V8 s390x - sim - stable branch',
'builddir': 'v8-s390x-stable',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_STABLE_S390,
'auto_reboot' : False,
}
b_v8_s390x_beta = {
'name': 'V8 s390x - sim - beta branch',
'builddir': 'v8-s390x-beta',
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_BETA_S390,
'auto_reboot' : False,
}
b_v8_auto_tag = {
'name': 'Auto-tag',
'builddir': 'auto-tag',
'factory': m_annotator.BaseFactory('v8/auto_tag'),
'category': CATEGORY_TAG,
'auto_reboot' : False,
}
c['builders'] = [b_v8_linux_stable,
b_v8_linux_stable_debug,
b_v8_linux64_stable,
b_v8_linux64_stable_debug,
b_v8_arm_stable,
b_v8_arm_stable_debug,
b_v8_mipsel_stable,
b_v8_mips64el_stable,
b_v8_ppc_stable,
b_v8_ppc64_stable,
b_v8_s390_stable,
b_v8_s390x_stable,
b_v8_linux_beta,
b_v8_linux_beta_debug,
b_v8_linux64_beta,
b_v8_linux64_beta_debug,
b_v8_arm_beta,
b_v8_arm_beta_debug,
b_v8_mipsel_beta,
b_v8_mips64el_beta,
b_v8_ppc_beta,
b_v8_ppc64_beta,
b_v8_s390_beta,
b_v8_s390x_beta,
b_v8_auto_tag]
# Associate the slaves to the builders. The configuration is in slaves.cfg.
slaves = slaves_list.SlavesList('slaves.cfg', 'V8Branches')
for builder in c['builders']:
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
####### BUILDSLAVES
# 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())
# Make sure everything works together.
master_utils.VerifySetup(c, slaves)
####### STATUS TARGETS
# Buildbot master url:
# 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',
tagComparator=comparator,
templates=['../master.client.v8/templates',
'../master.chromium/templates'])
if MAIL_NOTIFIER:
import mail_notifier_cfg
mail_notifier_cfg.Update(config, ActiveMaster, c)
# Adjust the buildCaches to be 3x the number of slaves per builder.
c['autoBuildCacheRatio'] = 3
####### PROJECT IDENTITY
c['projectName'] = ActiveMaster.project_name
c['projectURL'] = config.Master.project_url