blob: 476cd574030a9814141316983abf6fb40da7e79f [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
Christoffer Janssona814c562021-09-09 13:44:54 +02007# https://chromium.googlesource.com/infra/luci/luci-go/+/main/lucicfg/doc/
Oleh Prypin1a0593f2019-03-11 09:43:28 +01008
Jeremy Leconteea2016b2020-07-01 09:47:22 +02009"""LUCI project configuration for WebRTC CQ and CI."""
10
Vadim Shtayurac3b27562021-10-25 17:05:37 -070011lucicfg.check_version("1.29.1")
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
Artem Titov70d45af2021-10-11 13:25:18 +020049# Add names of builders to remove from LKGR finder to this list. This is
50# useful when a failure can be safely ignored while fixing it without
51# blocking the LKGR finder on it.
52skipped_lkgr_bots = [
Artem Titov70d45af2021-10-11 13:25:18 +020053]
54
Oleh Prypin1a0593f2019-03-11 09:43:28 +010055# Top-level configs:
56
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020057# Enable LUCI Realms support.
58lucicfg.enable_experiment("crbug.com/1085650")
59
Andrii Shyshkalov32515d42021-04-29 14:39:42 +020060# Launch all builds in "realms-aware mode", crbug.com/1177975.
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010061luci.builder.defaults.experiments.set(
62 {
63 "luci.use_realms": 100,
64 "luci.recipes.use_python3": 100,
65 },
66)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020067
Oleh Prypin1a0593f2019-03-11 09:43:28 +010068lucicfg.config(
69 config_dir = ".",
70 tracked_files = [
71 "commit-queue.cfg",
72 "cr-buildbucket.cfg",
73 "luci-logdog.cfg",
74 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010075 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020076 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010077 "luci-scheduler.cfg",
78 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020079 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010080 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020081 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010082)
83
84luci.project(
85 name = "webrtc",
86 buildbucket = "cr-buildbucket.appspot.com",
87 logdog = "luci-logdog.appspot.com",
88 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010089 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010090 scheduler = "luci-scheduler.appspot.com",
91 swarming = "chromium-swarm.appspot.com",
92 acls = [
93 acl.entry(
94 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
95 groups = ["all"],
96 ),
97 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
98 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
99 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200100 bindings = [
101 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800102 roles = "role/configs.validator",
103 users = [
104 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
105 ],
106 ),
107 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200108 roles = "role/swarming.poolOwner",
109 groups = "project-webrtc-admins",
110 ),
111 luci.binding(
112 roles = "role/swarming.poolViewer",
113 groups = "all",
114 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200115 # Allow any WebRTC build to trigger a test ran under chromium-tester@
116 # task service account.
117 luci.binding(
118 roles = "role/swarming.taskServiceAccount",
119 users = [
120 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
121 ],
122 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200123 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100124)
125
126luci.logdog(
127 gs_bucket = "chromium-luci-logdog",
128)
129
130luci.milo(
131 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
132)
133
Owen Rodleya55c38e2020-06-15 11:16:10 +1000134luci.notify(tree_closing_enabled = True)
135
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100136luci.cq(
137 status_host = "chromium-cq-status.appspot.com",
138 submit_max_burst = 1,
139 submit_burst_delay = 1 * time.minute,
140)
141
142luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200143 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100144 bucket = "ci",
145 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200146 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100147)
148
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200149# Swarming permissions:
150
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200151luci.realm(name = "pools/cron", bindings = [
152 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
153 luci.binding(
154 roles = "role/swarming.poolUser",
155 projects = "libyuv",
156 ),
157])
158
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200159luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200160luci.realm(name = "pools/ci-tests", bindings = [
161 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
162 luci.binding(
163 roles = "role/swarming.poolUser",
164 groups = "project-webrtc-ci-task-accounts",
165 ),
166 # Allow tasks here to use .ci task service accounts.
167 luci.binding(
168 roles = "role/swarming.taskServiceAccount",
169 groups = "project-webrtc-ci-task-accounts",
170 ),
171])
172
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200173luci.realm(name = "pools/try")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200174luci.realm(name = "pools/try-tests", bindings = [
175 # Allow task service accounts of .try pool/bucket to trigger tasks here.
176 luci.binding(
177 roles = "role/swarming.poolUser",
178 groups = "project-webrtc-try-task-accounts",
179 ),
180 # Allow tasks here to use .try task service accounts.
181 luci.binding(
182 roles = "role/swarming.taskServiceAccount",
183 groups = "project-webrtc-try-task-accounts",
184 ),
185])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200186
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200187# Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
188luci.realm(name = "pools/perf", bindings = [
189 luci.binding(
190 roles = "role/swarming.poolUser",
191 groups = "project-webrtc-led-users",
192 ),
193])
194luci.binding(
195 realm = "perf",
196 roles = "role/swarming.taskTriggerer",
197 groups = "project-webrtc-led-users",
198)
199
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200200# Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
201luci.binding(
202 realm = "@root",
203 roles = "role/swarming.poolUser",
204 groups = "project-webrtc-admins",
205)
206luci.binding(
207 realm = "@root",
208 roles = "role/swarming.taskTriggerer",
209 groups = "project-webrtc-admins",
210)
211
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200212# Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200213luci.binding(
214 realm = "pools/try",
215 roles = "role/swarming.poolUser",
216 groups = "project-webrtc-led-users",
217)
218luci.binding(
219 realm = "try",
220 roles = "role/swarming.taskTriggerer",
221 groups = "project-webrtc-led-users",
222)
223
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100224# Bucket definitions:
225
226luci.bucket(
227 name = "try",
228 acls = [
229 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
230 "service-account-cq",
231 "project-webrtc-tryjob-access",
232 ]),
233 ],
234)
235
236luci.bucket(
237 name = "ci",
238 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200239 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
240 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100241 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200242 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
243 # Allow Pinpoint to trigger builds for bisection
244 "service-account-chromeperf",
245 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100246 ],
247)
248
249luci.bucket(
250 name = "perf",
251 acls = [
252 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100253 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
254 ]),
255 ],
256)
257
258luci.bucket(
259 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100260)
261
262# Commit queue definitions:
263
264luci.cq_group(
265 name = "cq",
266 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200267 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100268 acls = [
269 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
270 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
271 ],
272 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200273 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100274)
275
276luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100277 name = "cq_branch",
278 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
279 acls = [
280 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
281 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
282 ],
283 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200284 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100285)
286
287luci.cq_group(
288 name = "cq_infra",
289 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100290 acls = [
291 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
292 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
293 ],
294 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200295 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100296)
297
298luci.cq_tryjob_verifier(
299 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100300 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100301)
302
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200303luci.cq_tryjob_verifier(
304 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
305 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
306 cq_group = "cq",
307)
308
Oleh Prypin71d17422019-03-28 08:43:16 +0100309# Notifier definitions:
310
311luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200312 name = "post_submit_failure_notifier",
313 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200314 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200315 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200316 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200317 name = "build_failure",
318 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200319 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100320)
321
322luci.notifier(
323 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200324 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200325 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200326 template = luci.notifier_template(
327 name = "cron",
328 body = io.read_file("luci-notify/email-templates/cron.template"),
329 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100330)
331
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200332luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200333 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200334 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200335 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200336 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200337 name = "infra_failure",
338 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200339 ),
340)
341
Owen Rodley6b721ba2020-05-26 10:04:20 +1000342# Tree closer definitions:
343
344luci.tree_closer(
345 name = "webrtc_tree_closer",
346 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000347 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
348 # that LUCI-Notify would take the exact same actions. Once we've switched
349 # over, this should be updated - several of these steps don't exist in
350 # WebRTC recipes.
351 failed_step_regexp = [
352 "bot_update",
353 "compile",
354 "gclient runhooks",
355 "runhooks",
356 "update",
357 "extract build",
358 "cleanup_temp",
359 "taskkill",
360 "compile",
361 "gn",
362 ],
363 failed_step_regexp_exclude = ".*\\(experimental\\).*",
364)
365
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100366# Recipe definitions:
367
368def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
369 return luci.recipe(
370 name = recipe.split("/")[-1],
371 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200372 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100373 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100374 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100375 )
376
377recipe("chromium_trybot")
378recipe("run_presubmit")
379recipe("webrtc/auto_roll_webrtc_deps")
380recipe("webrtc/ios")
381recipe("webrtc/ios_api_framework")
382recipe("webrtc/libfuzzer")
383recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100384recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100385recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800386recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100387
388# Console definitions:
389
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700390luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
391luci.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 +0100392luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100393luci.list_view(name = "try", title = "Tryserver")
394
395def add_milo(builder, views):
396 """Add Milo console entries for the builder.
397
398 Args:
399 builder: builder name (str).
400 views: dict where keys are names of consoles and values are either a
401 category for the console (str, pipe-separated) or True, which means
402 adding to a list view rather than a console.
403 """
404 for view_name, category in views.items():
405 if category == None:
406 continue
407 elif type(category) == "string":
408 category, _, short_name = category.rpartition("|")
409 luci.console_view_entry(
410 console_view = view_name,
411 builder = builder,
412 category = category or None,
413 short_name = short_name or None,
414 )
415 elif category == True:
416 luci.list_view_entry(
417 list_view = view_name,
418 builder = builder,
419 )
420 else:
421 fail("Unexpected value for category: %r" % category)
422
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200423lkgr_builders = {}
424
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100425# Builder-defining functions:
426
Artem Titarenkof6588b72019-11-14 14:28:11 +0100427def webrtc_builder(
428 name,
429 recipe = "standalone",
430 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200431 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100432 priority = 30,
433 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200434 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100435 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200436 """WebRTC specific wrapper around luci.builder.
437
438 Args:
439 name: builder name (str).
440 recipe: string with the name of the recipe to run.
441 dimensions: dict of Swarming dimensions (strings) to search machines by.
442 properties: dict of properties to pass to the recipe (on top of the default ones).
443 priority: int [1-255] or None, indicating swarming task priority, lower is
444 more important. If None, defer the decision to Buildbucket service.
445 execution_timeout: int or None, how long to wait for a running build to finish before
446 forcefully aborting it and marking the build as timed out. If None,
447 defer the decision to Buildbucket service.
448 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
449 decition to the goma module.
450 **kwargs: Pass on to webrtc_builder / luci.builder.
451 Returns:
452 A luci.builder.
453 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100454 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
455
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200456 if goma_jobs != None:
457 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
458 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900459 properties = merge_dicts(properties, {
460 "$recipe_engine/isolated": {
461 "server": "https://isolateserver.appspot.com",
462 },
463 })
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100464 return luci.builder(
465 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200466 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100467 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200468 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100469 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100470 priority = priority,
471 build_numbers = True,
472 swarming_tags = ["vpython:native-python-wrapper"],
Jeremy Lecontef2312112021-11-12 11:55:27 +0100473 resultdb_settings = resultdb.settings(enable = True),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100474 **kwargs
475 )
476
477def ci_builder(
478 name,
479 ci_cat,
480 perf_cat = None,
481 fyi_cat = None,
482 properties = {},
483 dimensions = {},
484 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100485 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100486 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200487 """Add a post-submit builder.
488
489 Args:
490 name: builder name (str).
491 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
492 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
493 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
494 properties: dict of properties to pass to the recipe (on top of the default ones).
495 dimensions: dict of Swarming dimensions (strings) to search machines by.
496 prioritized: True to make this builder have a higher priority and never batch builds.
497 enabled: False to exclude this builder from consoles and failure notifications.
498 **kwargs: Pass on to webrtc_builder / luci.builder.
499 Returns:
500 A luci.builder.
501
502 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
503 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100504 if prioritized:
505 kwargs["triggering_policy"] = scheduler.greedy_batching(
506 max_batch_size = 1,
507 max_concurrent_invocations = 3,
508 )
509 kwargs["priority"] = 29
510
Oleh Prypinf5432c52019-03-19 15:10:37 +0100511 if enabled:
512 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200513 if ci_cat:
514 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200515 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
516 if notifies and name not in skipped_lkgr_bots:
517 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100518 return webrtc_builder(
519 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700520 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100521 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
522 bucket = "ci",
523 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200524 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100525 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200526 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100527 **kwargs
528 )
529
530def try_builder(
531 name,
532 try_cat = True,
533 fyi_cat = None,
534 properties = {},
535 dimensions = {},
536 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100537 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100538 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200539 """Add a pre-submit builder.
540
541 Args:
542 name: builder name (str).
543 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
544 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
545 properties: dict of properties to pass to the recipe (on top of the default ones).
546 dimensions: dict of Swarming dimensions (strings) to search machines by.
547 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 +0100548 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200549 **kwargs: Pass on to webrtc_builder / luci.builder.
550 Returns:
551 A luci.builder.
552 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100553 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
554 if cq != None:
555 luci.cq_tryjob_verifier(
556 builder = name,
557 cq_group = "cq",
558 **cq
559 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100560 if branch_cq:
561 luci.cq_tryjob_verifier(
562 builder = name,
563 cq_group = "cq_branch",
564 **cq
565 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100566
567 return webrtc_builder(
568 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700569 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100570 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
571 bucket = "try",
572 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200573 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100574 **kwargs
575 )
576
577def perf_builder(
578 name,
579 perf_cat,
580 recipe = "standalone",
581 properties = {},
582 dimensions = {},
583 **kwargs):
584 add_milo(name, {"perf": perf_cat})
585 return webrtc_builder(
586 name = name,
587 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700588 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100589 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
590 bucket = "perf",
591 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
592 # log_base of 1.7 means:
593 # when there are P pending builds, LUCI will batch the first B builds.
594 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
595 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200596 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Christoffer Jansson16635012021-10-25 16:32:38 +0200597 repo = WEBRTC_GIT,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100598 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200599 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100600 **kwargs
601 )
602
Mirko Bonadei12643772020-03-27 13:16:35 +0100603def android_perf_builder(
604 name,
605 perf_cat,
606 recipe = "standalone",
607 properties = {},
608 dimensions = {},
609 **kwargs):
610 return perf_builder(
611 name = name,
612 perf_cat = perf_cat,
613 recipe = recipe,
614 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
615 dimensions = dimensions,
616 **kwargs
617 )
618
619def linux_perf_builder(
620 name,
621 perf_cat,
622 recipe = "standalone",
623 properties = {},
624 dimensions = {},
625 **kwargs):
626 return perf_builder(
627 name = name,
628 perf_cat = perf_cat,
629 recipe = recipe,
630 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
631 dimensions = dimensions,
632 **kwargs
633 )
634
635def mac_perf_builder(
636 name,
637 perf_cat,
638 recipe = "standalone",
639 properties = {},
640 dimensions = {},
641 **kwargs):
642 return perf_builder(
643 name = name,
644 perf_cat = perf_cat,
645 recipe = recipe,
646 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
647 dimensions = dimensions,
648 **kwargs
649 )
650
651def win_perf_builder(
652 name,
653 perf_cat,
654 recipe = "standalone",
655 properties = {},
656 dimensions = {},
657 **kwargs):
658 return perf_builder(
659 name = name,
660 perf_cat = perf_cat,
661 recipe = recipe,
662 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
663 dimensions = dimensions,
664 **kwargs
665 )
666
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100667def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
668 if service_account == None:
669 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100670 add_milo(name, {"cron": True})
671 return webrtc_builder(
672 name = name,
673 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
674 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100675 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100676 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100677 **kwargs
678 )
679
680# Helpers:
681
682def merge_dicts(a, b):
683 """Return the result of merging two dicts.
684
685 If matching values are both dicts or both lists, they will be merged (non-recursively).
686
687 Args:
688 a: first dict.
689 b: second dict (takes priority).
690 Returns:
691 Merged dict.
692 """
693 a = dict(a)
694 for k, bv in b.items():
695 av = a.get(k)
696 if type(av) == "dict" and type(bv) == "dict":
697 a[k] = dict(av)
698 a[k].update(bv)
699 elif type(av) == "list" and type(bv) == "list":
700 a[k] = av + bv
701 else:
702 a[k] = bv
703 return a
704
705def normal_builder_factory(**common_kwargs):
706 def builder(*args, **kwargs):
707 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
708
709 def try_job(*args, **kwargs):
710 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
711
712 return builder, try_job
713
714# Mixins:
715
716linux_builder, linux_try_job = normal_builder_factory(
717 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100718 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100719)
720
721android_builder, android_try_job = normal_builder_factory(
722 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100723 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100724)
725
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200726def win_builder(*args, **kwargs):
727 return ci_builder(
728 *args,
729 **merge_dicts({
730 "dimensions": {"os": "Windows"},
731 "properties": GOMA_BACKEND_RBE_ATS_PROD,
732 }, kwargs)
733 )
734
735def win_try_job(*args, **kwargs):
736 return try_builder(
737 *args,
738 **merge_dicts({
739 "dimensions": {"os": "Windows"},
740 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
741 }, kwargs)
742 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100743
744mac_builder, mac_try_job = normal_builder_factory(
745 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100746 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100747)
748
749ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200750 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100751 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100752 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
753 caches = [swarming.cache("osx_sdk")],
754)
755
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200756ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200757 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100758 recipe = "ios",
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200759 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100760 caches = [swarming.cache("osx_sdk")],
761)
762
763# Actual builder configuration:
764
765android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
766android_try_job("android_compile_arm_dbg", cq = None)
767android_try_job("android_arm_dbg")
768android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000769android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100770android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
771android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200772android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100773android_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 +0100774android_try_job("android_compile_arm64_dbg", cq = None)
775android_try_job("android_arm64_dbg", cq = None)
776android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
777android_try_job("android_arm64_rel")
778android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100779android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
780android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100781android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100782android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
783android_try_job("android_compile_x64_dbg")
784android_try_job("android_compile_x64_rel", cq = None)
785android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
786android_try_job("android_compile_x86_dbg")
787android_builder("Android32 Builder x86", "Android|x86|rel")
788android_try_job("android_compile_x86_rel")
789android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
790android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100791android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100792
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100793ios_builder("iOS64 Debug", "iOS|arm64|dbg")
794ios_try_job("ios_compile_arm64_dbg")
795ios_builder("iOS64 Release", "iOS|arm64|rel")
796ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100797ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000798ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100799ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000800ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100801ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000802ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200803ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
804ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100805
806linux_builder("Linux32 Debug", "Linux|x86|dbg")
807linux_try_job("linux_x86_dbg")
808linux_builder("Linux32 Release", "Linux|x86|rel")
809linux_try_job("linux_x86_rel")
810linux_builder("Linux64 Debug", "Linux|x64|dbg")
811linux_try_job("linux_dbg", cq = None)
812linux_try_job("linux_compile_dbg")
813linux_builder("Linux64 Release", "Linux|x64|rel")
814linux_try_job("linux_rel")
815linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
816linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100817linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
Christoffer Jansson627cb052021-06-29 12:34:58 +0200818linux_perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100819linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
820linux_try_job("linux_compile_arm_dbg")
821linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
822linux_try_job("linux_compile_arm_rel")
823linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
824linux_try_job("linux_compile_arm64_dbg")
825linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
826linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100827linux_builder("Linux Asan", "Linux|x64|asan")
828linux_try_job("linux_asan")
829linux_builder("Linux MSan", "Linux|x64|msan")
830linux_try_job("linux_msan")
831linux_builder("Linux Tsan v2", "Linux|x64|tsan")
832linux_try_job("linux_tsan2")
833linux_builder("Linux UBSan", "Linux|x64|ubsan")
834linux_try_job("linux_ubsan")
835linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
836linux_try_job("linux_ubsan_vptr")
837linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
838linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
839linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
840linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100841linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100842linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100843
844mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200845mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100846mac_try_job("mac_compile_dbg")
847mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200848mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100849mac_try_job("mac_compile_rel", cq = None)
850mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100851mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100852mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000853mac_try_job("mac_asan")
Mirko Bonadei2f407ea2021-08-31 07:27:22 +0000854mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200855mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100856
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100857win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
858win_try_job("win_x86_clang_dbg", cq = None)
859win_try_job("win_compile_x86_clang_dbg")
860win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
861win_try_job("win_x86_clang_rel")
862win_try_job("win_compile_x86_clang_rel", cq = None)
863win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100864win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100865win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
866win_try_job("win_x64_clang_dbg", cq = None)
867win_try_job("win_x64_clang_dbg_win8", cq = None)
868win_try_job("win_x64_clang_dbg_win10", cq = None)
869win_try_job("win_compile_x64_clang_dbg")
870win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
871win_try_job("win_x64_clang_rel", cq = None)
872win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200873win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100874win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100875win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
876win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200877win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
878win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100879
880linux_try_job(
881 "presubmit",
882 recipe = "run_presubmit",
883 properties = {"repo_name": "webrtc", "runhooks": True},
884 priority = 28,
885 cq = {"disable_reuse": True},
886)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100887
888cron_builder(
889 "Auto-roll - WebRTC DEPS",
890 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200891 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100892)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200893
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100894cron_builder(
895 "WebRTC version update",
896 recipe = "update_webrtc_binary_version",
897 schedule = "0 4 * * *", # Every day at 4am.
898 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
899)
900
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200901lkgr_config = {
902 "project": "webrtc",
903 "source_url": WEBRTC_GIT,
904 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200905 "allowed_lag": 150, # hours
906 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200907 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200908 "buckets": {
909 "webrtc/ci": {
910 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100911 "builders": [
912 b
913 for b in sorted(lkgr_builders)
914 if b not in skipped_lkgr_bots
915 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200916 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200917 "chromium/webrtc.fyi": {
918 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200919 "builders": [
920 "WebRTC Chromium FYI Android Builder (dbg)",
921 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
922 "WebRTC Chromium FYI Android Builder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200923 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
landrey3f323922021-10-21 07:30:03 +0000924 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200925 "WebRTC Chromium FYI Linux Builder (dbg)",
926 "WebRTC Chromium FYI Linux Builder",
927 "WebRTC Chromium FYI Linux Tester",
928 "WebRTC Chromium FYI Mac Builder (dbg)",
929 "WebRTC Chromium FYI Mac Builder",
930 "WebRTC Chromium FYI Mac Tester",
931 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000932 "WebRTC Chromium FYI Win Builder",
Andrey Logvin7484d1b82021-09-15 17:32:39 +0000933 "WebRTC Chromium FYI Win10 Tester",
934 "WebRTC Chromium FYI Win7 Tester",
935 "WebRTC Chromium FYI Win8 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100936 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200937 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200938 ],
939 },
940 },
941}
942
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100943cron_builder(
944 "WebRTC lkgr finder",
945 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200946 properties = {
947 "project": "webrtc",
948 "repo": WEBRTC_GIT,
949 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200950 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200951 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
952 "config": lkgr_config,
953 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100954 schedule = "*/10 * * * *", # Every 10 minutes.
955)