| #!/usr/bin/env lucicfg |
| # Copyright 2020 The Flutter Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """ |
| Configurations for devicelab staging tests. |
| |
| The schedulers pull commits indirectly from GoB repo (https://chromium.googlesource.com/external/github.com/flutter/flutter) |
| which is mirrored from https://github.com/flutter/flutter. |
| """ |
| |
| load("//lib/common.star", "common") |
| load("//lib/repos.star", "repos") |
| load("//lib/timeout.star", "timeout") |
| |
| # Global OS variables |
| MAC_OS = "Mac" |
| |
| # Default caches for Linux builders |
| LINUX_DEFAULT_CACHES = [ |
| # Android SDK |
| swarming.cache(name = "android_sdk", path = "android"), |
| # Chrome |
| swarming.cache(name = "chrome_and_driver", path = "chrome"), |
| # OpenJDK |
| swarming.cache(name = "openjdk", path = "java"), |
| # PubCache |
| swarming.cache(name = "pub_cache", path = ".pub-cache"), |
| # Flutter SDK code |
| swarming.cache(name = "flutter_sdk", path = "flutter sdk"), |
| # Builder |
| swarming.cache(name = "builder_linux_devicelab_staging", path = "builder"), |
| ] |
| |
| # Default caches for Mac android builders |
| MAC_ANDROID_DEFAULT_CACHES = [ |
| # Android SDK |
| swarming.cache(name = "android_sdk", path = "android"), |
| # Chrome |
| swarming.cache(name = "chrome_and_driver", path = "chrome"), |
| # OpenJDK |
| swarming.cache(name = "openjdk", path = "java"), |
| # PubCache |
| swarming.cache(name = "pub_cache", path = ".pub-cache"), |
| # Flutter SDK code |
| swarming.cache(name = "flutter_sdk", path = "flutter sdk"), |
| # Builder |
| swarming.cache(name = "builder_mac_devicelab_staging", path = "builder"), |
| ] |
| |
| # Default caches for Mac builders |
| MAC_DEFAULT_CACHES = [ |
| # Pub cache |
| swarming.cache(name = "pub_cache", path = ".pub-cache"), |
| # Flutter SDK code |
| swarming.cache(name = "flutter_sdk", path = "flutter sdk"), |
| # Xcode |
| swarming.cache("xcode_binary"), |
| swarming.cache("osx_sdk"), |
| # Builder |
| swarming.cache(name = "builder_mac_devicelab_staging", path = "builder"), |
| ] |
| |
| def _setup(): |
| devicelab_staging_prod_config() |
| |
| def short_name(task_name): |
| """Create a short name for task name.""" |
| task_name = task_name.replace("__", "_") |
| words = task_name.split("_") |
| return "".join([w[0] for w in words])[:5] |
| |
| def devicelab_staging_prod_config(): |
| """Staging configurations for the framework repository.""" |
| drone_recipe_name = "devicelab/devicelab_drone" |
| luci.recipe( |
| name = drone_recipe_name, |
| cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes", |
| cipd_version = "refs/heads/master", |
| use_bbagent = True, |
| ) |
| |
| # Defines console views. |
| console_view_name = "devicelab_staging" |
| luci.console_view( |
| name = console_view_name, |
| repo = repos.FLUTTER, |
| refs = [r"refs/heads/master"], |
| ) |
| |
| # Defines schedulers for staging builders. |
| trigger_name = "master-gitiles-trigger-devicelab-staging" |
| luci.gitiles_poller( |
| name = trigger_name, |
| bucket = "prod", |
| repo = repos.FLUTTER, |
| refs = [r"refs/heads/master"], |
| ) |
| |
| # Defines triggering policy |
| triggering_policy = scheduler.greedy_batching( |
| max_batch_size = 20, |
| max_concurrent_invocations = 1, |
| ) |
| # Defines framework prod builders |
| |
| # Mac prod builders. |
| mac_ios_tasks = [ |
| "backdrop_filter_perf_ios__timeline_summary", |
| "basic_material_app_ios__compile", |
| "channels_integration_test_ios", |
| "complex_layout_ios__compile", |
| "complex_layout_ios__start_up", |
| "complex_layout_scroll_perf_ios__timeline_summary", |
| "external_ui_integration_test_ios", |
| "flavors_test_ios", |
| "flutter_gallery__transition_perf_e2e_ios", |
| "flutter_gallery_ios__compile", |
| "flutter_gallery_ios__start_up", |
| "flutter_gallery_ios__transition_perf", |
| "flutter_view_ios__start_up", |
| "hello_world_ios__compile", |
| "hot_mode_dev_cycle_macos_target__benchmark", |
| "integration_test_test_ios", |
| "integration_ui_ios_driver", |
| "integration_ui_ios_frame_number", |
| "integration_ui_ios_keyboard_resize", |
| "integration_ui_ios_screenshot", |
| "integration_ui_ios_textfield", |
| "ios_app_with_extensions_test", |
| "ios_content_validation_test", |
| "ios_defines_test", |
| "ios_platform_view_tests", |
| "large_image_changer_perf_ios", |
| "macos_chrome_dev_mode", |
| "microbenchmarks_ios", |
| "new_gallery_ios__transition_perf", |
| "platform_channel_sample_test_ios", |
| "platform_channel_sample_test_swift", |
| "platform_interaction_test_ios", |
| "platform_view_ios__start_up", |
| "platform_views_scroll_perf_ios__timeline_summary", |
| "post_backdrop_filter_perf_ios__timeline_summary", |
| "simple_animation_perf_ios", |
| "smoke_catalina_hot_mode_dev_cycle_ios__benchmark", |
| "tiles_scroll_perf_ios__timeline_summary", |
| ] |
| for task in mac_ios_tasks: |
| common.mac_prod_builder( |
| name = "Mac_ios_staging %s|%s" % (task, short_name(task)), |
| recipe = drone_recipe_name, |
| console_view_name = console_view_name, |
| triggered_by = [trigger_name], |
| triggering_policy = triggering_policy, |
| properties = { |
| "$flutter/devicelab_osx_sdk": { |
| "sdk_version": "12c33", # 12.3 |
| }, |
| "dependencies": [ |
| { |
| "dependency": "xcode", |
| }, |
| { |
| "dependency": "gems", |
| }, |
| { |
| "dependency": "ios_signing", |
| }, |
| ], |
| "task_name": task, |
| "use_cas": True, |
| }, |
| pool = "luci.flutter.staging", |
| os = MAC_OS, |
| category = "Mac_ios", |
| dimensions = {"device_os": "iOS-14.4.2"}, |
| execution_timeout = timeout.LONG, |
| expiration_timeout = timeout.LONG_EXPIRATION, |
| caches = MAC_DEFAULT_CACHES, |
| ) |
| |
| mac_android_tasks = [ |
| "android_semantics_integration_test", |
| "backdrop_filter_perf__timeline_summary", |
| "channels_integration_test", |
| "color_filter_and_fade_perf__timeline_summary", |
| "complex_layout_scroll_perf__memory", |
| "complex_layout_scroll_perf__timeline_summary", |
| "complex_layout__start_up", |
| "cubic_bezier_perf_sksl_warmup__timeline_summary", |
| "cubic_bezier_perf__timeline_summary", |
| "cull_opacity_perf__timeline_summary", |
| "drive_perf_debug_warning", |
| "embedded_android_views_integration_test", |
| "external_ui_integration_test", |
| "fading_child_animation_perf__timeline_summary", |
| "fast_scroll_large_images__memory", |
| "flavors_test", |
| "flutter_view__start_up", |
| "fullscreen_textfield_perf__timeline_summary", |
| "hello_world_android__compile", |
| "hello_world__memory", |
| "home_scroll_perf__timeline_summary", |
| "hot_mode_dev_cycle__benchmark", |
| "hybrid_android_views_integration_test", |
| "imagefiltered_transform_animation_perf__timeline_summary", |
| "integration_test_test", |
| "integration_ui_driver", |
| "integration_ui_frame_number", |
| "integration_ui_keyboard_resize", |
| "integration_ui_screenshot", |
| "integration_ui_textfield", |
| "microbenchmarks", |
| "new_gallery__transition_perf", |
| "picture_cache_perf__timeline_summary", |
| "platform_channel_sample_test", |
| "platform_interaction_test", |
| "platform_view__start_up", |
| "run_release_test", |
| "service_extensions_test", |
| "textfield_perf__timeline_summary", |
| "tiles_scroll_perf__timeline_summary", |
| ] |
| |
| for task in mac_android_tasks: |
| common.mac_prod_builder( |
| name = "Mac_android_staging %s|%s" % (task, short_name(task)), |
| recipe = drone_recipe_name, |
| console_view_name = console_view_name, |
| triggered_by = [trigger_name], |
| triggering_policy = triggering_policy, |
| properties = { |
| "dependencies": [ |
| { |
| "dependency": "android_sdk", |
| }, |
| { |
| "dependency": "chrome_and_driver", |
| }, |
| { |
| "dependency": "open_jdk", |
| }, |
| ], |
| "task_name": task, |
| "use_cas": True, |
| }, |
| pool = "luci.flutter.staging", |
| os = MAC_OS, |
| category = "Mac_android", |
| dimensions = {"device_os": "N"}, |
| expiration_timeout = timeout.LONG_EXPIRATION, |
| execution_timeout = timeout.SHORT, |
| caches = MAC_ANDROID_DEFAULT_CACHES, |
| ) |
| |
| # Linux prod builders. |
| linux_tasks = [ |
| "analyzer_benchmark", |
| "android_defines_test", |
| "android_obfuscate_test", |
| "android_view_scroll_perf__timeline_summary", |
| "animated_placeholder_perf__e2e_summary", |
| ] |
| |
| for task in linux_tasks: |
| common.linux_prod_builder( |
| name = "Linux_staging %s|%s" % (task, short_name(task)), |
| recipe = drone_recipe_name, |
| console_view_name = console_view_name, |
| triggered_by = [trigger_name], |
| triggering_policy = triggering_policy, |
| properties = { |
| "dependencies": [ |
| { |
| "dependency": "android_sdk", |
| }, |
| { |
| "dependency": "chrome_and_driver", |
| }, |
| { |
| "dependency": "open_jdk", |
| }, |
| { |
| "dependency": "curl", |
| }, |
| ], |
| "task_name": task, |
| "use_cas": True, |
| }, |
| pool = "luci.flutter.staging", |
| os = "Android", |
| dimensions = {"device_os": "N"}, |
| expiration_timeout = timeout.LONG_EXPIRATION, |
| caches = LINUX_DEFAULT_CACHES, |
| ) |
| |
| # Windows prod builders. |
| win_tasks = [ |
| "complex_layout_win__compile", |
| "basic_material_app_win__compile", |
| "flutter_gallery_win__compile", |
| "windows_chrome_dev_mode", |
| "flavors_test_win", |
| "channels_integration_test_win", |
| "hot_mode_dev_cycle_win__benchmark", |
| ] |
| |
| for task in win_tasks: |
| common.windows_prod_builder( |
| name = "Windows_staging %s|%s" % (task, short_name(task)), |
| recipe = drone_recipe_name, |
| console_view_name = console_view_name, |
| triggered_by = [trigger_name], |
| triggering_policy = triggering_policy, |
| properties = { |
| "dependencies": [ |
| {"dependency": "android_sdk"}, |
| {"dependency": "chrome_and_driver"}, |
| {"dependency": "open_jdk"}, |
| ], |
| "task_name": task, |
| "use_cas": True, |
| }, |
| pool = "luci.flutter.staging", |
| dimensions = {"device_os": "N"}, |
| os = "Windows-10", |
| ) |
| |
| # Dart HHH Try Builds |
| list_view_name = "devicelab-hhh-try" |
| luci.list_view( |
| name = list_view_name, |
| title = "DeviceLab HHH try builders", |
| ) |
| linux_try_tasks = [ |
| "hot_mode_dev_cycle_linux__benchmark", |
| "flutter_gallery__start_up", |
| "multi_widget_construction_perf__e2e_summary", |
| ] |
| for task in linux_try_tasks: |
| common.linux_try_builder( |
| name = "Linux_staging %s" % task, |
| recipe = drone_recipe_name, |
| list_view_name = list_view_name, |
| properties = { |
| "dependencies": [ |
| { |
| "dependency": "android_sdk", |
| }, |
| { |
| "dependency": "chrome_and_driver", |
| }, |
| { |
| "dependency": "open_jdk", |
| }, |
| { |
| "dependency": "curl", |
| }, |
| ], |
| "task_name": task, |
| "upload_metrics": False, |
| "upload_metrics_to_cas": True, |
| "use_cas": True, |
| "attached_device": True, |
| }, |
| os = "Android", |
| dimensions = {"device_os": "N"}, |
| execution_timeout = timeout.MEDIUM, |
| caches = LINUX_DEFAULT_CACHES, |
| category = "Linux_android", |
| pool = "luci.flutter.staging", |
| repo = repos.FLUTTER, |
| ) |
| |
| devicelab_staging_config = struct(setup = _setup) |