Hash :
d91af7b8
Author :
Date :
2021-07-06T12:17:33
infra/config: remove unused isolated property angle is migrated to RBE-CAS from isolate. Bug: chromium:1224266 Change-Id: Id2ca778edf6b34f5241da0fbfcd86b43941f83b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007600 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
#!/usr/bin/env lucicfg
#
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# main.star: lucicfg configuration for ANGLE's standalone builers.
lucicfg.config(
fail_on_warnings = True,
lint_checks = [
"default",
"-module-docstring",
"-function-docstring",
],
)
# Enable LUCI Realms support.
lucicfg.enable_experiment("crbug.com/1085650")
# Launch 0% of Swarming tasks for builds in "realms-aware mode"
# TODO(https://crbug.com/1204972): ramp up to 100%.
# luci.builder.defaults.experiments.set({"luci.use_realms": 0})
# Enable LUCI Realms support.
lucicfg.enable_experiment("crbug.com/1085650")
# Launch all builds and tasks in Angle in realms mode.
luci.builder.defaults.experiments.set({"luci.use_realms": 100})
luci.project(
name = "angle",
buildbucket = "cr-buildbucket.appspot.com",
logdog = "luci-logdog.appspot.com",
milo = "luci-milo.appspot.com",
notify = "luci-notify.appspot.com",
scheduler = "luci-scheduler.appspot.com",
swarming = "chromium-swarm.appspot.com",
acls = [
acl.entry(
roles = [
acl.PROJECT_CONFIGS_READER,
acl.LOGDOG_READER,
acl.BUILDBUCKET_READER,
acl.SCHEDULER_READER,
],
groups = "all",
),
acl.entry(
roles = [
acl.SCHEDULER_OWNER,
],
groups = "project-angle-admins",
),
acl.entry(
roles = [
acl.LOGDOG_WRITER,
],
groups = "luci-logdog-angle-writers",
),
],
bindings = [
luci.binding(
roles = "role/swarming.poolOwner",
groups = ["project-angle-owners", "mdb/chrome-troopers"],
),
luci.binding(
roles = "role/swarming.poolViewer",
groups = "all",
),
# Allow any Angle build to trigger a test ran under testing accounts
# used on shared chromium tester pools.
luci.binding(
roles = "role/swarming.taskServiceAccount",
users = [
"chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
"chrome-gpu-gold@chops-service-accounts.iam.gserviceaccount.com",
],
),
],
)
# Swarming permissions
luci.realm(name = "pools/ci")
luci.realm(name = "pools/try")
# Allow Angle owners and Chrome troopers to run tasks directly for testing and
# development on all Angle bots. E.g. via `led` tool or "Debug" button in Swarming Web UI.
luci.binding(
realm = "@root",
roles = "role/swarming.poolUser",
groups = ["project-angle-owners", "mdb/chrome-troopers"],
)
luci.binding(
realm = "@root",
roles = "role/swarming.taskTriggerer",
groups = ["project-angle-owners", "mdb/chrome-troopers"],
)
def _generate_project_pyl(ctx):
ctx.output["project.pyl"] = "\n".join([
"# This is a non-LUCI generated file",
"# This is consumed by presubmit checks that need to validate the config",
repr(dict(
# We don't validate matching source-side configs for simplicity.
validate_source_side_specs_have_builder = False,
)),
"",
])
lucicfg.generator(_generate_project_pyl)
luci.milo(
logo = "https://storage.googleapis.com/chrome-infra/OpenGL%20ES_RGB_June16.svg",
monorail_project = "angleproject",
monorail_components = ["Infra"],
)
luci.logdog(gs_bucket = "chromium-luci-logdog")
# The category for an os: a more generic grouping than specific OS versions that
# can be used for computing defaults
os_category = struct(
ANDROID = "Android",
LINUX = "Linux",
MAC = "Mac",
WINDOWS = "Windows",
)
def os_enum(dimension, category, console_name):
return struct(dimension = dimension, category = category, console_name = console_name)
os = struct(
ANDROID = os_enum("Ubuntu", os_category.ANDROID, "android"),
LINUX = os_enum("Ubuntu", os_category.LINUX, "linux"),
MAC = os_enum("Mac", os_category.MAC, "mac"),
WINDOWS = os_enum("Windows", os_category.WINDOWS, "win"),
)
# Recipes
_RECIPE_NAME_PREFIX = "recipe:"
_DEFAULT_BUILDERLESS_OS_CATEGORIES = [os_category.LINUX, os_category.WINDOWS]
_GOMA_RBE_PROD = {
"server_host": "goma.chromium.org",
"rpc_extra_params": "?prod",
}
def _recipe_for_package(cipd_package):
def recipe(*, name, cipd_version = None, recipe = None, use_bbagent = False):
# Force the caller to put the recipe prefix rather than adding it
# programatically to make the string greppable
if not name.startswith(_RECIPE_NAME_PREFIX):
fail("Recipe name {!r} does not start with {!r}"
.format(name, _RECIPE_NAME_PREFIX))
if recipe == None:
recipe = name[len(_RECIPE_NAME_PREFIX):]
return luci.recipe(
name = name,
cipd_package = cipd_package,
cipd_version = cipd_version,
recipe = recipe,
use_bbagent = use_bbagent,
)
return recipe
build_recipe = _recipe_for_package(
"infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
)
build_recipe(
name = "recipe:angle",
)
build_recipe(
name = "recipe:run_presubmit",
)
def get_os_from_name(name):
if name.startswith("android"):
return os.ANDROID
if name.startswith("linux"):
return os.LINUX
if name.startswith("win"):
return os.WINDOWS
if name.startswith("mac"):
return os.MAC
return os.MAC
# Adds both the CI and Try standalone builders.
def angle_builder(name, debug, cpu, toolchain = "clang", uwp = False, test_mode = "compile_and_test"):
properties = {
"builder_group": "angle",
}
config_os = get_os_from_name(name)
dimensions = {}
dimensions["os"] = config_os.dimension
goma_props = {}
goma_props.update(_GOMA_RBE_PROD)
if config_os.category in _DEFAULT_BUILDERLESS_OS_CATEGORIES:
dimensions["builderless"] = "1"
goma_props["enable_ats"] = True
properties["$build/goma"] = goma_props
properties["platform"] = config_os.console_name
properties["toolchain"] = toolchain
if toolchain == "gcc":
properties["test_mode"] = "checkout_only"
elif debug or toolchain == "msvc" or (config_os.category == os_category.ANDROID and cpu == "arm"):
properties["test_mode"] = "compile_only"
else:
properties["test_mode"] = test_mode
luci.builder(
name = name,
bucket = "ci",
triggered_by = ["master-poller"],
executable = "recipe:angle",
service_account = "angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
properties = properties,
dimensions = dimensions,
build_numbers = True,
)
is_perf = "-perf" in name
# Trace tests are only included automatically if files in the capture folder change.
if test_mode == "trace_tests":
config = "trace"
location_regexp = [
".+/[+]/src/libANGLE/capture/.+",
".+/[+]/src/tests/capture.+",
]
elif is_perf:
config = "perf"
else:
config = "angle"
location_regexp = None
if uwp:
os_name = "winuwp"
else:
os_name = config_os.console_name
short_name = "dbg" if debug else "rel"
luci.console_view_entry(
console_view = "ci",
builder = "ci/" + name,
category = config + "|" + os_name + "|" + toolchain + "|" + cpu,
short_name = short_name,
)
# Do not include perf tests in "try".
if not is_perf:
luci.list_view_entry(
list_view = "try",
builder = "try/" + name,
)
luci.builder(
name = name,
bucket = "try",
executable = "recipe:angle",
service_account = "angle-try-builder@chops-service-accounts.iam.gserviceaccount.com",
properties = properties,
dimensions = dimensions,
build_numbers = True,
)
# Include all other bots in the CQ by default except the placeholder GCC configs.
if toolchain != "gcc":
luci.cq_tryjob_verifier(
cq_group = "master",
builder = "angle:try/" + name,
location_regexp = location_regexp,
)
luci.bucket(
name = "ci",
acls = [
acl.entry(
acl.BUILDBUCKET_TRIGGERER,
users = [
"angle-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
],
),
],
)
luci.bucket(
name = "try",
acls = [
acl.entry(
acl.BUILDBUCKET_TRIGGERER,
groups = [
"project-angle-tryjob-access",
"service-account-cq",
],
),
],
)
luci.builder(
name = "presubmit",
bucket = "try",
executable = "recipe:run_presubmit",
service_account = "angle-try-builder@chops-service-accounts.iam.gserviceaccount.com",
build_numbers = True,
dimensions = {
"os": os.LINUX.dimension,
},
properties = {
"repo_name": "angle",
"runhooks": True,
},
)
luci.gitiles_poller(
name = "master-poller",
bucket = "ci",
repo = "https://chromium.googlesource.com/angle/angle",
refs = [
"refs/heads/master",
],
schedule = "with 10s interval",
)
# name, clang, debug, cpu, uwp, trace_tests
angle_builder("android-arm-dbg", debug = True, cpu = "arm")
angle_builder("android-arm-rel", debug = False, cpu = "arm")
angle_builder("android-arm64-dbg", debug = True, cpu = "arm64")
angle_builder("android-arm64-rel", debug = False, cpu = "arm64")
angle_builder("linux-clang-dbg", debug = True, cpu = "x64")
angle_builder("linux-clang-rel", debug = False, cpu = "x64")
angle_builder("linux-gcc-dbg", debug = True, cpu = "x64", toolchain = "gcc")
angle_builder("linux-gcc-rel", debug = False, cpu = "x64", toolchain = "gcc")
angle_builder("mac-dbg", debug = True, cpu = "x64")
angle_builder("mac-rel", debug = False, cpu = "x64")
angle_builder("win-clang-x86-dbg", debug = True, cpu = "x86")
angle_builder("win-clang-x86-rel", debug = False, cpu = "x86")
angle_builder("win-clang-x64-dbg", debug = True, cpu = "x64")
angle_builder("win-clang-x64-rel", debug = False, cpu = "x64")
angle_builder("win-msvc-x86-dbg", debug = True, cpu = "x86", toolchain = "msvc")
angle_builder("win-msvc-x86-rel", debug = False, cpu = "x86", toolchain = "msvc")
angle_builder("win-msvc-x64-dbg", debug = True, cpu = "x64", toolchain = "msvc")
angle_builder("win-msvc-x64-rel", debug = False, cpu = "x64", toolchain = "msvc")
angle_builder("winuwp-x64-dbg", debug = True, cpu = "x64", toolchain = "msvc", uwp = True)
angle_builder("winuwp-x64-rel", debug = False, cpu = "x64", toolchain = "msvc", uwp = True)
angle_builder("linux-trace-rel", debug = False, cpu = "x64", test_mode = "trace_tests")
angle_builder("win-trace-rel", debug = False, cpu = "x64", test_mode = "trace_tests")
angle_builder("android-perf", debug = False, cpu = "arm64")
angle_builder("linux-perf", debug = False, cpu = "x64")
angle_builder("win-perf", debug = False, cpu = "x64")
# Views
luci.console_view(
name = "ci",
title = "ANGLE CI Builders",
repo = "https://chromium.googlesource.com/angle/angle",
refs = ["refs/heads/master"],
)
luci.list_view(
name = "try",
title = "ANGLE Try Builders",
)
luci.list_view_entry(
list_view = "try",
builder = "try/presubmit",
)
# CQ
luci.cq(
status_host = "chromium-cq-status.appspot.com",
submit_max_burst = 4,
submit_burst_delay = 480 * time.second,
)
luci.cq_group(
name = "master",
watch = cq.refset(
"https://chromium.googlesource.com/angle/angle",
refs = [r"refs/heads/master", r"refs/heads/main"],
),
acls = [
acl.entry(
acl.CQ_COMMITTER,
groups = "project-angle-committers",
),
acl.entry(
acl.CQ_DRY_RUNNER,
groups = "project-angle-tryjob-access",
),
],
verifiers = [
luci.cq_tryjob_verifier(
builder = "angle:try/presubmit",
disable_reuse = True,
),
luci.cq_tryjob_verifier(
builder = "chromium:try/android-angle-chromium-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/android-angle-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/fuchsia-angle-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/linux-angle-chromium-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/linux-swangle-try-tot-angle-x64",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/mac-angle-chromium-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/win-angle-chromium-x64-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/win-angle-chromium-x86-try",
),
luci.cq_tryjob_verifier(
builder = "chromium:try/win-swangle-try-tot-angle-x86",
),
],
)