blob: 69cf1f5428809666f65bb064a8ec22ba4e0ff986 [file] [log] [blame]
Oleh Prypin1a0593f2019-03-11 09:43:28 +01001#!/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/+/master/lucicfg/doc/
8
Jeremy Leconteea2016b2020-07-01 09:47:22 +02009"""LUCI project configuration for WebRTC CQ and CI."""
10
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020011lucicfg.check_version("1.23.0")
Mirko Bonadei9189d9c2020-06-09 21:54:18 +020012
Oleh Prypin1a0593f2019-03-11 09:43:28 +010013WEBRTC_GIT = "https://webrtc.googlesource.com/src"
14WEBRTC_GERRIT = "https://webrtc-review.googlesource.com/src"
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +020015WEBRTC_TROOPER_EMAIL = "webrtc-troopers-robots@google.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +010016
Mirko Bonadei32ca4862020-03-11 10:39:45 +010017GOMA_BACKEND_WEBRTC_RBE_PROD = {
Mirko Bonadei1e905342020-03-04 09:39:42 +010018 "$build/goma": {
19 "server_host": "goma.chromium.org",
Jeremy Leconteea2016b2020-07-01 09:47:22 +020020 "use_luci_auth": True,
21 },
Mirko Bonadei1e905342020-03-04 09:39:42 +010022}
23
Mirko Bonadei84360ca2020-03-12 08:35:48 +010024GOMA_BACKEND_WEBRTC_IOS_RBE_PROD = {
25 "$build/goma": {
26 "server_host": "goma.chromium.org",
Jeremy Leconteea2016b2020-07-01 09:47:22 +020027 "use_luci_auth": True,
Mirko Bonadei84360ca2020-03-12 08:35:48 +010028 },
Artem Titov1d47d312020-11-03 14:45:52 +010029 "$depot_tools/osx_sdk": {"sdk_version": "12a7209"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +010030}
31
Patrik Höglund3916a972019-12-04 13:19:38 +010032GOMA_BACKEND_RBE_ATS_PROD = {
33 "$build/goma": {
34 "server_host": "goma.chromium.org",
Mirko Bonadei2688eca2020-03-25 09:15:54 +010035 "use_luci_auth": True,
Jeremy Leconteea2016b2020-07-01 09:47:22 +020036 "enable_ats": True,
37 },
Patrik Höglund3916a972019-12-04 13:19:38 +010038}
39
Mirko Bonadei5aafd472021-04-21 10:42:00 +020040# Disable ATS on CQ/try.
41GOMA_BACKEND_RBE_NO_ATS_PROD = {
42 "$build/goma": {
43 "server_host": "goma.chromium.org",
44 "use_luci_auth": True,
45 "enable_ats": False,
46 },
47}
48
Oleh Prypin1a0593f2019-03-11 09:43:28 +010049# Top-level configs:
50
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020051# Enable LUCI Realms support.
52lucicfg.enable_experiment("crbug.com/1085650")
53
Andrii Shyshkalov32515d42021-04-29 14:39:42 +020054# Launch all builds in "realms-aware mode", crbug.com/1177975.
55luci.builder.defaults.experiments.set({"luci.use_realms": 100})
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020056
Oleh Prypin1a0593f2019-03-11 09:43:28 +010057lucicfg.config(
58 config_dir = ".",
59 tracked_files = [
60 "commit-queue.cfg",
61 "cr-buildbucket.cfg",
62 "luci-logdog.cfg",
63 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010064 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020065 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010066 "luci-scheduler.cfg",
67 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020068 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010069 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020070 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010071)
72
73luci.project(
74 name = "webrtc",
75 buildbucket = "cr-buildbucket.appspot.com",
76 logdog = "luci-logdog.appspot.com",
77 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010078 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010079 scheduler = "luci-scheduler.appspot.com",
80 swarming = "chromium-swarm.appspot.com",
81 acls = [
82 acl.entry(
83 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
84 groups = ["all"],
85 ),
86 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
87 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
88 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020089 bindings = [
90 luci.binding(
91 roles = "role/swarming.poolOwner",
92 groups = "project-webrtc-admins",
93 ),
94 luci.binding(
95 roles = "role/swarming.poolViewer",
96 groups = "all",
97 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +020098 # Allow any WebRTC build to trigger a test ran under chromium-tester@
99 # task service account.
100 luci.binding(
101 roles = "role/swarming.taskServiceAccount",
102 users = [
103 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
104 ],
105 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200106 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100107)
108
109luci.logdog(
110 gs_bucket = "chromium-luci-logdog",
111)
112
113luci.milo(
114 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
115)
116
Owen Rodleya55c38e2020-06-15 11:16:10 +1000117luci.notify(tree_closing_enabled = True)
118
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100119luci.cq(
120 status_host = "chromium-cq-status.appspot.com",
121 submit_max_burst = 1,
122 submit_burst_delay = 1 * time.minute,
123)
124
125luci.gitiles_poller(
126 name = "webrtc-gitiles-trigger-master",
127 bucket = "ci",
128 repo = WEBRTC_GIT,
129)
130
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200131# Swarming permissions:
132
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200133luci.realm(name = "pools/cron", bindings = [
134 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
135 luci.binding(
136 roles = "role/swarming.poolUser",
137 projects = "libyuv",
138 ),
139])
140
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200141luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200142luci.realm(name = "pools/ci-tests", bindings = [
143 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
144 luci.binding(
145 roles = "role/swarming.poolUser",
146 groups = "project-webrtc-ci-task-accounts",
147 ),
148 # Allow tasks here to use .ci task service accounts.
149 luci.binding(
150 roles = "role/swarming.taskServiceAccount",
151 groups = "project-webrtc-ci-task-accounts",
152 ),
153])
154
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200155luci.realm(name = "pools/try")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200156luci.realm(name = "pools/try-tests", bindings = [
157 # Allow task service accounts of .try pool/bucket to trigger tasks here.
158 luci.binding(
159 roles = "role/swarming.poolUser",
160 groups = "project-webrtc-try-task-accounts",
161 ),
162 # Allow tasks here to use .try task service accounts.
163 luci.binding(
164 roles = "role/swarming.taskServiceAccount",
165 groups = "project-webrtc-try-task-accounts",
166 ),
167])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200168
169# Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
170luci.binding(
171 realm = "@root",
172 roles = "role/swarming.poolUser",
173 groups = "project-webrtc-admins",
174)
175luci.binding(
176 realm = "@root",
177 roles = "role/swarming.taskTriggerer",
178 groups = "project-webrtc-admins",
179)
180
181# Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
182luci.binding(
183 realm = "pools/try",
184 roles = "role/swarming.poolUser",
185 groups = "project-webrtc-led-users",
186)
187luci.binding(
188 realm = "try",
189 roles = "role/swarming.taskTriggerer",
190 groups = "project-webrtc-led-users",
191)
192
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100193# Bucket definitions:
194
195luci.bucket(
196 name = "try",
197 acls = [
198 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
199 "service-account-cq",
200 "project-webrtc-tryjob-access",
201 ]),
202 ],
203)
204
205luci.bucket(
206 name = "ci",
207 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200208 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
209 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100210 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200211 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
212 # Allow Pinpoint to trigger builds for bisection
213 "service-account-chromeperf",
214 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100215 ],
216)
217
218luci.bucket(
219 name = "perf",
220 acls = [
221 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100222 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
223 ]),
224 ],
225)
226
227luci.bucket(
228 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100229)
230
231# Commit queue definitions:
232
233luci.cq_group(
234 name = "cq",
235 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200236 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100237 acls = [
238 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
239 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
240 ],
241 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200242 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100243)
244
245luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100246 name = "cq_branch",
247 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
248 acls = [
249 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
250 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
251 ],
252 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200253 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100254)
255
256luci.cq_group(
257 name = "cq_infra",
258 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100259 acls = [
260 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
261 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
262 ],
263 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200264 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100265)
266
267luci.cq_tryjob_verifier(
268 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100269 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100270)
271
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200272luci.cq_tryjob_verifier(
273 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
274 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
275 cq_group = "cq",
276)
277
Oleh Prypin71d17422019-03-28 08:43:16 +0100278# Notifier definitions:
279
280luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200281 name = "post_submit_failure_notifier",
282 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200283 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200284 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200285 name = "build_failure",
286 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200287 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100288)
289
290luci.notifier(
291 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200292 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200293 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200294 template = luci.notifier_template(
295 name = "cron",
296 body = io.read_file("luci-notify/email-templates/cron.template"),
297 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100298)
299
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200300luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200301 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200302 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200303 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200304 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200305 name = "infra_failure",
306 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200307 ),
308)
309
Owen Rodley6b721ba2020-05-26 10:04:20 +1000310# Tree closer definitions:
311
312luci.tree_closer(
313 name = "webrtc_tree_closer",
314 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000315 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
316 # that LUCI-Notify would take the exact same actions. Once we've switched
317 # over, this should be updated - several of these steps don't exist in
318 # WebRTC recipes.
319 failed_step_regexp = [
320 "bot_update",
321 "compile",
322 "gclient runhooks",
323 "runhooks",
324 "update",
325 "extract build",
326 "cleanup_temp",
327 "taskkill",
328 "compile",
329 "gn",
330 ],
331 failed_step_regexp_exclude = ".*\\(experimental\\).*",
332)
333
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100334# Recipe definitions:
335
336def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
337 return luci.recipe(
338 name = recipe.split("/")[-1],
339 cipd_package = pkg,
340 cipd_version = "refs/heads/master",
341 recipe = recipe,
342 )
343
344recipe("chromium_trybot")
345recipe("run_presubmit")
346recipe("webrtc/auto_roll_webrtc_deps")
347recipe("webrtc/ios")
348recipe("webrtc/ios_api_framework")
349recipe("webrtc/libfuzzer")
350recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100351recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100352recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800353recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100354
355# Console definitions:
356
357luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb")
358luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb")
359luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100360luci.list_view(name = "try", title = "Tryserver")
361
362def add_milo(builder, views):
363 """Add Milo console entries for the builder.
364
365 Args:
366 builder: builder name (str).
367 views: dict where keys are names of consoles and values are either a
368 category for the console (str, pipe-separated) or True, which means
369 adding to a list view rather than a console.
370 """
371 for view_name, category in views.items():
372 if category == None:
373 continue
374 elif type(category) == "string":
375 category, _, short_name = category.rpartition("|")
376 luci.console_view_entry(
377 console_view = view_name,
378 builder = builder,
379 category = category or None,
380 short_name = short_name or None,
381 )
382 elif category == True:
383 luci.list_view_entry(
384 list_view = view_name,
385 builder = builder,
386 )
387 else:
388 fail("Unexpected value for category: %r" % category)
389
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200390lkgr_builders = {}
391
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100392# Builder-defining functions:
393
Artem Titarenkof6588b72019-11-14 14:28:11 +0100394def webrtc_builder(
395 name,
396 recipe = "standalone",
397 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200398 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100399 priority = 30,
400 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200401 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100402 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200403 """WebRTC specific wrapper around luci.builder.
404
405 Args:
406 name: builder name (str).
407 recipe: string with the name of the recipe to run.
408 dimensions: dict of Swarming dimensions (strings) to search machines by.
409 properties: dict of properties to pass to the recipe (on top of the default ones).
410 priority: int [1-255] or None, indicating swarming task priority, lower is
411 more important. If None, defer the decision to Buildbucket service.
412 execution_timeout: int or None, how long to wait for a running build to finish before
413 forcefully aborting it and marking the build as timed out. If None,
414 defer the decision to Buildbucket service.
415 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
416 decition to the goma module.
417 **kwargs: Pass on to webrtc_builder / luci.builder.
418 Returns:
419 A luci.builder.
420 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100421 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
422
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200423 if goma_jobs != None:
424 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
425 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900426 properties = merge_dicts(properties, {
427 "$recipe_engine/isolated": {
428 "server": "https://isolateserver.appspot.com",
429 },
430 })
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100431 return luci.builder(
432 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200433 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100434 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200435 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100436 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100437 priority = priority,
438 build_numbers = True,
439 swarming_tags = ["vpython:native-python-wrapper"],
440 **kwargs
441 )
442
443def ci_builder(
444 name,
445 ci_cat,
446 perf_cat = None,
447 fyi_cat = None,
448 properties = {},
449 dimensions = {},
450 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100451 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100452 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200453 """Add a post-submit builder.
454
455 Args:
456 name: builder name (str).
457 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
458 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
459 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
460 properties: dict of properties to pass to the recipe (on top of the default ones).
461 dimensions: dict of Swarming dimensions (strings) to search machines by.
462 prioritized: True to make this builder have a higher priority and never batch builds.
463 enabled: False to exclude this builder from consoles and failure notifications.
464 **kwargs: Pass on to webrtc_builder / luci.builder.
465 Returns:
466 A luci.builder.
467
468 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
469 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100470 if prioritized:
471 kwargs["triggering_policy"] = scheduler.greedy_batching(
472 max_batch_size = 1,
473 max_concurrent_invocations = 3,
474 )
475 kwargs["priority"] = 29
476
Oleh Prypinf5432c52019-03-19 15:10:37 +0100477 if enabled:
478 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200479 if ci_cat:
480 lkgr_builders[name] = True
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100481 return webrtc_builder(
482 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700483 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100484 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
485 bucket = "ci",
486 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Oleh Prypinf5432c52019-03-19 15:10:37 +0100487 triggered_by = ["webrtc-gitiles-trigger-master"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100488 repo = WEBRTC_GIT,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200489 notifies = ["post_submit_failure_notifier", "webrtc_tree_closer", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100490 **kwargs
491 )
492
493def try_builder(
494 name,
495 try_cat = True,
496 fyi_cat = None,
497 properties = {},
498 dimensions = {},
499 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100500 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100501 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200502 """Add a pre-submit builder.
503
504 Args:
505 name: builder name (str).
506 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
507 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
508 properties: dict of properties to pass to the recipe (on top of the default ones).
509 dimensions: dict of Swarming dimensions (strings) to search machines by.
510 cq: None to exclude this from all commit queues, or a dict of kwargs for cq_tryjob_verifier.
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100511 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200512 **kwargs: Pass on to webrtc_builder / luci.builder.
513 Returns:
514 A luci.builder.
515 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100516 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
517 if cq != None:
518 luci.cq_tryjob_verifier(
519 builder = name,
520 cq_group = "cq",
521 **cq
522 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100523 if branch_cq:
524 luci.cq_tryjob_verifier(
525 builder = name,
526 cq_group = "cq_branch",
527 **cq
528 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100529
530 return webrtc_builder(
531 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700532 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100533 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
534 bucket = "try",
535 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200536 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100537 **kwargs
538 )
539
540def perf_builder(
541 name,
542 perf_cat,
543 recipe = "standalone",
544 properties = {},
545 dimensions = {},
546 **kwargs):
547 add_milo(name, {"perf": perf_cat})
548 return webrtc_builder(
549 name = name,
550 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700551 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100552 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
553 bucket = "perf",
554 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
555 # log_base of 1.7 means:
556 # when there are P pending builds, LUCI will batch the first B builds.
557 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
558 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200559 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Artem Titarenkof6588b72019-11-14 14:28:11 +0100560 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200561 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100562 **kwargs
563 )
564
Mirko Bonadei12643772020-03-27 13:16:35 +0100565def android_perf_builder(
566 name,
567 perf_cat,
568 recipe = "standalone",
569 properties = {},
570 dimensions = {},
571 **kwargs):
572 return perf_builder(
573 name = name,
574 perf_cat = perf_cat,
575 recipe = recipe,
576 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
577 dimensions = dimensions,
578 **kwargs
579 )
580
581def linux_perf_builder(
582 name,
583 perf_cat,
584 recipe = "standalone",
585 properties = {},
586 dimensions = {},
587 **kwargs):
588 return perf_builder(
589 name = name,
590 perf_cat = perf_cat,
591 recipe = recipe,
592 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
593 dimensions = dimensions,
594 **kwargs
595 )
596
597def mac_perf_builder(
598 name,
599 perf_cat,
600 recipe = "standalone",
601 properties = {},
602 dimensions = {},
603 **kwargs):
604 return perf_builder(
605 name = name,
606 perf_cat = perf_cat,
607 recipe = recipe,
608 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
609 dimensions = dimensions,
610 **kwargs
611 )
612
613def win_perf_builder(
614 name,
615 perf_cat,
616 recipe = "standalone",
617 properties = {},
618 dimensions = {},
619 **kwargs):
620 return perf_builder(
621 name = name,
622 perf_cat = perf_cat,
623 recipe = recipe,
624 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
625 dimensions = dimensions,
626 **kwargs
627 )
628
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100629def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
630 if service_account == None:
631 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100632 add_milo(name, {"cron": True})
633 return webrtc_builder(
634 name = name,
635 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
636 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100637 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100638 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100639 **kwargs
640 )
641
642# Helpers:
643
644def merge_dicts(a, b):
645 """Return the result of merging two dicts.
646
647 If matching values are both dicts or both lists, they will be merged (non-recursively).
648
649 Args:
650 a: first dict.
651 b: second dict (takes priority).
652 Returns:
653 Merged dict.
654 """
655 a = dict(a)
656 for k, bv in b.items():
657 av = a.get(k)
658 if type(av) == "dict" and type(bv) == "dict":
659 a[k] = dict(av)
660 a[k].update(bv)
661 elif type(av) == "list" and type(bv) == "list":
662 a[k] = av + bv
663 else:
664 a[k] = bv
665 return a
666
667def normal_builder_factory(**common_kwargs):
668 def builder(*args, **kwargs):
669 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
670
671 def try_job(*args, **kwargs):
672 return try_builder(*args, **merge_dicts(common_kwargs, 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"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100680 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100681)
682
683android_builder, android_try_job = normal_builder_factory(
684 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100685 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100686)
687
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200688def win_builder(*args, **kwargs):
689 return ci_builder(
690 *args,
691 **merge_dicts({
692 "dimensions": {"os": "Windows"},
693 "properties": GOMA_BACKEND_RBE_ATS_PROD,
694 }, kwargs)
695 )
696
697def win_try_job(*args, **kwargs):
698 return try_builder(
699 *args,
700 **merge_dicts({
701 "dimensions": {"os": "Windows"},
702 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
703 }, kwargs)
704 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100705
706mac_builder, mac_try_job = normal_builder_factory(
707 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100708 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100709)
710
711ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200712 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100713 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100714 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
715 caches = [swarming.cache("osx_sdk")],
716)
717
718# Some iOS builders don't use goma because they build using
719# `use_xcode_clang=true` which is not supported by goma.
720# https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder
721# https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework
722ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200723 dimensions = {"os": "Mac-10.15"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100724 recipe = "ios",
Artem Titov1d47d312020-11-03 14:45:52 +0100725 properties = {"$depot_tools/osx_sdk": {"sdk_version": "12a7209"}},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100726 caches = [swarming.cache("osx_sdk")],
727)
728
729# Actual builder configuration:
730
731android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
732android_try_job("android_compile_arm_dbg", cq = None)
733android_try_job("android_arm_dbg")
734android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
735android_try_job("android_arm_rel")
736android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
737android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200738android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100739android_perf_builder("Perf Android32 (M AOSP Nexus6)", "Android|arm|Tester|M AOSP Nexus6", triggered_by = ["Android32 Builder arm"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100740android_try_job("android_compile_arm64_dbg", cq = None)
741android_try_job("android_arm64_dbg", cq = None)
742android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
743android_try_job("android_arm64_rel")
744android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100745android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
746android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100747android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100748android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
749android_try_job("android_compile_x64_dbg")
750android_try_job("android_compile_x64_rel", cq = None)
751android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
752android_try_job("android_compile_x86_dbg")
753android_builder("Android32 Builder x86", "Android|x86|rel")
754android_try_job("android_compile_x86_rel")
755android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
756android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100757android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100758
759ios_builder("iOS32 Debug", "iOS|arm|dbg")
760ios_try_job("ios_compile_arm_dbg")
761ios_builder("iOS32 Release", "iOS|arm|rel")
762ios_try_job("ios_compile_arm_rel")
763ios_builder("iOS64 Debug", "iOS|arm64|dbg")
764ios_try_job("ios_compile_arm64_dbg")
765ios_builder("iOS64 Release", "iOS|arm64|rel")
766ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100767ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000768ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100769ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000770ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100771ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000772ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100773ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200774ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100775
776linux_builder("Linux32 Debug", "Linux|x86|dbg")
777linux_try_job("linux_x86_dbg")
778linux_builder("Linux32 Release", "Linux|x86|rel")
779linux_try_job("linux_x86_rel")
780linux_builder("Linux64 Debug", "Linux|x64|dbg")
781linux_try_job("linux_dbg", cq = None)
782linux_try_job("linux_compile_dbg")
783linux_builder("Linux64 Release", "Linux|x64|rel")
784linux_try_job("linux_rel")
785linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
786linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100787linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
788linux_perf_builder("Perf Linux Xenial", None, triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100789linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
790linux_try_job("linux_compile_arm_dbg")
791linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
792linux_try_job("linux_compile_arm_rel")
793linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
794linux_try_job("linux_compile_arm64_dbg")
795linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
796linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100797linux_builder("Linux Asan", "Linux|x64|asan")
798linux_try_job("linux_asan")
799linux_builder("Linux MSan", "Linux|x64|msan")
800linux_try_job("linux_msan")
801linux_builder("Linux Tsan v2", "Linux|x64|tsan")
802linux_try_job("linux_tsan2")
803linux_builder("Linux UBSan", "Linux|x64|ubsan")
804linux_try_job("linux_ubsan")
805linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
806linux_try_job("linux_ubsan_vptr")
807linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
808linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
809linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
810linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100811linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100812linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100813
814mac_builder("Mac64 Debug", "Mac|x64|dbg")
815mac_try_job("mac_dbg", cq = None)
816mac_try_job("mac_compile_dbg")
817mac_builder("Mac64 Release", "Mac|x64|rel")
Andrey Logvina9501222021-04-27 18:08:39 +0000818mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100819mac_try_job("mac_compile_rel", cq = None)
820mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100821mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100822mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000823mac_try_job("mac_asan")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100824mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200825mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100826
827win_builder("Win32 Debug", "Win MSVC|x86|dbg")
828win_try_job("win_x86_msvc_dbg")
829win_try_job("win_compile_x86_msvc_dbg", cq = None)
Oleh Prypin63041b82019-03-19 22:56:01 +0000830win_builder("Win32 Release", "Win MSVC|x86|rel")
831win_try_job("win_x86_msvc_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100832win_try_job("win_compile_x86_msvc_rel", cq = None)
833win_builder("Win64 Debug", "Win MSVC|x64|dbg")
834win_try_job("win_x64_msvc_dbg")
835win_try_job("win_compile_x64_msvc_dbg", cq = None)
836win_builder("Win64 Release", "Win MSVC|x64|rel")
837win_try_job("win_x64_msvc_rel")
838win_try_job("win_compile_x64_msvc_rel", cq = None)
839win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
840win_try_job("win_x86_clang_dbg", cq = None)
841win_try_job("win_compile_x86_clang_dbg")
842win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
843win_try_job("win_x86_clang_rel")
844win_try_job("win_compile_x86_clang_rel", cq = None)
845win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100846win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100847win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
848win_try_job("win_x64_clang_dbg", cq = None)
849win_try_job("win_x64_clang_dbg_win8", cq = None)
850win_try_job("win_x64_clang_dbg_win10", cq = None)
851win_try_job("win_compile_x64_clang_dbg")
852win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
853win_try_job("win_x64_clang_rel", cq = None)
854win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200855win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100856win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100857win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
858win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200859win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
860win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100861
862linux_try_job(
863 "presubmit",
864 recipe = "run_presubmit",
865 properties = {"repo_name": "webrtc", "runhooks": True},
866 priority = 28,
867 cq = {"disable_reuse": True},
868)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100869
870cron_builder(
871 "Auto-roll - WebRTC DEPS",
872 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200873 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100874)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200875
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100876cron_builder(
877 "WebRTC version update",
878 recipe = "update_webrtc_binary_version",
879 schedule = "0 4 * * *", # Every day at 4am.
880 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
881)
882
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100883skipped_lkgr_bots = [
884 "iOS64 Sim Debug (iOS 14.0)",
885 "iOS64 Sim Debug (iOS 13)",
886 "iOS64 Sim Debug (iOS 12)",
Christoffer Jansson1dbc6062021-06-10 10:01:25 +0200887 "MacARM64 M1 Release",
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100888]
889
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200890lkgr_config = {
891 "project": "webrtc",
892 "source_url": WEBRTC_GIT,
893 "status_url": "https://webrtc-status.appspot.com",
894 "allowed_lag": 300, # hours
895 "allowed_gap": 12, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200896 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200897 "buckets": {
898 "webrtc/ci": {
899 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100900 "builders": [
901 b
902 for b in sorted(lkgr_builders)
903 if b not in skipped_lkgr_bots
904 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200905 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200906 "chromium/webrtc.fyi": {
907 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200908 "builders": [
909 "WebRTC Chromium FYI Android Builder (dbg)",
910 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
911 "WebRTC Chromium FYI Android Builder",
Mirko Bonadei04fe32f2020-05-01 00:45:58 +0200912 "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200913 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
914 "WebRTC Chromium FYI Linux Builder (dbg)",
915 "WebRTC Chromium FYI Linux Builder",
916 "WebRTC Chromium FYI Linux Tester",
917 "WebRTC Chromium FYI Mac Builder (dbg)",
918 "WebRTC Chromium FYI Mac Builder",
919 "WebRTC Chromium FYI Mac Tester",
920 "WebRTC Chromium FYI Win Builder (dbg)",
921 "WebRTC Chromium FYI Win Builder",
922 "WebRTC Chromium FYI Win10 Tester",
Mirko Bonadeif1ef9292021-03-25 18:07:48 +0100923 # TODO(bugs.webrtc.org/12616): Re-enable when the gclient
924 # runhooks step is fixed or skipped.
925 # "WebRTC Chromium FYI Win7 Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200926 "WebRTC Chromium FYI Win8 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100927 "WebRTC Chromium FYI ios-device",
928 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200929 ],
930 },
931 },
932}
933
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100934cron_builder(
935 "WebRTC lkgr finder",
936 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200937 properties = {
938 "project": "webrtc",
939 "repo": WEBRTC_GIT,
940 "ref": "refs/heads/lkgr",
941 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
942 "config": lkgr_config,
943 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100944 schedule = "*/10 * * * *", # Every 10 minutes.
945)