xref: /aosp_15_r20/external/webrtc/infra/config/config.star (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1#!/usr/bin/env lucicfg
2
3# Copyright (c) 2019 The WebRTC project authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# https://chromium.googlesource.com/infra/luci/luci-go/+/main/lucicfg/doc/
8
9"""LUCI project configuration for WebRTC CQ and CI."""
10
11lucicfg.check_version("1.30.9")
12
13WEBRTC_GIT = "https://webrtc.googlesource.com/src"
14WEBRTC_GERRIT = "https://webrtc-review.googlesource.com/src"
15WEBRTC_TROOPER_EMAIL = "[email protected]"
16WEBRTC_XCODE13 = "13c100"
17DEFAULT_CPU = "x86-64"
18
19# Helpers:
20
21def make_goma_properties(enable_ats = True, jobs = None):
22    """Makes a default goma property with the specified argument.
23
24    Args:
25      enable_ats: True if the ATS should be enabled.
26      jobs: Number of jobs to be used by the builder.
27    Returns:
28      A dictonary with the goma properties.
29    """
30    goma_properties = {
31        "server_host": "goma.chromium.org",
32        "use_luci_auth": True,
33    }
34    if not enable_ats:
35        goma_properties["enable_ats"] = enable_ats
36    if jobs:
37        goma_properties["jobs"] = jobs
38    return {"$build/goma": goma_properties}
39
40def make_reclient_properties(instance, jobs = None):
41    """Makes a default reclient property with the specified argument.
42
43    Args:
44      instance: RBE insatnce name.
45      jobs: Number of jobs to be used by the builder.
46    Returns:
47      A dictonary with the reclient properties.
48    """
49    reclient_props = {
50        "instance": instance,
51        "metrics_project": "chromium-reclient-metrics",
52    }
53    if jobs:
54        reclient_props["jobs"] = jobs
55    return {"$build/reclient": reclient_props}
56
57# Add names of builders to remove from LKGR finder to this list. This is
58# useful when a failure can be safely ignored while fixing it without
59# blocking the LKGR finder on it.
60skipped_lkgr_bots = [
61    "Fuchsia Release",
62]
63
64# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
65lucicfg.enable_experiment("crbug.com/1182002")
66
67luci.builder.defaults.test_presentation.set(
68    resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
69)
70
71lucicfg.config(
72    config_dir = ".",
73    tracked_files = [
74        "luci-analysis.cfg",
75        "commit-queue.cfg",
76        "cr-buildbucket.cfg",
77        "luci-logdog.cfg",
78        "luci-milo.cfg",
79        "luci-notify.cfg",
80        "luci-notify/**/*",
81        "luci-scheduler.cfg",
82        "project.cfg",
83        "realms.cfg",
84    ],
85    lint_checks = ["default"],
86)
87
88luci.project(
89    name = "webrtc",
90    buildbucket = "cr-buildbucket.appspot.com",
91    logdog = "luci-logdog.appspot.com",
92    milo = "luci-milo.appspot.com",
93    notify = "luci-notify.appspot.com",
94    scheduler = "luci-scheduler.appspot.com",
95    swarming = "chromium-swarm.appspot.com",
96    acls = [
97        acl.entry(
98            [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
99            groups = ["all"],
100        ),
101        acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
102        acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
103    ],
104    bindings = [
105        luci.binding(
106            roles = "role/configs.validator",
107            users = [
108                "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
109            ],
110        ),
111        luci.binding(
112            roles = "role/swarming.poolOwner",
113            groups = "project-webrtc-admins",
114        ),
115        luci.binding(
116            roles = "role/swarming.poolViewer",
117            groups = "all",
118        ),
119        # Allow any WebRTC build to trigger a test ran under chromium-tester@
120        # task service account.
121        luci.binding(
122            roles = "role/swarming.taskServiceAccount",
123            users = [
124                "[email protected]",
125            ],
126        ),
127        # Roles for LUCI Analysis.
128        luci.binding(
129            roles = "role/analysis.reader",
130            groups = "all",
131        ),
132        luci.binding(
133            roles = "role/analysis.queryUser",
134            groups = "authenticated-users",
135        ),
136        luci.binding(
137            roles = "role/analysis.editor",
138            groups = "googlers",
139        ),
140    ],
141)
142
143luci.logdog(
144    gs_bucket = "chromium-luci-logdog",
145)
146
147luci.milo(
148    logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
149)
150
151# Configure Weetbix (config is copied verbatim)
152################################################################################
153
154lucicfg.emit(
155    dest = "luci-analysis.cfg",
156    data = io.read_file("luci-analysis.cfg"),
157)
158
159################################################################################
160
161luci.notify(tree_closing_enabled = True)
162
163luci.cq(
164    status_host = "chromium-cq-status.appspot.com",
165    submit_max_burst = 1,
166    submit_burst_delay = 1 * time.minute,
167)
168
169luci.gitiles_poller(
170    name = "webrtc-gitiles-trigger-main",
171    bucket = "ci",
172    repo = WEBRTC_GIT,
173    refs = ["refs/heads/main"],
174)
175
176# Swarming permissions:
177
178luci.realm(name = "pools/cron", bindings = [
179    # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
180    luci.binding(
181        roles = "role/swarming.poolUser",
182        projects = "libyuv",
183    ),
184])
185
186luci.realm(name = "pools/ci")
187luci.realm(name = "pools/ci-tests", bindings = [
188    # Allow task service accounts of .ci pool/bucket to trigger tasks here.
189    luci.binding(
190        roles = "role/swarming.poolUser",
191        groups = "project-webrtc-ci-task-accounts",
192    ),
193    # Allow tasks here to use .ci task service accounts.
194    luci.binding(
195        roles = "role/swarming.taskServiceAccount",
196        groups = "project-webrtc-ci-task-accounts",
197    ),
198])
199luci.realm(name = "ci", bindings = [
200    # Allow CI builders to create invocations in their own builds.
201    luci.binding(
202        roles = "role/resultdb.invocationCreator",
203        groups = "project-webrtc-ci-task-accounts",
204    ),
205])
206
207luci.realm(name = "pools/try", bindings = [
208    # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
209    luci.binding(
210        roles = "role/swarming.poolUser",
211        groups = "project-webrtc-led-users",
212    ),
213])
214luci.realm(name = "pools/try-tests", bindings = [
215    # Allow task service accounts of .try pool/bucket to trigger tasks here.
216    luci.binding(
217        roles = "role/swarming.poolUser",
218        groups = "project-webrtc-try-task-accounts",
219    ),
220    # Allow tasks here to use .try task service accounts.
221    luci.binding(
222        roles = "role/swarming.taskServiceAccount",
223        groups = "project-webrtc-try-task-accounts",
224    ),
225])
226luci.realm(name = "try", bindings = [
227    luci.binding(
228        roles = "role/swarming.taskTriggerer",
229        groups = "project-webrtc-led-users",
230    ),
231    # Allow try builders to create invocations in their own builds.
232    luci.binding(
233        roles = "role/resultdb.invocationCreator",
234        groups = "project-webrtc-try-task-accounts",
235    ),
236])
237
238luci.realm(name = "pools/perf", bindings = [
239    # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
240    luci.binding(
241        roles = "role/swarming.poolUser",
242        groups = "project-webrtc-led-users",
243    ),
244])
245luci.realm(name = "perf", bindings = [
246    luci.binding(
247        roles = "role/swarming.taskTriggerer",
248        groups = "project-webrtc-led-users",
249    ),
250])
251
252luci.realm(name = "@root", bindings = [
253    # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
254    luci.binding(
255        roles = "role/swarming.poolUser",
256        groups = "project-webrtc-admins",
257    ),
258    luci.binding(
259        roles = "role/swarming.taskTriggerer",
260        groups = "project-webrtc-admins",
261    ),
262])
263
264# Bucket definitions:
265
266luci.bucket(
267    name = "try",
268    acls = [
269        acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
270            "service-account-cq",
271            "project-webrtc-tryjob-access",
272        ]),
273    ],
274)
275
276luci.bucket(
277    name = "ci",
278    acls = [
279        acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
280            "project-webrtc-ci-schedulers",
281        ]),
282    ],
283)
284
285luci.bucket(
286    name = "perf",
287    acls = [
288        acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
289            "[email protected]",
290        ]),
291        acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
292            # Allow Pinpoint to trigger builds for bisection
293            "service-account-chromeperf",
294        ]),
295    ],
296)
297
298luci.bucket(
299    name = "cron",
300)
301
302# Commit queue definitions:
303
304luci.cq_group(
305    name = "cq",
306    tree_status_host = "webrtc-status.appspot.com",
307    watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
308    acls = [
309        acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
310        acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
311    ],
312    retry_config = cq.RETRY_ALL_FAILURES,
313    cancel_stale_tryjobs = True,
314)
315
316luci.cq_group(
317    name = "cq_branch",
318    watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
319    acls = [
320        acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
321        acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
322    ],
323    retry_config = cq.RETRY_ALL_FAILURES,
324    cancel_stale_tryjobs = True,
325)
326
327luci.cq_group(
328    name = "cq_infra",
329    watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
330    acls = [
331        acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
332        acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
333    ],
334    retry_config = cq.RETRY_ALL_FAILURES,
335    cancel_stale_tryjobs = True,
336)
337
338luci.cq_tryjob_verifier(
339    builder = "presubmit",
340    cq_group = "cq_infra",
341)
342
343luci.cq_tryjob_verifier(
344    builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
345    owner_whitelist = ["project-webrtc-internal-tryjob-access"],
346    cq_group = "cq",
347)
348
349# Notifier definitions:
350
351luci.notifier(
352    name = "post_submit_failure_notifier",
353    on_new_status = ["FAILURE"],
354    notify_emails = [WEBRTC_TROOPER_EMAIL],
355    notify_blamelist = True,
356    template = luci.notifier_template(
357        name = "build_failure",
358        body = io.read_file("luci-notify/email-templates/build_failure.template"),
359    ),
360)
361
362luci.notifier(
363    name = "cron_notifier",
364    on_new_status = ["FAILURE", "INFRA_FAILURE"],
365    notify_emails = [WEBRTC_TROOPER_EMAIL],
366    template = luci.notifier_template(
367        name = "cron",
368        body = io.read_file("luci-notify/email-templates/cron.template"),
369    ),
370)
371
372luci.notifier(
373    name = "infra_failure_notifier",
374    on_new_status = ["INFRA_FAILURE"],
375    notify_emails = [WEBRTC_TROOPER_EMAIL],
376    template = luci.notifier_template(
377        name = "infra_failure",
378        body = io.read_file("luci-notify/email-templates/infra_failure.template"),
379    ),
380)
381
382# Tree closer definitions:
383
384luci.tree_closer(
385    name = "webrtc_tree_closer",
386    tree_status_host = "webrtc-status.appspot.com",
387    # TODO: These step filters are copied verbatim from Gatekeeper, for testing
388    # that LUCI-Notify would take the exact same actions. Once we've switched
389    # over, this should be updated - several of these steps don't exist in
390    # WebRTC recipes.
391    failed_step_regexp = [
392        "bot_update",
393        "compile",
394        "gclient runhooks",
395        "runhooks",
396        "update",
397        "extract build",
398        "cleanup_temp",
399        "taskkill",
400        "compile",
401        "gn",
402    ],
403    failed_step_regexp_exclude = ".*\\(experimental\\).*",
404)
405
406# Recipe definitions:
407
408def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
409    return luci.recipe(
410        name = recipe.split("/")[-1],
411        cipd_package = pkg,
412        cipd_version = "refs/heads/main",
413        recipe = recipe,
414        use_python3 = True,
415    )
416
417recipe("chromium_trybot")
418recipe("run_presubmit")
419recipe("webrtc/auto_roll_webrtc_deps")
420recipe("webrtc/ios_api_framework")
421recipe("webrtc/libfuzzer")
422recipe("webrtc/standalone")
423recipe("webrtc/update_webrtc_binary_version")
424recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
425
426# Console definitions:
427
428luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
429luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
430luci.list_view(name = "cron", title = "Cron")
431luci.list_view(name = "try", title = "Tryserver")
432
433def add_milo(builder, views):
434    """Add Milo console entries for the builder.
435
436    Args:
437      builder: builder name (str).
438      views: dict where keys are names of consoles and values are either a
439        category for the console (str, pipe-separated) or True, which means
440        adding to a list view rather than a console.
441    """
442    for view_name, category in views.items():
443        if category == None:
444            continue
445        elif type(category) == "string":
446            category, _, short_name = category.rpartition("|")
447            luci.console_view_entry(
448                console_view = view_name,
449                builder = builder,
450                category = category or None,
451                short_name = short_name or None,
452            )
453        elif category == True:
454            luci.list_view_entry(
455                list_view = view_name,
456                builder = builder,
457            )
458        else:
459            fail("Unexpected value for category: %r" % category)
460
461lkgr_builders = []
462
463# Builder-defining functions:
464
465def webrtc_builder(
466        name,
467        bucket,
468        dimensions,
469        properties = None,
470        recipe = "standalone",
471        priority = 30,
472        execution_timeout = 2 * time.hour,
473        **kwargs):
474    """WebRTC specific wrapper around luci.builder.
475
476    Args:
477      name: builder name (str).
478      bucket: The name of the bucket the builder belongs to.
479      dimensions: dict of Swarming dimensions (strings) to search machines by.
480      properties: dict of properties to pass to the recipe (on top of the default ones).
481      recipe: string with the name of the recipe to run.
482      priority: int [1-255] or None, indicating swarming task priority, lower is
483        more important. If None, defer the decision to Buildbucket service.
484      execution_timeout: int or None, how long to wait for a running build to finish before
485        forcefully aborting it and marking the build as timed out. If None,
486        defer the decision to Buildbucket service.
487      **kwargs: Pass on to webrtc_builder / luci.builder.
488    Returns:
489      A luci.builder.
490    """
491    properties = properties or {}
492    resultdb_bq_table = "webrtc-ci.resultdb." + bucket + "_test_results"
493    return luci.builder(
494        name = name,
495        bucket = bucket,
496        executable = recipe,
497        dimensions = dimensions,
498        properties = properties,
499        execution_timeout = execution_timeout,
500        priority = priority,
501        build_numbers = True,
502        swarming_tags = ["vpython:native-python-wrapper"],
503        resultdb_settings = resultdb.settings(
504            enable = True,
505            bq_exports = [
506                resultdb.export_test_results(bq_table = resultdb_bq_table),
507            ],
508        ),
509        **kwargs
510    )
511
512def ci_builder(
513        name,
514        ci_cat,
515        dimensions,
516        properties = None,
517        perf_cat = None,
518        prioritized = False,
519        enabled = True,
520        **kwargs):
521    """Add a post-submit builder.
522
523    Args:
524      name: builder name (str).
525      ci_cat: the category + name for the /ci/ console, or None to omit from the console.
526      dimensions: dict of Swarming dimensions (strings) to search machines by.
527      properties: dict of properties to pass to the recipe (on top of the default ones).
528      perf_cat: the category + name for the /perf/ console, or None to omit from the console.
529      prioritized: True to make this builder have a higher priority and never batch builds.
530      enabled: False to exclude this builder from consoles and failure notifications.
531      **kwargs: Pass on to webrtc_builder / luci.builder.
532    Returns:
533      A luci.builder.
534
535    Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
536    """
537    if prioritized:
538        kwargs["triggering_policy"] = scheduler.greedy_batching(
539            max_batch_size = 1,
540            max_concurrent_invocations = 3,
541        )
542        kwargs["priority"] = 29
543
544    if enabled:
545        add_milo(name, {"ci": ci_cat, "perf": perf_cat})
546        if ci_cat and not perf_cat:
547            lkgr_builders.append(name)
548    dimensions.update({"pool": "luci.webrtc.ci", "cpu": kwargs.pop("cpu", DEFAULT_CPU)})
549    properties = properties or {}
550    properties = dict(properties)  # Avoid mutating the original dict.
551    properties["builder_group"] = "client.webrtc"
552    properties.update(make_reclient_properties("rbe-webrtc-trusted"))
553
554    # TODO(b/245249582): remove goma properties after reclient migration.
555    properties.update(make_goma_properties())
556    notifies = ["post_submit_failure_notifier", "infra_failure_notifier"]
557    notifies += ["webrtc_tree_closer"] if name not in skipped_lkgr_bots else []
558    return webrtc_builder(
559        name = name,
560        dimensions = dimensions,
561        properties = properties,
562        bucket = "perf" if perf_cat else "ci",
563        service_account = "[email protected]",
564        triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
565        repo = WEBRTC_GIT,
566        notifies = notifies if enabled else None,
567        **kwargs
568    )
569
570def try_builder(
571        name,
572        dimensions,
573        properties = None,
574        try_cat = True,
575        cq = {},
576        branch_cq = True,
577        goma_enable_ats = True,
578        goma_jobs = None,
579        **kwargs):
580    """Add a pre-submit builder.
581
582    Args:
583      name: builder name (str).
584      dimensions: dict of Swarming dimensions (strings) to search machines by.
585      properties: dict of properties to pass to the recipe (on top of the default ones).
586      try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
587      cq: None to exclude this from all commit queues, or a dict of kwargs for cq_tryjob_verifier.
588      branch_cq: False to exclude this builder just from the release-branch CQ.
589      goma_enable_ats: True if the ATS should be enabled by the builder.
590      goma_jobs: Number of jobs to be used by the builder.
591      **kwargs: Pass on to webrtc_builder / luci.builder.
592    Returns:
593      A luci.builder.
594    """
595    add_milo(name, {"try": try_cat})
596    dimensions.update({"pool": "luci.webrtc.try", "cpu": DEFAULT_CPU})
597    properties = properties or {}
598    properties["builder_group"] = "tryserver.webrtc"
599    properties.update(make_goma_properties(enable_ats = goma_enable_ats, jobs = goma_jobs))
600    if cq != None:
601        luci.cq_tryjob_verifier(name, cq_group = "cq", **cq)
602        if branch_cq:
603            luci.cq_tryjob_verifier(name, cq_group = "cq_branch", **cq)
604
605    return webrtc_builder(
606        name = name,
607        dimensions = dimensions,
608        properties = properties,
609        bucket = "try",
610        service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
611        notifies = ["infra_failure_notifier"],
612        **kwargs
613    )
614
615def perf_builder(name, perf_cat, **kwargs):
616    """Add a perf builder.
617
618    Args:
619      name: builder name (str).
620      perf_cat: the category + name for the /perf/ console, or None to omit from the console.
621      **kwargs: Pass on to webrtc_builder / luci.builder.
622    Returns:
623      A luci.builder.
624
625    Notifications are also disabled.
626    """
627    add_milo(name, {"perf": perf_cat})
628    properties = make_goma_properties()
629    properties.update(make_reclient_properties("rbe-webrtc-trusted"))
630    properties["builder_group"] = "client.webrtc.perf"
631    dimensions = {"pool": "luci.webrtc.perf", "os": "Linux", "cores": "2"}
632    if "Android" in name:
633        # Android perf testers require more performant bots to finish under 3 hours.
634        dimensions["cores"] = "8"
635    return webrtc_builder(
636        name = name,
637        dimensions = dimensions,
638        properties = properties,
639        bucket = "perf",
640        service_account = "[email protected]",
641        # log_base of 1.7 means:
642        # when there are P pending builds, LUCI will batch the first B builds.
643        # P:  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
644        # B:  1  1  2  2  3  3  3  3  4  4  4  4  4  4  5 ...
645        triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
646        repo = WEBRTC_GIT,
647        execution_timeout = 3 * time.hour,
648        notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
649        **kwargs
650    )
651
652def cron_builder(name, service_account = None, **kwargs):
653    if service_account == None:
654        service_account = "[email protected]"
655    add_milo(name, {"cron": True})
656    return webrtc_builder(
657        name = name,
658        dimensions = {"pool": "luci.webrtc.cron", "os": "Linux", "cpu": DEFAULT_CPU},
659        bucket = "cron",
660        service_account = service_account,
661        notifies = ["cron_notifier"],
662        **kwargs
663    )
664
665def normal_builder_factory(**common_kwargs):
666    def builder(*args, **kwargs):
667        kwargs.update(common_kwargs)
668        return ci_builder(*args, **kwargs)
669
670    def try_job(name, **kwargs):
671        kwargs.update(common_kwargs)
672        return try_builder(name, **kwargs)
673
674    return builder, try_job
675
676# Mixins:
677
678linux_builder, linux_try_job = normal_builder_factory(
679    dimensions = {"os": "Linux", "inside_docker": "0"},
680)
681
682android_builder, android_try_job = normal_builder_factory(
683    dimensions = {"os": "Linux"},
684)
685
686win_builder = normal_builder_factory(
687    dimensions = {"os": "Windows"},
688)[0]
689
690win_try_job = normal_builder_factory(
691    dimensions = {"os": "Windows"},
692    goma_enable_ats = False,
693)[1]
694
695mac_builder, mac_try_job = normal_builder_factory(
696    dimensions = {"os": "Mac"},
697)
698
699ios_builder, ios_try_job = normal_builder_factory(
700    dimensions = {"os": "Mac"},
701    properties = {"xcode_build_version": WEBRTC_XCODE13},
702    caches = [swarming.cache(
703        name = "xcode_ios_" + WEBRTC_XCODE13,
704        path = "xcode_ios_" + WEBRTC_XCODE13 + ".app",
705    )],
706)
707
708# Actual builder configuration:
709
710android_builder("Android32 (dbg)", "Android|arm|dbg")
711android_try_job("android_compile_arm_dbg", cq = None)
712android_try_job("android_arm_dbg")
713android_builder("Android32", "Android|arm|rel")
714android_try_job("android_arm_rel")
715android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
716android_try_job("android_compile_arm_rel")
717perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
718perf_builder("Perf Android32 (M AOSP Nexus6)", "Android|arm|Tester|M AOSP Nexus6", triggered_by = ["Android32 Builder arm"])
719perf_builder("Perf Android32 (O Pixel2)", "Android|arm|Tester|O Pixel2", triggered_by = ["Android32 Builder arm"])
720perf_builder("Perf Android32 (R Pixel5)", "Android|arm|Tester|R Pixel5", triggered_by = ["Android32 Builder arm"])
721android_try_job("android_compile_arm64_dbg", cq = None)
722android_try_job("android_arm64_dbg", cq = None)
723android_builder("Android64", "Android|arm64|rel")
724android_try_job("android_arm64_rel")
725android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
726perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
727perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
728perf_builder("Perf Android64 (R Pixel5)", "Android|arm64|Tester|R Pixel5", triggered_by = ["Android64 Builder arm64"])
729android_try_job("android_compile_arm64_rel")
730android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
731android_try_job("android_compile_x64_dbg")
732android_try_job("android_compile_x64_rel", cq = None)
733android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
734android_try_job("android_compile_x86_dbg")
735android_builder("Android32 Builder x86", "Android|x86|rel")
736android_try_job("android_compile_x86_rel")
737android_builder("Android32 (more configs)", "Android|arm|more")
738android_try_job("android_arm_more_configs")
739android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
740
741ios_builder("iOS64 Debug", "iOS|arm64|dbg")
742ios_try_job("ios_compile_arm64_dbg")
743ios_builder("iOS64 Release", "iOS|arm64|rel")
744ios_try_job("ios_compile_arm64_rel")
745ios_builder("iOS64 Sim Debug (iOS 14)", "iOS|x64|14")
746ios_try_job("ios_sim_x64_dbg_ios14")
747ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
748ios_try_job("ios_sim_x64_dbg_ios13")
749ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
750ios_try_job("ios_sim_x64_dbg_ios12")
751ios_builder("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
752ios_try_job("ios_api_framework", recipe = "ios_api_framework")
753
754linux_builder("Linux32 Debug", "Linux|x86|dbg")
755linux_try_job("linux_x86_dbg")
756linux_builder("Linux32 Release", "Linux|x86|rel")
757linux_try_job("linux_x86_rel")
758linux_builder("Linux64 Debug", "Linux|x64|dbg")
759linux_try_job("linux_dbg", cq = None)
760linux_try_job("linux_compile_dbg")
761linux_builder("Linux64 Release", "Linux|x64|rel")
762linux_try_job("linux_rel")
763linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
764linux_try_job("linux_compile_rel")
765perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
766linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
767linux_try_job("linux_compile_arm_dbg")
768linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
769linux_try_job("linux_compile_arm_rel")
770linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
771linux_try_job("linux_compile_arm64_dbg")
772linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
773linux_try_job("linux_compile_arm64_rel")
774linux_builder("Linux Asan", "Linux|x64|asan")
775linux_try_job("linux_asan")
776linux_builder("Linux MSan", "Linux|x64|msan")
777linux_try_job("linux_msan")
778linux_builder("Linux Tsan v2", "Linux|x64|tsan")
779linux_try_job("linux_tsan2")
780linux_builder("Linux UBSan", "Linux|x64|ubsan")
781linux_try_job("linux_ubsan")
782linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
783linux_try_job("linux_ubsan_vptr")
784linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
785linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
786linux_builder("Linux (more configs)", "Linux|x64|more")
787linux_try_job("linux_more_configs")
788linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
789linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
790linux_try_job("linux_coverage", cq = None)
791
792linux_builder("Fuchsia Builder", ci_cat = None, perf_cat = "Fuchsia|x64|Builder|", prioritized = True)
793linux_builder("Fuchsia Release", "Fuchsia|x64|rel")
794linux_try_job("fuchsia_rel", cq = None)
795perf_builder("Perf Fuchsia", "Fuchsia|x64|Tester|", triggered_by = ["Fuchsia Builder"])
796
797mac_builder("Mac64 Debug", "Mac|x64|dbg")
798mac_try_job("mac_dbg", cq = None)
799mac_try_job("mac_compile_dbg")
800mac_builder("Mac64 Release", "Mac|x64|rel")
801
802mac_try_job("mac_rel")
803mac_try_job("mac_compile_rel", cq = None)
804mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
805mac_builder("MacArm64 Builder", ci_cat = None, perf_cat = "Mac|arm64|Builder|")
806perf_builder("Perf Mac 11", "Mac|x64|Tester|11", triggered_by = ["Mac64 Builder"])
807perf_builder("Perf Mac M1 Arm64 12", "Mac|arm64|Tester|12", triggered_by = ["MacArm64 Builder"])
808
809mac_builder("Mac Asan", "Mac|x64|asan")
810mac_try_job("mac_asan")
811mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
812mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", cpu = "arm64-64-Apple_M1")
813mac_try_job("mac_rel_m1")
814mac_try_job("mac_dbg_m1")
815
816win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
817win_try_job("win_x86_clang_dbg", cq = None)
818win_try_job("win_compile_x86_clang_dbg")
819win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
820win_try_job("win_x86_clang_rel")
821win_try_job("win_compile_x86_clang_rel", cq = None)
822win_builder("Win64 Builder (Clang)", ci_cat = None, perf_cat = "Win|x64|Builder|")
823perf_builder("Perf Win 10", "Win|x64|Tester|10", triggered_by = ["Win64 Builder (Clang)"])
824win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
825win_try_job("win_x64_clang_dbg", cq = None)
826win_try_job("win_compile_x64_clang_dbg")
827win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
828win_try_job("win_x64_clang_rel", cq = None)
829win_try_job("win_compile_x64_clang_rel")
830win_builder("Win64 ASan", "Win Clang|x64|asan")
831win_try_job("win_asan")
832win_builder("Win (more configs)", "Win Clang|x86|more")
833win_try_job("win_x86_more_configs")
834win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
835win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
836
837linux_try_job(
838    "presubmit",
839    recipe = "run_presubmit",
840    properties = {"repo_name": "webrtc", "runhooks": True},
841    priority = 28,
842    cq = {"disable_reuse": True},
843)
844
845cron_builder(
846    "Auto-roll - WebRTC DEPS",
847    recipe = "auto_roll_webrtc_deps",
848    schedule = "0 */2 * * *",  # Every 2 hours.
849)
850
851cron_builder(
852    "WebRTC version update",
853    recipe = "update_webrtc_binary_version",
854    schedule = "0 4 * * *",  # Every day at 4am.
855    service_account = "[email protected]",
856)
857
858lkgr_config = {
859    "project": "webrtc",
860    "source_url": WEBRTC_GIT,
861    "status_url": "https://webrtc-status.appspot.com",
862    "allowed_lag": 9,  # hours (up to 10x during low commit volume periods)
863    "allowed_gap": 150,  # commits behind
864    "error_recipients": WEBRTC_TROOPER_EMAIL,
865    "buckets": {
866        "webrtc/ci": {
867            # bucket alias: luci.webrtc.ci
868            "builders": [
869                b
870                for b in sorted(lkgr_builders)
871                if b not in skipped_lkgr_bots
872            ],
873        },
874        "chromium/webrtc.fyi": {
875            # bucket alias: luci.chromium.webrtc.fyi
876            "builders": [
877                "WebRTC Chromium FYI Android Builder (dbg)",
878                "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
879                "WebRTC Chromium FYI Android Builder",
880                "WebRTC Chromium FYI Android Tests (dbg)",
881                "WebRTC Chromium FYI Android Tests ARM64 (dbg)",
882                "WebRTC Chromium FYI Linux Builder (dbg)",
883                "WebRTC Chromium FYI Linux Builder",
884                "WebRTC Chromium FYI Linux Tester",
885                "WebRTC Chromium FYI Mac Builder (dbg)",
886                "WebRTC Chromium FYI Mac Builder",
887                "WebRTC Chromium FYI Mac Tester",
888                "WebRTC Chromium FYI Win Builder (dbg)",
889                "WebRTC Chromium FYI Win Builder",
890                "WebRTC Chromium FYI Win10 Tester",
891                "WebRTC Chromium FYI ios-device",
892                "WebRTC Chromium FYI ios-simulator",
893            ],
894        },
895    },
896}
897
898cron_builder(
899    "WebRTC lkgr finder",
900    recipe = "lkgr_finder",
901    properties = {
902        "project": "webrtc",
903        "repo": WEBRTC_GIT,
904        "ref": "refs/heads/lkgr",
905        "src_ref": "refs/heads/main",
906        "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
907        "config": lkgr_config,
908    },
909    schedule = "*/10 * * * *",  # Every 10 minutes.
910)
911