| # -*- python -*- |
| # ex: set syntax=python: |
| |
| # Copyright (c) 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 'nacl' 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 . |
| |
| from master import gitiles_poller |
| from buildbot.scheduler import Scheduler |
| |
| from common import chromium_utils |
| |
| from master import master_utils |
| from master import slaves_list |
| from master.factory import annotator_factory |
| |
| import config |
| import master_site_config |
| |
| ActiveMaster = master_site_config.NativeClientToolchain |
| |
| nacl_source_url = ( |
| 'https://chromium.googlesource.com/native_client/src/native_client') |
| |
| # This is the dictionary that the buildmaster pays attention to. We also use |
| # a shorter alias to save typing. |
| c = BuildmasterConfig = {} |
| |
| config.DatabaseSetup(c) |
| |
| master_poller = gitiles_poller.GitilesPoller(nacl_source_url) |
| |
| c['change_source'] = [master_poller] |
| |
| def F_NACL_RECIPE(): |
| return annotator_factory.AnnotatorFactory().BaseFactory(recipe='nacl', |
| factory_properties = {'slavetype': 'BuilderTester'}); |
| |
| # The identifier of the factory is the build configuration. If two factories |
| # are using the same build configuration, they should have the same identifier. |
| |
| # BuilderTesters using a custom build configuration. |
| factories = [ |
| ['mac-toolchain_arm', '2native-newlib-arm|info', F_NACL_RECIPE()], |
| |
| # GlibC makefile |
| ['mac-glibc', '3native-glibc-x86|info', F_NACL_RECIPE()], |
| |
| # PNaCl |
| ['mac-pnacl-x86_32', '4pnacl|info', F_NACL_RECIPE()], |
| ['linux-pnacl-x86_64-tests-x86_32', '5pnacl-fyi|info', F_NACL_RECIPE()], |
| ['linux-pnacl-x86_64-tests-x86_64', '5pnacl-fyi|info', F_NACL_RECIPE()], |
| ['linux-pnacl-x86_64-tests-arm', '5pnacl-fyi|info', F_NACL_RECIPE()], |
| ['linux-pnacl_musl-x86_64', '6pnacl-musl|info', F_NACL_RECIPE()], |
| ] |
| |
| ####### SCHEDULERS |
| ## configure the Schedulers |
| # Main scheduler for all changes in trunk. |
| primary_builders = [] |
| for f in factories: |
| primary_builders.append(f[0]) |
| s_nacl = Scheduler( |
| name='nacl', |
| branch='master', |
| treeStableTimer=60, |
| builderNames=primary_builders, |
| ) |
| c['schedulers'] = [ |
| s_nacl, |
| ] |
| |
| |
| # ---------------------------------------------------------------------------- |
| # BUILDER DEFINITIONS |
| |
| # 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 |
| # slavename (required): which slave to use, must appear in c['slaves'] |
| # 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. |
| # |
| |
| no_reboots = [ |
| 'win2003-toolchain_x86', |
| 'win7-glibc', |
| 'mac-glibc', |
| 'linux64-glibc', |
| ] |
| |
| c['builders'] = [] |
| slaves = slaves_list.SlavesList('slaves.cfg', 'NativeClientToolchain') |
| for f in factories: |
| # Don't enable auto_reboot for people testing locally. |
| auto_reboot = f[0] not in no_reboots and ActiveMaster.is_production_host |
| c['builders'].append({ |
| 'name': f[0], |
| 'slavenames': slaves.GetSlavesName(builder=f[0]), |
| 'builddir': f[0], |
| 'slavebuilddir': 'nacl-toolchain', |
| 'factory': f[2], |
| 'category': '%s' % f[1], |
| 'auto_reboot': auto_reboot, |
| }) |
| |
| |
| ####### 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=master_poller.comparator, |
| templates=['./templates', '../master.client.nacl/templates']) |
| |
| |
| # Adjust the buildCaches to be 3x the number of slaves per builder. |
| c['autoBuildCacheRatio'] = 3 |