blob: 014306c4306466b894e9eeb80bbd0cbf697d99aa [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(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200126 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100127 bucket = "ci",
128 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200129 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100130)
131
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200132# Swarming permissions:
133
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200134luci.realm(name = "pools/cron", bindings = [
135 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
136 luci.binding(
137 roles = "role/swarming.poolUser",
138 projects = "libyuv",
139 ),
140])
141
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200142luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200143luci.realm(name = "pools/ci-tests", bindings = [
144 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
145 luci.binding(
146 roles = "role/swarming.poolUser",
147 groups = "project-webrtc-ci-task-accounts",
148 ),
149 # Allow tasks here to use .ci task service accounts.
150 luci.binding(
151 roles = "role/swarming.taskServiceAccount",
152 groups = "project-webrtc-ci-task-accounts",
153 ),
154])
155
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200156luci.realm(name = "pools/try")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200157luci.realm(name = "pools/try-tests", bindings = [
158 # Allow task service accounts of .try pool/bucket to trigger tasks here.
159 luci.binding(
160 roles = "role/swarming.poolUser",
161 groups = "project-webrtc-try-task-accounts",
162 ),
163 # Allow tasks here to use .try task service accounts.
164 luci.binding(
165 roles = "role/swarming.taskServiceAccount",
166 groups = "project-webrtc-try-task-accounts",
167 ),
168])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200169
170# Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
171luci.binding(
172 realm = "@root",
173 roles = "role/swarming.poolUser",
174 groups = "project-webrtc-admins",
175)
176luci.binding(
177 realm = "@root",
178 roles = "role/swarming.taskTriggerer",
179 groups = "project-webrtc-admins",
180)
181
182# Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
183luci.binding(
184 realm = "pools/try",
185 roles = "role/swarming.poolUser",
186 groups = "project-webrtc-led-users",
187)
188luci.binding(
189 realm = "try",
190 roles = "role/swarming.taskTriggerer",
191 groups = "project-webrtc-led-users",
192)
193
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100194# Bucket definitions:
195
196luci.bucket(
197 name = "try",
198 acls = [
199 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
200 "service-account-cq",
201 "project-webrtc-tryjob-access",
202 ]),
203 ],
204)
205
206luci.bucket(
207 name = "ci",
208 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200209 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
210 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100211 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200212 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
213 # Allow Pinpoint to trigger builds for bisection
214 "service-account-chromeperf",
215 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100216 ],
217)
218
219luci.bucket(
220 name = "perf",
221 acls = [
222 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100223 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
224 ]),
225 ],
226)
227
228luci.bucket(
229 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100230)
231
232# Commit queue definitions:
233
234luci.cq_group(
235 name = "cq",
236 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200237 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100238 acls = [
239 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
240 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
241 ],
242 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200243 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100244)
245
246luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100247 name = "cq_branch",
248 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
249 acls = [
250 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
251 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
252 ],
253 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200254 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100255)
256
257luci.cq_group(
258 name = "cq_infra",
259 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100260 acls = [
261 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
262 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
263 ],
264 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200265 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100266)
267
268luci.cq_tryjob_verifier(
269 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100270 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100271)
272
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200273luci.cq_tryjob_verifier(
274 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
275 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
276 cq_group = "cq",
277)
278
Oleh Prypin71d17422019-03-28 08:43:16 +0100279# Notifier definitions:
280
281luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200282 name = "post_submit_failure_notifier",
283 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200284 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200285 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200286 name = "build_failure",
287 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200288 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100289)
290
291luci.notifier(
292 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200293 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200294 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200295 template = luci.notifier_template(
296 name = "cron",
297 body = io.read_file("luci-notify/email-templates/cron.template"),
298 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100299)
300
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200301luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200302 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200303 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200304 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200305 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200306 name = "infra_failure",
307 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200308 ),
309)
310
Owen Rodley6b721ba2020-05-26 10:04:20 +1000311# Tree closer definitions:
312
313luci.tree_closer(
314 name = "webrtc_tree_closer",
315 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000316 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
317 # that LUCI-Notify would take the exact same actions. Once we've switched
318 # over, this should be updated - several of these steps don't exist in
319 # WebRTC recipes.
320 failed_step_regexp = [
321 "bot_update",
322 "compile",
323 "gclient runhooks",
324 "runhooks",
325 "update",
326 "extract build",
327 "cleanup_temp",
328 "taskkill",
329 "compile",
330 "gn",
331 ],
332 failed_step_regexp_exclude = ".*\\(experimental\\).*",
333)
334
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100335# Recipe definitions:
336
337def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
338 return luci.recipe(
339 name = recipe.split("/")[-1],
340 cipd_package = pkg,
341 cipd_version = "refs/heads/master",
342 recipe = recipe,
343 )
344
345recipe("chromium_trybot")
346recipe("run_presubmit")
347recipe("webrtc/auto_roll_webrtc_deps")
348recipe("webrtc/ios")
349recipe("webrtc/ios_api_framework")
350recipe("webrtc/libfuzzer")
351recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100352recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100353recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800354recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100355
356# Console definitions:
357
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700358luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
359luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100360luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100361luci.list_view(name = "try", title = "Tryserver")
362
363def add_milo(builder, views):
364 """Add Milo console entries for the builder.
365
366 Args:
367 builder: builder name (str).
368 views: dict where keys are names of consoles and values are either a
369 category for the console (str, pipe-separated) or True, which means
370 adding to a list view rather than a console.
371 """
372 for view_name, category in views.items():
373 if category == None:
374 continue
375 elif type(category) == "string":
376 category, _, short_name = category.rpartition("|")
377 luci.console_view_entry(
378 console_view = view_name,
379 builder = builder,
380 category = category or None,
381 short_name = short_name or None,
382 )
383 elif category == True:
384 luci.list_view_entry(
385 list_view = view_name,
386 builder = builder,
387 )
388 else:
389 fail("Unexpected value for category: %r" % category)
390
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200391lkgr_builders = {}
392
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100393# Builder-defining functions:
394
Artem Titarenkof6588b72019-11-14 14:28:11 +0100395def webrtc_builder(
396 name,
397 recipe = "standalone",
398 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200399 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100400 priority = 30,
401 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200402 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100403 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200404 """WebRTC specific wrapper around luci.builder.
405
406 Args:
407 name: builder name (str).
408 recipe: string with the name of the recipe to run.
409 dimensions: dict of Swarming dimensions (strings) to search machines by.
410 properties: dict of properties to pass to the recipe (on top of the default ones).
411 priority: int [1-255] or None, indicating swarming task priority, lower is
412 more important. If None, defer the decision to Buildbucket service.
413 execution_timeout: int or None, how long to wait for a running build to finish before
414 forcefully aborting it and marking the build as timed out. If None,
415 defer the decision to Buildbucket service.
416 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
417 decition to the goma module.
418 **kwargs: Pass on to webrtc_builder / luci.builder.
419 Returns:
420 A luci.builder.
421 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100422 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
423
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200424 if goma_jobs != None:
425 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
426 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900427 properties = merge_dicts(properties, {
428 "$recipe_engine/isolated": {
429 "server": "https://isolateserver.appspot.com",
430 },
431 })
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100432 return luci.builder(
433 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200434 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100435 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200436 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100437 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100438 priority = priority,
439 build_numbers = True,
440 swarming_tags = ["vpython:native-python-wrapper"],
441 **kwargs
442 )
443
444def ci_builder(
445 name,
446 ci_cat,
447 perf_cat = None,
448 fyi_cat = None,
449 properties = {},
450 dimensions = {},
451 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100452 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100453 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200454 """Add a post-submit builder.
455
456 Args:
457 name: builder name (str).
458 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
459 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
460 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
461 properties: dict of properties to pass to the recipe (on top of the default ones).
462 dimensions: dict of Swarming dimensions (strings) to search machines by.
463 prioritized: True to make this builder have a higher priority and never batch builds.
464 enabled: False to exclude this builder from consoles and failure notifications.
465 **kwargs: Pass on to webrtc_builder / luci.builder.
466 Returns:
467 A luci.builder.
468
469 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
470 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100471 if prioritized:
472 kwargs["triggering_policy"] = scheduler.greedy_batching(
473 max_batch_size = 1,
474 max_concurrent_invocations = 3,
475 )
476 kwargs["priority"] = 29
477
Oleh Prypinf5432c52019-03-19 15:10:37 +0100478 if enabled:
479 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200480 if ci_cat:
481 lkgr_builders[name] = True
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100482 return webrtc_builder(
483 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700484 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100485 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
486 bucket = "ci",
487 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200488 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100489 repo = WEBRTC_GIT,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200490 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 +0100491 **kwargs
492 )
493
494def try_builder(
495 name,
496 try_cat = True,
497 fyi_cat = None,
498 properties = {},
499 dimensions = {},
500 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100501 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100502 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200503 """Add a pre-submit builder.
504
505 Args:
506 name: builder name (str).
507 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
508 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
509 properties: dict of properties to pass to the recipe (on top of the default ones).
510 dimensions: dict of Swarming dimensions (strings) to search machines by.
511 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 +0100512 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200513 **kwargs: Pass on to webrtc_builder / luci.builder.
514 Returns:
515 A luci.builder.
516 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100517 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
518 if cq != None:
519 luci.cq_tryjob_verifier(
520 builder = name,
521 cq_group = "cq",
522 **cq
523 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100524 if branch_cq:
525 luci.cq_tryjob_verifier(
526 builder = name,
527 cq_group = "cq_branch",
528 **cq
529 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100530
531 return webrtc_builder(
532 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700533 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100534 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
535 bucket = "try",
536 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200537 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100538 **kwargs
539 )
540
541def perf_builder(
542 name,
543 perf_cat,
544 recipe = "standalone",
545 properties = {},
546 dimensions = {},
547 **kwargs):
548 add_milo(name, {"perf": perf_cat})
549 return webrtc_builder(
550 name = name,
551 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700552 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100553 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
554 bucket = "perf",
555 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
556 # log_base of 1.7 means:
557 # when there are P pending builds, LUCI will batch the first B builds.
558 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
559 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200560 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Artem Titarenkof6588b72019-11-14 14:28:11 +0100561 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200562 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100563 **kwargs
564 )
565
Mirko Bonadei12643772020-03-27 13:16:35 +0100566def android_perf_builder(
567 name,
568 perf_cat,
569 recipe = "standalone",
570 properties = {},
571 dimensions = {},
572 **kwargs):
573 return perf_builder(
574 name = name,
575 perf_cat = perf_cat,
576 recipe = recipe,
577 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
578 dimensions = dimensions,
579 **kwargs
580 )
581
582def linux_perf_builder(
583 name,
584 perf_cat,
585 recipe = "standalone",
586 properties = {},
587 dimensions = {},
588 **kwargs):
589 return perf_builder(
590 name = name,
591 perf_cat = perf_cat,
592 recipe = recipe,
593 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
594 dimensions = dimensions,
595 **kwargs
596 )
597
598def mac_perf_builder(
599 name,
600 perf_cat,
601 recipe = "standalone",
602 properties = {},
603 dimensions = {},
604 **kwargs):
605 return perf_builder(
606 name = name,
607 perf_cat = perf_cat,
608 recipe = recipe,
609 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
610 dimensions = dimensions,
611 **kwargs
612 )
613
614def win_perf_builder(
615 name,
616 perf_cat,
617 recipe = "standalone",
618 properties = {},
619 dimensions = {},
620 **kwargs):
621 return perf_builder(
622 name = name,
623 perf_cat = perf_cat,
624 recipe = recipe,
625 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
626 dimensions = dimensions,
627 **kwargs
628 )
629
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100630def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
631 if service_account == None:
632 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100633 add_milo(name, {"cron": True})
634 return webrtc_builder(
635 name = name,
636 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
637 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100638 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100639 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100640 **kwargs
641 )
642
643# Helpers:
644
645def merge_dicts(a, b):
646 """Return the result of merging two dicts.
647
648 If matching values are both dicts or both lists, they will be merged (non-recursively).
649
650 Args:
651 a: first dict.
652 b: second dict (takes priority).
653 Returns:
654 Merged dict.
655 """
656 a = dict(a)
657 for k, bv in b.items():
658 av = a.get(k)
659 if type(av) == "dict" and type(bv) == "dict":
660 a[k] = dict(av)
661 a[k].update(bv)
662 elif type(av) == "list" and type(bv) == "list":
663 a[k] = av + bv
664 else:
665 a[k] = bv
666 return a
667
668def normal_builder_factory(**common_kwargs):
669 def builder(*args, **kwargs):
670 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
671
672 def try_job(*args, **kwargs):
673 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
674
675 return builder, try_job
676
677# Mixins:
678
679linux_builder, linux_try_job = normal_builder_factory(
680 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100681 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100682)
683
684android_builder, android_try_job = normal_builder_factory(
685 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100686 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100687)
688
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200689def win_builder(*args, **kwargs):
690 return ci_builder(
691 *args,
692 **merge_dicts({
693 "dimensions": {"os": "Windows"},
694 "properties": GOMA_BACKEND_RBE_ATS_PROD,
695 }, kwargs)
696 )
697
698def win_try_job(*args, **kwargs):
699 return try_builder(
700 *args,
701 **merge_dicts({
702 "dimensions": {"os": "Windows"},
703 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
704 }, kwargs)
705 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100706
707mac_builder, mac_try_job = normal_builder_factory(
708 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100709 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100710)
711
712ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200713 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100714 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100715 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
716 caches = [swarming.cache("osx_sdk")],
717)
718
719# Some iOS builders don't use goma because they build using
720# `use_xcode_clang=true` which is not supported by goma.
721# https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder
722# https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework
723ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200724 dimensions = {"os": "Mac-10.15"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100725 recipe = "ios",
Artem Titov1d47d312020-11-03 14:45:52 +0100726 properties = {"$depot_tools/osx_sdk": {"sdk_version": "12a7209"}},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100727 caches = [swarming.cache("osx_sdk")],
728)
729
730# Actual builder configuration:
731
732android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
733android_try_job("android_compile_arm_dbg", cq = None)
734android_try_job("android_arm_dbg")
735android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
736android_try_job("android_arm_rel")
737android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
738android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200739android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100740android_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 +0100741android_try_job("android_compile_arm64_dbg", cq = None)
742android_try_job("android_arm64_dbg", cq = None)
743android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
744android_try_job("android_arm64_rel")
745android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100746android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
747android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100748android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100749android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
750android_try_job("android_compile_x64_dbg")
751android_try_job("android_compile_x64_rel", cq = None)
752android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
753android_try_job("android_compile_x86_dbg")
754android_builder("Android32 Builder x86", "Android|x86|rel")
755android_try_job("android_compile_x86_rel")
756android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
757android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100758android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100759
760ios_builder("iOS32 Debug", "iOS|arm|dbg")
761ios_try_job("ios_compile_arm_dbg")
762ios_builder("iOS32 Release", "iOS|arm|rel")
763ios_try_job("ios_compile_arm_rel")
764ios_builder("iOS64 Debug", "iOS|arm64|dbg")
765ios_try_job("ios_compile_arm64_dbg")
766ios_builder("iOS64 Release", "iOS|arm64|rel")
767ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100768ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000769ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100770ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000771ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100772ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000773ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100774ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200775ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100776
777linux_builder("Linux32 Debug", "Linux|x86|dbg")
778linux_try_job("linux_x86_dbg")
779linux_builder("Linux32 Release", "Linux|x86|rel")
780linux_try_job("linux_x86_rel")
781linux_builder("Linux64 Debug", "Linux|x64|dbg")
782linux_try_job("linux_dbg", cq = None)
783linux_try_job("linux_compile_dbg")
784linux_builder("Linux64 Release", "Linux|x64|rel")
785linux_try_job("linux_rel")
786linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
787linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100788linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
789linux_perf_builder("Perf Linux Xenial", None, triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100790linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
791linux_try_job("linux_compile_arm_dbg")
792linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
793linux_try_job("linux_compile_arm_rel")
794linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
795linux_try_job("linux_compile_arm64_dbg")
796linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
797linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100798linux_builder("Linux Asan", "Linux|x64|asan")
799linux_try_job("linux_asan")
800linux_builder("Linux MSan", "Linux|x64|msan")
801linux_try_job("linux_msan")
802linux_builder("Linux Tsan v2", "Linux|x64|tsan")
803linux_try_job("linux_tsan2")
804linux_builder("Linux UBSan", "Linux|x64|ubsan")
805linux_try_job("linux_ubsan")
806linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
807linux_try_job("linux_ubsan_vptr")
808linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
809linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
810linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
811linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100812linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100813linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100814
815mac_builder("Mac64 Debug", "Mac|x64|dbg")
816mac_try_job("mac_dbg", cq = None)
817mac_try_job("mac_compile_dbg")
818mac_builder("Mac64 Release", "Mac|x64|rel")
Andrey Logvina9501222021-04-27 18:08:39 +0000819mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100820mac_try_job("mac_compile_rel", cq = None)
821mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100822mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100823mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000824mac_try_job("mac_asan")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100825mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200826mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100827
828win_builder("Win32 Debug", "Win MSVC|x86|dbg")
829win_try_job("win_x86_msvc_dbg")
830win_try_job("win_compile_x86_msvc_dbg", cq = None)
Oleh Prypin63041b82019-03-19 22:56:01 +0000831win_builder("Win32 Release", "Win MSVC|x86|rel")
832win_try_job("win_x86_msvc_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100833win_try_job("win_compile_x86_msvc_rel", cq = None)
834win_builder("Win64 Debug", "Win MSVC|x64|dbg")
835win_try_job("win_x64_msvc_dbg")
836win_try_job("win_compile_x64_msvc_dbg", cq = None)
837win_builder("Win64 Release", "Win MSVC|x64|rel")
838win_try_job("win_x64_msvc_rel")
839win_try_job("win_compile_x64_msvc_rel", cq = None)
840win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
841win_try_job("win_x86_clang_dbg", cq = None)
842win_try_job("win_compile_x86_clang_dbg")
843win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
844win_try_job("win_x86_clang_rel")
845win_try_job("win_compile_x86_clang_rel", cq = None)
846win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100847win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100848win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
849win_try_job("win_x64_clang_dbg", cq = None)
850win_try_job("win_x64_clang_dbg_win8", cq = None)
851win_try_job("win_x64_clang_dbg_win10", cq = None)
852win_try_job("win_compile_x64_clang_dbg")
853win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
854win_try_job("win_x64_clang_rel", cq = None)
855win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200856win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100857win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100858win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
859win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200860win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
861win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100862
863linux_try_job(
864 "presubmit",
865 recipe = "run_presubmit",
866 properties = {"repo_name": "webrtc", "runhooks": True},
867 priority = 28,
868 cq = {"disable_reuse": True},
869)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100870
871cron_builder(
872 "Auto-roll - WebRTC DEPS",
873 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200874 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100875)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200876
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100877cron_builder(
878 "WebRTC version update",
879 recipe = "update_webrtc_binary_version",
880 schedule = "0 4 * * *", # Every day at 4am.
881 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
882)
883
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100884skipped_lkgr_bots = [
885 "iOS64 Sim Debug (iOS 14.0)",
886 "iOS64 Sim Debug (iOS 13)",
887 "iOS64 Sim Debug (iOS 12)",
Christoffer Jansson1dbc6062021-06-10 10:01:25 +0200888 "MacARM64 M1 Release",
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100889]
890
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200891lkgr_config = {
892 "project": "webrtc",
893 "source_url": WEBRTC_GIT,
894 "status_url": "https://webrtc-status.appspot.com",
895 "allowed_lag": 300, # hours
896 "allowed_gap": 12, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200897 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200898 "buckets": {
899 "webrtc/ci": {
900 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100901 "builders": [
902 b
903 for b in sorted(lkgr_builders)
904 if b not in skipped_lkgr_bots
905 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200906 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200907 "chromium/webrtc.fyi": {
908 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200909 "builders": [
910 "WebRTC Chromium FYI Android Builder (dbg)",
911 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
912 "WebRTC Chromium FYI Android Builder",
Mirko Bonadei04fe32f2020-05-01 00:45:58 +0200913 "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200914 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
915 "WebRTC Chromium FYI Linux Builder (dbg)",
916 "WebRTC Chromium FYI Linux Builder",
917 "WebRTC Chromium FYI Linux Tester",
918 "WebRTC Chromium FYI Mac Builder (dbg)",
919 "WebRTC Chromium FYI Mac Builder",
920 "WebRTC Chromium FYI Mac Tester",
921 "WebRTC Chromium FYI Win Builder (dbg)",
922 "WebRTC Chromium FYI Win Builder",
923 "WebRTC Chromium FYI Win10 Tester",
Mirko Bonadeif1ef9292021-03-25 18:07:48 +0100924 # TODO(bugs.webrtc.org/12616): Re-enable when the gclient
925 # runhooks step is fixed or skipped.
926 # "WebRTC Chromium FYI Win7 Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200927 "WebRTC Chromium FYI Win8 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100928 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200929 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200930 ],
931 },
932 },
933}
934
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100935cron_builder(
936 "WebRTC lkgr finder",
937 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200938 properties = {
939 "project": "webrtc",
940 "repo": WEBRTC_GIT,
941 "ref": "refs/heads/lkgr",
942 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
943 "config": lkgr_config,
944 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100945 schedule = "*/10 * * * *", # Every 10 minutes.
946)