Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: scripts/slave/recipes/chromium_pgo.py

Issue 2033513002: recipes: Switch from 3 ways for requesting clobber builds to 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: presubmit2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from recipe_engine.types import freeze 5 from recipe_engine.types import freeze
6 6
7 DEPS = [ 7 DEPS = [
8 'archive', 8 'archive',
9 'chromium', 9 'chromium',
10 'pgo', 10 'pgo',
11 'recipe_engine/platform', 11 'recipe_engine/platform',
12 'recipe_engine/properties', 12 'recipe_engine/properties',
13 'recipe_engine/step', 13 'recipe_engine/step',
14 ] 14 ]
15 15
16 16
17 PGO_BUILDERS = freeze({ 17 PGO_BUILDERS = freeze({
18 'chromium.fyi': { 18 'chromium.fyi': {
19 'Chromium Win PGO Builder': { 19 'builders': {
20 'recipe_config': 'chromium', 20 'Chromium Win PGO Builder': {
21 'chromium_config_instrument': 'chromium_pgo_instrument', 21 'recipe_config': 'chromium',
22 'chromium_config_optimize': 'chromium_pgo_optimize', 22 'chromium_config_instrument': 'chromium_pgo_instrument',
23 'gclient_config': 'chromium', 23 'chromium_config_optimize': 'chromium_pgo_optimize',
24 'clobber': True, 24 'gclient_config': 'chromium',
25 'chromium_config_kwargs': { 25 'chromium_config_kwargs': {
26 'BUILD_CONFIG': 'Release', 26 'BUILD_CONFIG': 'Release',
27 'TARGET_BITS': 32, 27 'TARGET_BITS': 32,
28 },
29 'testing': { 'platform': 'win' },
28 }, 30 },
29 'testing': { 31 'Chromium Win x64 PGO Builder': {
30 'platform': 'win', 32 'recipe_config': 'chromium',
31 }, 33 'chromium_config_instrument': 'chromium_pgo_instrument',
32 }, 34 'chromium_config_optimize': 'chromium_pgo_optimize',
33 'Chromium Win x64 PGO Builder': { 35 'gclient_config': 'chromium',
34 'recipe_config': 'chromium', 36 'chromium_config_kwargs': {
35 'chromium_config_instrument': 'chromium_pgo_instrument', 37 'BUILD_CONFIG': 'Release',
36 'chromium_config_optimize': 'chromium_pgo_optimize', 38 'TARGET_BITS': 64,
37 'gclient_config': 'chromium', 39 },
38 'clobber': True,
39 'chromium_config_kwargs': {
40 'BUILD_CONFIG': 'Release',
41 'TARGET_BITS': 64,
42 }, 40 },
43 }, 41 },
44 }, 42 },
45 'tryserver.chromium.win': { 43 'tryserver.chromium.win': {
46 'win_pgo': { 44 'builders': {
47 'recipe_config': 'chromium', 45 'win_pgo': {
48 'chromium_config_instrument': 'chromium_pgo_instrument', 46 'recipe_config': 'chromium',
49 'chromium_config_optimize': 'chromium_pgo_optimize', 47 'chromium_config_instrument': 'chromium_pgo_instrument',
50 'gclient_config': 'chromium', 48 'chromium_config_optimize': 'chromium_pgo_optimize',
51 'chromium_config_kwargs': { 49 'gclient_config': 'chromium',
52 'BUILD_CONFIG': 'Release', 50 'chromium_config_kwargs': {
53 'TARGET_BITS': 32, 51 'BUILD_CONFIG': 'Release',
54 }, 52 'TARGET_BITS': 32,
55 'testing': { 53 },
56 'platform': 'win', 54 'testing': { 'platform': 'win' },
57 }, 55 },
58 }, 56 },
59 }, 57 },
60 }) 58 })
61 59
62 60
63 def RunSteps(api): 61 def RunSteps(api):
64 buildername = api.properties['buildername'] 62 _, bot_config = api.chromium.configure_bot(PGO_BUILDERS, [])
65 mastername = api.properties['mastername']
66 bot_config = PGO_BUILDERS.get(mastername, {}).get(buildername)
67
68 api.pgo.compile_pgo(bot_config) 63 api.pgo.compile_pgo(bot_config)
69 api.archive.zip_and_upload_build( 64 api.archive.zip_and_upload_build(
70 'package build', 65 'package build',
71 api.chromium.c.build_config_fs, 66 api.chromium.c.build_config_fs,
72 'gs://chromium-fyi-archive/win_pgo_builds') 67 'gs://chromium-fyi-archive/win_pgo_builds')
73 68
74 69
75 def GenTests(api): 70 def GenTests(api):
76 def _sanitize_nonalpha(text): 71 for test in api.chromium.gen_tests_for_builders(PGO_BUILDERS):
77 return ''.join(c if c.isalnum() else '_' for c in text) 72 yield test
78
79 for mastername, builders in PGO_BUILDERS.iteritems():
80 for buildername in builders:
81 yield (
82 api.test('full_%s_%s' % (_sanitize_nonalpha(mastername),
83 _sanitize_nonalpha(buildername))) +
84 api.properties.generic(mastername=mastername, buildername=buildername) +
85 api.platform('win', 64)
86 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698