blob: d65892acf6912424938c87ccabfa033c3a8edbe4 [file] [log] [blame]
#!/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/helpers.star", "helpers")
load("//lib/repos.star", "repos")
load("//lib/ci_yaml/ci_yaml.star", "ci_yaml")
def _setup():
luci.recipe(
name = "ios-usb-dependencies",
cipd_package = "flutter/recipe_bundles/flutter.googlesource.com/recipes",
cipd_version = "refs/heads/main",
use_bbagent = True,
)
iostools_prod_config()
def ios_tools_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)
luci.gitiles_poller(
name = "gitiles-trigger-%s" % builder,
bucket = "prod",
refs = ["refs/heads/master"],
repo = repo,
triggers = [builder],
)
# 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 = helpers.merge_dicts(
platform_properties[platform_key],
{"package_name": builder + "-flutter"},
)
common.mac_prod_builder(
name = name,
repo = repo,
recipe = "ios-usb-dependencies",
console_view_name = builder,
caches = ci_yaml.swarming_caches(ci_yaml_config, None, platform_key),
properties = properties,
os = platform_properties[platform_key]["os"],
triggering_policy = scheduler.greedy_batching(
max_concurrent_invocations = 1,
),
)
def iostools_prod_config():
"""Creates prod configurations for iostools."""
ios_tools_builder(
name = "ideviceinstaller|idev",
repo = repos.IDEVICEINSTALLER,
)
ios_tools_builder(
name = "libimobiledevice|libi",
repo = repos.LIBIMOBILEDEVICE,
)
ios_tools_builder(name = "libplist|plist", repo = repos.LIBPLIST)
ios_tools_builder(name = "usbmuxd|usbmd", repo = repos.USBMUXD)
ios_tools_builder(name = "openssl|ssl", repo = repos.OPENSSL)
ios_tools_builder(name = "ios-deploy|deploy", repo = repos.IOS_DEPLOY)
ios_tools_builder(name = "libzip|zip", repo = repos.LIBZIP)
iostools_config = struct(setup = _setup)