| #!/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 ios_tool builders. |
| |
| The schedulers for ios_tool builds use GoB flutter mirrors |
| (https://flutter-mirrors.googlesource.com/). |
| """ |
| |
| load("//lib/common.star", "common") |
| load("//lib/consoles.star", "consoles") |
| load("//lib/ci_yaml/ci_yaml.star", "ci_yaml") |
| |
| def _setup(): |
| luci.recipe( |
| name = "ios_usb_dependencies/ios-usb-dependencies", |
| cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes", |
| cipd_version = "refs/heads/main", |
| use_bbagent = True, |
| ) |
| |
| # A virtual repo is added as we are not relying on repos. |
| # The builder is scheduled periodially. |
| ios_usb_dependencies_builder( |
| name = "ios-usb-dependencies|iud", |
| repo = "https://ios-usb-dependencies", |
| ) |
| |
| def ios_usb_dependencies_builder(name, repo): |
| """Creates configurations for ios tool builders. |
| |
| Args: |
| name(str): The name of the tool repository. |
| repo(str): The url of the repository. |
| """ |
| builder = name.split("|")[0] |
| consoles.console_view(builder, repo) |
| |
| # re-use the config from the framework |
| ci_yaml_config = ci_yaml.ci_yaml("flutter", "master") |
| platform_properties = ci_yaml.platform_properties(ci_yaml_config) |
| |
| # The "mac_ios" shards will have the latest Xcode version |
| platform_key = "mac_ios" |
| properties = platform_properties[platform_key] |
| |
| common.mac_prod_builder( |
| name = name, |
| repo = repo, |
| recipe = "ios_usb_dependencies/ios-usb-dependencies", |
| console_view_name = builder, |
| caches = ci_yaml.swarming_caches("flutter", "master"), |
| properties = properties, |
| os = platform_properties[platform_key]["os"], |
| dimensions = {"device_os": "iOS-16", "cpu": "x86"}, |
| triggering_policy = scheduler.greedy_batching( |
| max_concurrent_invocations = 1, |
| ), |
| schedule = "7 2 * * 1", |
| ) |
| |
| iostools_config = struct(setup = _setup) |