| OLD | NEW |
| 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 contextlib import contextmanager | 5 from contextlib import contextmanager |
| 6 from recipe_engine import recipe_api | 6 from recipe_engine import recipe_api |
| 7 from recipe_engine.types import freeze | 7 from recipe_engine.types import freeze |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'chromium', | 10 'chromium', |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 'recipe_config': 'main_builder_rel_mb', | 48 'recipe_config': 'main_builder_rel_mb', |
| 49 'gclient_apply_config': ['android', 'perf'], | 49 'gclient_apply_config': ['android', 'perf'], |
| 50 'kwargs': { | 50 'kwargs': { |
| 51 'BUILD_CONFIG': 'Release', | 51 'BUILD_CONFIG': 'Release', |
| 52 }, | 52 }, |
| 53 'upload': { | 53 'upload': { |
| 54 'bucket': 'chrome-perf', | 54 'bucket': 'chrome-perf', |
| 55 'path': lambda api: ('Android Builder/full-build-linux_%s.zip' | 55 'path': lambda api: ('Android Builder/full-build-linux_%s.zip' |
| 56 % api.properties['revision']), | 56 % api.properties['revision']), |
| 57 }, | 57 }, |
| 58 'resource_sizes_apks': ['ChromePublic.apk', 'SystemWebView.apk'], |
| 58 'run_mb': True, | 59 'run_mb': True, |
| 59 'targets': [ | 60 'targets': [ |
| 60 'android_tools', | 61 'android_tools', |
| 61 'cc_perftests', | 62 'cc_perftests', |
| 62 'chrome_public_apk', | 63 'chrome_public_apk', |
| 63 'gpu_perftests', | 64 'gpu_perftests', |
| 64 'push_apps_to_background_apk', | 65 'push_apps_to_background_apk', |
| 65 'system_webview_apk', | 66 'system_webview_apk', |
| 66 'system_webview_shell_apk', | 67 'system_webview_shell_apk', |
| 67 ], | 68 ], |
| (...skipping 13 matching lines...) Expand all Loading... |
| 81 'gclient_apply_config': ['android', 'perf'], | 82 'gclient_apply_config': ['android', 'perf'], |
| 82 'kwargs': { | 83 'kwargs': { |
| 83 'BUILD_CONFIG': 'Release', | 84 'BUILD_CONFIG': 'Release', |
| 84 }, | 85 }, |
| 85 'upload': { | 86 'upload': { |
| 86 'bucket': 'chrome-perf', | 87 'bucket': 'chrome-perf', |
| 87 'path': lambda api: ( | 88 'path': lambda api: ( |
| 88 'Android arm64 Builder/full-build-linux_%s.zip' | 89 'Android arm64 Builder/full-build-linux_%s.zip' |
| 89 % api.properties['revision']), | 90 % api.properties['revision']), |
| 90 }, | 91 }, |
| 92 'resource_sizes_apks': ['ChromePublic.apk', 'SystemWebView.apk'], |
| 91 'run_mb': True, | 93 'run_mb': True, |
| 92 'targets': [ | 94 'targets': [ |
| 93 'android_tools', | 95 'android_tools', |
| 94 'cc_perftests', | 96 'cc_perftests', |
| 95 'chrome_public_apk', | 97 'chrome_public_apk', |
| 96 'gpu_perftests', | 98 'gpu_perftests', |
| 97 'push_apps_to_background_apk', | 99 'push_apps_to_background_apk', |
| 98 'system_webview_apk', | 100 'system_webview_apk', |
| 99 'system_webview_shell_apk', | 101 'system_webview_shell_apk', |
| 100 ], | 102 ], |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 api.chromium.runhooks() | 207 api.chromium.runhooks() |
| 206 | 208 |
| 207 if bot_config.get('run_mb'): | 209 if bot_config.get('run_mb'): |
| 208 api.chromium.run_mb(mastername, buildername, use_goma=True) | 210 api.chromium.run_mb(mastername, buildername, use_goma=True) |
| 209 | 211 |
| 210 if bot_config.get('check_licenses'): | 212 if bot_config.get('check_licenses'): |
| 211 with bot_config['check_licenses'](): | 213 with bot_config['check_licenses'](): |
| 212 droid.check_webview_licenses() | 214 droid.check_webview_licenses() |
| 213 api.chromium.compile(bot_config.get('targets')) | 215 api.chromium.compile(bot_config.get('targets')) |
| 214 | 216 |
| 217 for apk_name in bot_config.get('resource_sizes_apks', ()): |
| 218 apk_path = api.chromium_android.apk_path(apk_name) |
| 219 api.chromium_android.resource_sizes(apk_path, chartjson_file=True) |
| 220 |
| 215 upload_config = bot_config.get('upload') | 221 upload_config = bot_config.get('upload') |
| 216 if upload_config: | 222 if upload_config: |
| 217 droid.upload_build(upload_config['bucket'], | 223 droid.upload_build(upload_config['bucket'], |
| 218 upload_config['path'](api)) | 224 upload_config['path'](api)) |
| 219 | 225 |
| 220 upload_config = bot_config.get('zip_and_upload') | 226 upload_config = bot_config.get('zip_and_upload') |
| 221 if upload_config: | 227 if upload_config: |
| 222 droid.zip_and_upload_build(upload_config['bucket']) | 228 droid.zip_and_upload_build(upload_config['bucket']) |
| 223 | 229 |
| 224 if 'triggers' in bot_config: | 230 if 'triggers' in bot_config: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 '_'.join(_sanitize_nonalpha(step) for step in steps))) + | 270 '_'.join(_sanitize_nonalpha(step) for step in steps))) + |
| 265 props(mastername=mastername, buildername=buildername) + | 271 props(mastername=mastername, buildername=buildername) + |
| 266 reduce(lambda a, b: a + b, | 272 reduce(lambda a, b: a + b, |
| 267 (api.step_data(step, retcode=1) for step in steps)) | 273 (api.step_data(step, retcode=1) for step in steps)) |
| 268 ) | 274 ) |
| 269 | 275 |
| 270 yield step_failure(mastername='chromium.android', | 276 yield step_failure(mastername='chromium.android', |
| 271 buildername='Android x64 Builder (dbg)', | 277 buildername='Android x64 Builder (dbg)', |
| 272 steps=['check licenses']) | 278 steps=['check licenses']) |
| 273 | 279 |
| OLD | NEW |