| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 2 # ex: set syntax=python: | |
| 3 | |
| 4 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
| 5 # Use of this source code is governed by a BSD-style license that can be | |
| 6 # found in the LICENSE file. | |
| 7 | |
| 8 # This is the buildmaster config file for the 'nacl' bot. It must | |
| 9 # be installed as 'master.cfg' in your buildmaster's base directory | |
| 10 # (although the filename can be changed with the --basedir option to | |
| 11 # 'mktap buildbot master'). | |
| 12 | |
| 13 # It has one job: define a dictionary named BuildmasterConfig. This | |
| 14 # dictionary has a variety of keys to control different aspects of the | |
| 15 # buildmaster. They are documented in docs/config.xhtml . | |
| 16 | |
| 17 # This file follows this naming convention: | |
| 18 # Factories: f_nacl_[dbg/opt/sdk]_[os] | |
| 19 # Builders: b_nacl_[dbg/opt/sdk]_[os] | |
| 20 # BuildDir: [dbg/opt/sdk]-[os] | |
| 21 # | |
| 22 # os = xp/linux/mac | |
| 23 | |
| 24 from buildbot import locks | |
| 25 from buildbot.changes import svnpoller | |
| 26 from buildbot.scheduler import Dependent | |
| 27 from buildbot.scheduler import Scheduler | |
| 28 from buildbot.scheduler import Triggerable | |
| 29 | |
| 30 # Reload all the python files under master and common | |
| 31 import master | |
| 32 reload(master) | |
| 33 import common | |
| 34 reload(common) | |
| 35 | |
| 36 # These modules come from scripts/master, which must be in the PYTHONPATH. | |
| 37 import build_utils | |
| 38 import chromium_step | |
| 39 import master_utils | |
| 40 from master.factory import nacl_factory | |
| 41 from master.factory import chromium_factory | |
| 42 import slaves_list | |
| 43 | |
| 44 # These modules come from scripts/common, which must be in the PYTHONPATH. | |
| 45 import chromium_config as config | |
| 46 import chromium_utils | |
| 47 | |
| 48 ActiveMaster = config.Master.NativeClientToolchain | |
| 49 | |
| 50 TREE_GATE_KEEPER = ActiveMaster.is_production_host | |
| 51 GOOD_REVISIONS = False | |
| 52 | |
| 53 # This is the dictionary that the buildmaster pays attention to. We also use | |
| 54 # a shorter alias to save typing. | |
| 55 c = BuildmasterConfig = {} | |
| 56 | |
| 57 | |
| 58 ####### CHANGESOURCES | |
| 59 | |
| 60 # the 'change_source' list tells the buildmaster how it should find out about | |
| 61 # source code changes. Any class which implements IChangeSource can be added | |
| 62 # to this list: there are several in buildbot/changes/*.py to choose from. | |
| 63 def NativeClientTreeFileSplitter(path): | |
| 64 projects = ['native_client'] | |
| 65 for p in projects: | |
| 66 if path.startswith(p + '/'): | |
| 67 return (p, path[len(p)+1:]) | |
| 68 return None | |
| 69 | |
| 70 # Polls config.Master.nacl_trunk_url for changes | |
| 71 trunk_poller = svnpoller.SVNPoller( | |
| 72 svnurl=config.Master.nacl_trunk_url + '/src', | |
| 73 split_file=NativeClientTreeFileSplitter, | |
| 74 pollinterval=10) | |
| 75 | |
| 76 c['change_source'] = [trunk_poller] | |
| 77 | |
| 78 | |
| 79 ####### BUILDERS | |
| 80 | |
| 81 # buildbot/process/factory.py provides several BuildFactory classes you can | |
| 82 # start with, which implement build processes for common targets (GNU | |
| 83 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | |
| 84 # base class, and is configured with a series of BuildSteps. When the build | |
| 85 # is run, the appropriate buildslave is told to execute each Step in turn. | |
| 86 | |
| 87 # the first BuildStep is typically responsible for obtaining a copy of the | |
| 88 # sources. There are source-obtaining Steps in buildbot/process/step.py for | |
| 89 # CVS, SVN, and others. | |
| 90 | |
| 91 | |
| 92 # ---------------------------------------------------------------------------- | |
| 93 # FACTORIES | |
| 94 | |
| 95 m_win32 = nacl_factory.NativeClientFactory( | |
| 96 'native_client', 'win32') | |
| 97 m_win64 = nacl_factory.NativeClientFactory( | |
| 98 'native_client', 'win64') | |
| 99 m_linux = nacl_factory.NativeClientFactory( | |
| 100 'native_client', 'linux2') | |
| 101 m_mac = nacl_factory.NativeClientFactory( | |
| 102 'native_client', 'darwin') | |
| 103 m_arm = nacl_factory.NativeClientFactory( | |
| 104 'native_client', 'arm') | |
| 105 m_arm_tester = nacl_factory.NativeClientFactory( | |
| 106 'native_client', 'arm') | |
| 107 | |
| 108 m_win_ch = chromium_factory.ChromiumFactory('src/build', 'win32') | |
| 109 m_linux_ch = chromium_factory.ChromiumFactory('src/build', 'linux2') | |
| 110 m_mac_ch = chromium_factory.ChromiumFactory('src/build', 'darwin') | |
| 111 | |
| 112 # Release builds. | |
| 113 branch_url = ('http://nativeclient.googlecode.com/svn/branches/' | |
| 114 '782_2009_09_25/src/native_client') | |
| 115 m_rel_win = nacl_factory.NativeClientFactory( | |
| 116 'native_client', 'win32', alternate_url=branch_url) | |
| 117 m_rel_linux = nacl_factory.NativeClientFactory( | |
| 118 'native_client', 'linux2', alternate_url=branch_url) | |
| 119 m_rel_mac = nacl_factory.NativeClientFactory( | |
| 120 'native_client', 'darwin', alternate_url=branch_url) | |
| 121 | |
| 122 # Some shortcut to simplify the code below. | |
| 123 F_WIN32 = m_win32.NativeClientFactory | |
| 124 F_WIN64 = m_win64.NativeClientFactory | |
| 125 F_LINUX = m_linux.NativeClientFactory | |
| 126 F_MAC = m_mac.NativeClientFactory | |
| 127 F_ARM = m_arm.NativeClientFactory | |
| 128 | |
| 129 F_LINUX_GLIBC = m_linux.ModularBuildFactory | |
| 130 | |
| 131 F_WIN_CH = m_win_ch.ChromiumNativeClientLatestFactory | |
| 132 F_LINUX_CH = m_linux_ch.ChromiumNativeClientLatestFactory | |
| 133 F_MAC_CH = m_mac_ch.ChromiumNativeClientLatestFactory | |
| 134 | |
| 135 F_REL_WIN = m_rel_win.NativeClientFactory | |
| 136 F_REL_LINUX = m_rel_linux.NativeClientFactory | |
| 137 F_REL_MAC = m_rel_mac.NativeClientFactory | |
| 138 | |
| 139 | |
| 140 # The identifier of the factory is the build configuration. If two factories | |
| 141 # are using the same build configuration, they should have the same identifier. | |
| 142 | |
| 143 # BuilderTesters using a custom build configuration. | |
| 144 factories = [] | |
| 145 toolchain_archive_src = 'native_client/tools/naclsdk.tgz' | |
| 146 toolchain_archive_dst_base = 'toolchain' | |
| 147 | |
| 148 | |
| 149 def ToolchainArchiveDst(platform): | |
| 150 return ('%(got_revision)s/naclsdk_' + platform + '.tgz') | |
| 151 | |
| 152 | |
| 153 def ToolchainArchiveDstLatest(platform): | |
| 154 return 'latest/naclsdk_' + platform + '.tgz' | |
| 155 | |
| 156 | |
| 157 factories.append(['win7-toolchain_x86', '1Toolchain|info', F_WIN32( | |
| 158 'win7-toolchain_x86', clobber=True, official_release=False, | |
| 159 build_toolchain=True, | |
| 160 git_toolchain=False, | |
| 161 target='opt-win,nacl,doc', | |
| 162 compile_timeout=72000, | |
| 163 factory_properties={ | |
| 164 'archive_build': True, | |
| 165 'archive_src': toolchain_archive_src, | |
| 166 'archive_dst_base': toolchain_archive_dst_base, | |
| 167 'archive_dst': ToolchainArchiveDst('win_x86_win7'), | |
| 168 'archive_dst_latest': ToolchainArchiveDstLatest('win_x86_win7'), | |
| 169 'gclient_timeout': 1200, | |
| 170 })]) | |
| 171 factories.append(['vista-toolchain_x86', '1Toolchain|info', F_WIN32( | |
| 172 'vista-toolchain_x86', clobber=True, official_release=False, | |
| 173 build_toolchain=True, | |
| 174 git_toolchain=False, | |
| 175 target='opt-win,nacl,doc', | |
| 176 compile_timeout=72000, | |
| 177 factory_properties={ | |
| 178 'archive_build': True, | |
| 179 'archive_src': toolchain_archive_src, | |
| 180 'archive_dst_base': toolchain_archive_dst_base, | |
| 181 'archive_dst': ToolchainArchiveDst('win_x86'), | |
| 182 'archive_dst_latest': ToolchainArchiveDstLatest('win_x86'), | |
| 183 'gclient_timeout': 1200, | |
| 184 })]) | |
| 185 factories.append(['win2003-toolchain_x86', '1Toolchain|info', F_WIN32( | |
| 186 'win2003-toolchain_x86', clobber=True, official_release=False, | |
| 187 build_toolchain=True, | |
| 188 git_toolchain=False, | |
| 189 target='opt-win,nacl,doc', | |
| 190 compile_timeout=72000, | |
| 191 factory_properties={ | |
| 192 'archive_build': True, | |
| 193 'archive_src': toolchain_archive_src, | |
| 194 'archive_dst_base': toolchain_archive_dst_base, | |
| 195 'archive_dst': ToolchainArchiveDst('win_x86_win2003'), | |
| 196 'archive_dst_latest': ToolchainArchiveDstLatest('win_x86_win2003'), | |
| 197 'gclient_timeout': 1200, | |
| 198 })]) | |
| 199 factories.append(['mac-toolchain_x86-32', '1Toolchain|info', F_MAC( | |
| 200 'mac-toolchain_x86-32', clobber=True, official_release=False, | |
| 201 build_toolchain=True, | |
| 202 git_toolchain=False, | |
| 203 target='opt-mac,nacl,doc', | |
| 204 options=nacl_factory.generic_m32_n32_options, | |
| 205 tests=['nacl_small_tests', | |
| 206 'nacl_medium_tests', | |
| 207 'nacl_large_tests', | |
| 208 'nacl_selenium'], | |
| 209 factory_properties={ | |
| 210 'archive_build': True, | |
| 211 'archive_src': toolchain_archive_src, | |
| 212 'archive_dst_base': toolchain_archive_dst_base, | |
| 213 'archive_dst': ToolchainArchiveDst('mac_x86-32'), | |
| 214 'archive_dst_latest': ToolchainArchiveDstLatest('mac_x86-32'), | |
| 215 'gclient_timeout': 1200, | |
| 216 })]) | |
| 217 factories.append(['mac-toolchain_x86', '1Toolchain|info', F_MAC( | |
| 218 'mac-toolchain_x86', clobber=True, official_release=False, | |
| 219 build_toolchain=True, | |
| 220 git_toolchain=False, | |
| 221 target='opt-mac,nacl,doc', | |
| 222 options=nacl_factory.generic_m32_n32_options, | |
| 223 tests=['nacl_small_tests', | |
| 224 'nacl_medium_tests', | |
| 225 'nacl_large_tests', | |
| 226 'nacl_selenium'], | |
| 227 factory_properties={ | |
| 228 'archive_build': True, | |
| 229 'archive_src': toolchain_archive_src, | |
| 230 'archive_dst_base': toolchain_archive_dst_base, | |
| 231 'archive_dst': ToolchainArchiveDst('mac_x86'), | |
| 232 'archive_dst_latest': ToolchainArchiveDstLatest('mac_x86'), | |
| 233 'gclient_timeout': 1200, | |
| 234 })]) | |
| 235 factories.append(['hardy32-toolchain_x86', '1Toolchain|info', F_LINUX( | |
| 236 'hardy32-toolchain_x86', clobber=True, official_release=False, | |
| 237 build_toolchain=True, | |
| 238 git_toolchain=False, | |
| 239 target='opt-linux,nacl,doc', | |
| 240 options=nacl_factory.generic_m32_n32_options, | |
| 241 tests=['nacl_small_tests', | |
| 242 'nacl_medium_tests', | |
| 243 'nacl_large_tests', | |
| 244 'nacl_selenium'], | |
| 245 factory_properties={ | |
| 246 'archive_build': True, | |
| 247 'archive_src': toolchain_archive_src, | |
| 248 'archive_dst_base': toolchain_archive_dst_base, | |
| 249 'archive_dst': ToolchainArchiveDst('linux_x86'), | |
| 250 'archive_dst_latest': ToolchainArchiveDstLatest('linux_x86'), | |
| 251 'gclient_timeout': 1200, | |
| 252 })]) | |
| 253 factories.append(['hardy32-toolchain_arm-trusted', '1Toolchain|info', F_ARM( | |
| 254 'hardy32-toolchain_arm-trusted', clobber=True, official_release=False, | |
| 255 build_toolchain=True, | |
| 256 just_trusted=True, | |
| 257 target='opt-linux,nacl,doc', | |
| 258 test_target='opt-linux', | |
| 259 tests=[], | |
| 260 options=nacl_factory.linux_marm_narm_options['opt'], | |
| 261 factory_properties={ | |
| 262 'archive_build': True, | |
| 263 'archive_src': 'native_client/arm-trusted.tgz', | |
| 264 'archive_dst_base': toolchain_archive_dst_base, | |
| 265 'archive_dst': ToolchainArchiveDst('linux_arm-trusted'), | |
| 266 'archive_dst_latest': ToolchainArchiveDstLatest('linux_arm-trusted'), | |
| 267 'gclient_timeout': 1200, | |
| 268 })]) | |
| 269 factories.append(['hardy64-toolchain_arm-untrusted', '1Toolchain|info', F_ARM( | |
| 270 'hardy64-toolchain_arm-untrusted', clobber=True, official_release=False, | |
| 271 build_toolchain=True, | |
| 272 just_trusted=False, | |
| 273 target='opt-linux,nacl,doc', | |
| 274 test_target='opt-linux', | |
| 275 tests=[ | |
| 276 'nacl_utman_arm_tests', | |
| 277 'nacl_utman_x86_32_tests', | |
| 278 'nacl_utman_x86_64_tests', | |
| 279 ], | |
| 280 options=nacl_factory.linux_marm_narm_options['opt'], | |
| 281 factory_properties={ | |
| 282 'archive_build': True, | |
| 283 'archive_src': 'native_client/arm-untrusted.tgz', | |
| 284 'archive_dst_base': toolchain_archive_dst_base, | |
| 285 'archive_dst': ToolchainArchiveDst('linux_arm-untrusted_hardy64'), | |
| 286 'archive_dst_latest': ToolchainArchiveDstLatest( | |
| 287 'linux_arm-untrusted_hardy64'), | |
| 288 'gclient_timeout': 1200, | |
| 289 })]) | |
| 290 factories.append(['lucid32-toolchain_arm-untrusted', '1Toolchain|info', F_ARM( | |
| 291 'lucid32-toolchain_arm-untrusted', clobber=True, official_release=False, | |
| 292 build_toolchain=True, | |
| 293 just_trusted=False, | |
| 294 target='opt-linux,nacl,doc', | |
| 295 test_target='opt-linux', | |
| 296 tests=[ | |
| 297 'nacl_utman_x86_32_tests', | |
| 298 ], | |
| 299 options=nacl_factory.linux_marm_narm_options['opt'], | |
| 300 factory_properties={ | |
| 301 'archive_build': True, | |
| 302 'archive_src': 'native_client/arm-untrusted.tgz', | |
| 303 'archive_dst_base': toolchain_archive_dst_base, | |
| 304 'archive_dst': ToolchainArchiveDst('linux_arm-untrusted'), | |
| 305 'archive_dst_latest': ToolchainArchiveDstLatest('linux_arm-untrusted'), | |
| 306 'gclient_timeout': 1200, | |
| 307 })]) | |
| 308 | |
| 309 # glibc | |
| 310 factories.append(['hardy64-glibc', '1Toolchain|info', F_LINUX_GLIBC( | |
| 311 'hardy64-glibc', clobber=True)]) | |
| 312 | |
| 313 | |
| 314 ####### SCHEDULERS | |
| 315 ## configure the Schedulers | |
| 316 # Main scheduler for all changes in trunk. | |
| 317 primary_builders = [] | |
| 318 for f in factories: | |
| 319 primary_builders.append(f[0]) | |
| 320 s_nacl = Scheduler( | |
| 321 name='nacl', | |
| 322 branch='native_client', | |
| 323 treeStableTimer=60, | |
| 324 builderNames=primary_builders, | |
| 325 ) | |
| 326 c['schedulers'] = [ | |
| 327 s_nacl, | |
| 328 ] | |
| 329 | |
| 330 | |
| 331 # ---------------------------------------------------------------------------- | |
| 332 # BUILDER DEFINITIONS | |
| 333 | |
| 334 # The 'builders' list defines the Builders. Each one is configured with a | |
| 335 # dictionary, using the following keys: | |
| 336 # name (required): the name used to describe this bilder | |
| 337 # slavename (required): which slave to use, must appear in c['slaves'] | |
| 338 # builddir (required): which subdirectory to run the builder in | |
| 339 # factory (required): a BuildFactory to define how the build is run | |
| 340 # periodicBuildTime (optional): if set, force a build every N seconds | |
| 341 # category (optional): it is not used in the normal 'buildbot' meaning. It is | |
| 342 # used by gatekeeper to determine which steps it should | |
| 343 # look for to close the tree. | |
| 344 # | |
| 345 | |
| 346 c['builders'] = [] | |
| 347 slaves = slaves_list.SlavesList('slaves.cfg', 'NativeClientToolchain') | |
| 348 for f in factories: | |
| 349 # Don't enable auto_reboot for people testing locally. | |
| 350 auto_reboot = (f[0] != 'win2003-toolchain_x86' and | |
| 351 ActiveMaster.is_production_host) | |
| 352 c['builders'].append({ | |
| 353 'name': f[0], | |
| 354 'slavenames': slaves.GetSlavesName(builder=f[0]), | |
| 355 'builddir': f[0], | |
| 356 'factory': f[2], | |
| 357 'category': '%s' % f[1], | |
| 358 'auto_reboot': auto_reboot, | |
| 359 }) | |
| 360 | |
| 361 | |
| 362 ####### BUILDSLAVES | |
| 363 | |
| 364 # The 'slaves' list defines the set of allowable buildslaves. List all the | |
| 365 # slaves registered to a builder. Remove dupes. | |
| 366 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], | |
| 367 config.Master.GetBotPassword()) | |
| 368 | |
| 369 # Make sure everything works together. | |
| 370 master_utils.VerifySetup(c, slaves) | |
| 371 | |
| 372 | |
| 373 ####### STATUS TARGETS | |
| 374 | |
| 375 # Adds common status and tools to this master. | |
| 376 master_utils.AutoSetupMaster(c, ActiveMaster) | |
| 377 | |
| 378 # Add more. | |
| 379 | |
| 380 if TREE_GATE_KEEPER: | |
| 381 import gatekeeper | |
| 382 # This is the list of the builder categories and the corresponding critical | |
| 383 # steps. If one critical step fails, gatekeeper will close the tree | |
| 384 # automatically. | |
| 385 categories_steps = { | |
| 386 '': [ | |
| 387 'update scripts', 'update', | |
| 388 'clobber', 'clobber_packages', | |
| 389 ], | |
| 390 'info': [], | |
| 391 'closer': [ | |
| 392 'update scripts', 'update', | |
| 393 'clobber', 'clobber_packages', 'precompile', 'compile', | |
| 394 'scons_compile', 'gyp_compile', 'build_packages', | |
| 395 'cooking_tarball', 'selenium', | |
| 396 'small_tests', 'medium_tests', 'large_tests', | |
| 397 'hand_tests', 'smoke_tests', | |
| 398 'backup_plugin', 'install_plugin', 'start_vncserver', | |
| 399 'stop_vncserver', 'restore_plugin'], | |
| 400 } | |
| 401 exclusions = { } | |
| 402 forgiving_steps = ['update scripts', 'update', 'svnkill', 'taskkill', | |
| 403 'archived build'] | |
| 404 c['status'].append(gatekeeper.GateKeeper( | |
| 405 fromaddr=ActiveMaster.from_address, | |
| 406 categories_steps=categories_steps, | |
| 407 exclusions=exclusions, | |
| 408 relayhost=config.Master.smtp, | |
| 409 subject='buildbot %(result)s in %(projectName)s on %(builder)s, ' | |
| 410 'revision %(revision)s', | |
| 411 extraRecipients=ActiveMaster.tree_closing_notification_recipients, | |
| 412 tree_status_url=ActiveMaster.tree_status_url, | |
| 413 lookup=master_utils.FilterDomain(), | |
| 414 forgiving_steps=forgiving_steps)) | |
| 415 | |
| 416 if GOOD_REVISIONS: | |
| 417 import goodrevisions | |
| 418 # This is the list of builders with their respective list of critical steps | |
| 419 # that all need to succeed to mark a revision as successful. A single failure | |
| 420 # in any of the steps of any of the builders will mark the revision as failed. | |
| 421 all_steps = [ | |
| 422 'update', | |
| 423 'compile', | |
| 424 'small_tests', | |
| 425 'medium_tests', | |
| 426 'large_tests', | |
| 427 ] | |
| 428 c['status'].append(goodrevisions.GoodRevisions( | |
| 429 good_revision_steps={'': all_steps}, | |
| 430 store_revisions_url=ActiveMaster.store_revisions_url)) | |
| 431 | |
| 432 | |
| 433 ####### PROJECT IDENTITY | |
| 434 | |
| 435 # Buildbot master url: | |
| 436 c['buildbotURL'] = 'http://buildbot.jail.google.com/buildbot/nacl/' | |
| OLD | NEW |