| #!/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 the flutter framework repository (flutter/flutter). |
| |
| 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. |
| |
| Try jobs use github directly but are also registered with luci-cq |
| to take advantage of led recipe builder tests. |
| """ |
| |
| load("//lib/ci_yaml/ci_yaml.star", "ci_yaml") |
| load("//lib/common.star", "common") |
| load("//lib/release_branches/release_branches.star", "release_branches") |
| load("//lib/repos.star", "repos") |
| |
| def _flutter_properties(): |
| properties = { |
| "use_cas": True, |
| } |
| return properties |
| |
| def _setup(): |
| """Default configurations for branches and repos.""" |
| master_triggering_policy = scheduler.greedy_batching( |
| max_batch_size = 6, |
| max_concurrent_invocations = 1, |
| ) |
| release_triggering_policy = scheduler.greedy_batching( |
| max_batch_size = 1, |
| max_concurrent_invocations = 3, |
| ) |
| ci_yaml.generate( |
| "flutter", |
| "stable", |
| release_branches.stable.version, |
| release_branches.stable.testing_ref, |
| {}, |
| _flutter_properties(), |
| release_triggering_policy, |
| recipes_ref = release_branches.stable.recipes_ref, |
| ) |
| _drone_prod_builders("stable-") |
| ci_yaml.generate( |
| "flutter", |
| "beta", |
| release_branches.beta.version, |
| release_branches.beta.testing_ref, |
| {}, |
| _flutter_properties(), |
| release_triggering_policy, |
| recipes_ref = release_branches.beta.recipes_ref, |
| ) |
| _drone_prod_builders("beta-") |
| ci_yaml.generate( |
| "flutter", |
| "master", |
| release_branches.master.version, |
| release_branches.master.testing_ref, |
| {}, |
| _flutter_properties(), |
| master_triggering_policy, |
| recipes_ref = release_branches.master.recipes_ref, |
| ) |
| _drone_prod_builders("") |
| _drone_try_builders() |
| |
| def _drone_prod_builders(prefix): |
| """Generate drone builders to help with subshards.""" |
| recipes = ["flutter/flutter_drone", "devicelab/devicelab_test_drone"] |
| for recipe in recipes: |
| luci.recipe( |
| name = "%s%s" % (prefix, recipe), |
| recipe = recipe, |
| cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes", |
| cipd_version = "refs/heads/main", |
| use_bbagent = True, |
| ) |
| ci_yaml_config = ci_yaml.ci_yaml("flutter", "master") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| common.linux_prod_builder( |
| name = "%sLinux SDK Drone" % prefix, |
| recipe = "flutter/flutter_drone", |
| console_view_name = None, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "linux"), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["linux"]["os"], |
| ) |
| common.linux_prod_builder( |
| name = "%sLinux Devicelab Test Drone" % prefix, |
| recipe = "devicelab/devicelab_test_drone", |
| console_view_name = None, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "linux_android"), |
| dimensions = {"device_type": "msm8952"}, |
| os = platform_properties["linux_android"]["os"], |
| # Uploads metrics only for master/main branches, where prefix is empty. |
| properties = {"upload_metrics": True} if not prefix else {}, |
| ) |
| common.mac_prod_builder( |
| name = "%sMac SDK Drone" % prefix, |
| recipe = "flutter/flutter_drone", |
| console_view_name = None, |
| dimensions = {"device_type": "none"}, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "mac"), |
| os = platform_properties["mac"]["os"], |
| ) |
| common.windows_prod_builder( |
| name = "%sWindows SDK Drone" % prefix, |
| recipe = "flutter/flutter_drone", |
| console_view_name = None, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "windows"), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["windows"]["os"], |
| ) |
| |
| def _drone_try_builders(): |
| """Generate drone builders to help with subshards.""" |
| list_view_name = "flutter-try" |
| ci_yaml_config = ci_yaml.ci_yaml("flutter", "master") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| common.linux_try_builder( |
| name = "Linux SDK Drone|drn", |
| recipe = "flutter/flutter_drone", |
| repo = repos.GIT_REMOTE["flutter"], |
| list_view_name = list_view_name, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "linux"), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["linux"]["os"], |
| ) |
| common.mac_try_builder( |
| name = "Mac SDK Drone|drn", |
| recipe = "flutter/flutter_drone", |
| repo = repos.GIT_REMOTE["flutter"], |
| list_view_name = list_view_name, |
| dimensions = {"device_type": "none"}, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "mac"), |
| os = platform_properties["mac"]["os"], |
| ) |
| common.windows_try_builder( |
| name = "Windows SDK Drone|drn", |
| recipe = "flutter/flutter_drone", |
| repo = repos.GIT_REMOTE["flutter"], |
| list_view_name = list_view_name, |
| caches = ci_yaml.legacy_swarming_caches(ci_yaml_config, None, "windows"), |
| dimensions = {"device_type": "none"}, |
| os = platform_properties["windows"]["os"], |
| ) |
| |
| flutter_config = struct(setup = _setup) |