blob: 39f23fb6995dc5617e3590d4d26f7a79c1ed7115 [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
Andrii Shyshkalov32515d42021-04-29 14:39:42 +020055# Launch all builds in "realms-aware mode", crbug.com/1177975.
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010056luci.builder.defaults.experiments.set(
57 {
58 "luci.use_realms": 100,
59 "luci.recipes.use_python3": 100,
60 },
61)
Jeremy Leconte34db3992021-11-23 09:44:31 +010062luci.builder.defaults.test_presentation.set(
63 resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
64)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020065
Oleh Prypin1a0593f2019-03-11 09:43:28 +010066lucicfg.config(
67 config_dir = ".",
68 tracked_files = [
69 "commit-queue.cfg",
70 "cr-buildbucket.cfg",
71 "luci-logdog.cfg",
72 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010073 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020074 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010075 "luci-scheduler.cfg",
76 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020077 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010078 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020079 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010080)
81
82luci.project(
83 name = "webrtc",
84 buildbucket = "cr-buildbucket.appspot.com",
85 logdog = "luci-logdog.appspot.com",
86 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010087 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010088 scheduler = "luci-scheduler.appspot.com",
89 swarming = "chromium-swarm.appspot.com",
90 acls = [
91 acl.entry(
92 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
93 groups = ["all"],
94 ),
95 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
96 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
97 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020098 bindings = [
99 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800100 roles = "role/configs.validator",
101 users = [
102 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
103 ],
104 ),
105 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200106 roles = "role/swarming.poolOwner",
107 groups = "project-webrtc-admins",
108 ),
109 luci.binding(
110 roles = "role/swarming.poolViewer",
111 groups = "all",
112 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200113 # Allow any WebRTC build to trigger a test ran under chromium-tester@
114 # task service account.
115 luci.binding(
116 roles = "role/swarming.taskServiceAccount",
117 users = [
118 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
119 ],
120 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200121 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100122)
123
124luci.logdog(
125 gs_bucket = "chromium-luci-logdog",
126)
127
128luci.milo(
129 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
130)
131
Owen Rodleya55c38e2020-06-15 11:16:10 +1000132luci.notify(tree_closing_enabled = True)
133
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100134luci.cq(
135 status_host = "chromium-cq-status.appspot.com",
136 submit_max_burst = 1,
137 submit_burst_delay = 1 * time.minute,
138)
139
140luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200141 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100142 bucket = "ci",
143 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200144 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100145)
146
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200147# Swarming permissions:
148
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200149luci.realm(name = "pools/cron", bindings = [
150 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
151 luci.binding(
152 roles = "role/swarming.poolUser",
153 projects = "libyuv",
154 ),
155])
156
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200157luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200158luci.realm(name = "pools/ci-tests", bindings = [
159 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
160 luci.binding(
161 roles = "role/swarming.poolUser",
162 groups = "project-webrtc-ci-task-accounts",
163 ),
164 # Allow tasks here to use .ci task service accounts.
165 luci.binding(
166 roles = "role/swarming.taskServiceAccount",
167 groups = "project-webrtc-ci-task-accounts",
168 ),
169])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100170luci.realm(name = "ci", bindings = [
171 # Allow CI builders to create invocations in their own builds.
172 luci.binding(
173 roles = "role/resultdb.invocationCreator",
174 groups = "project-webrtc-ci-task-accounts",
175 ),
176])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200177
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100178luci.realm(name = "pools/try", bindings = [
179 # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
180 luci.binding(
181 roles = "role/swarming.poolUser",
182 groups = "project-webrtc-led-users",
183 ),
184])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200185luci.realm(name = "pools/try-tests", bindings = [
186 # Allow task service accounts of .try pool/bucket to trigger tasks here.
187 luci.binding(
188 roles = "role/swarming.poolUser",
189 groups = "project-webrtc-try-task-accounts",
190 ),
191 # Allow tasks here to use .try task service accounts.
192 luci.binding(
193 roles = "role/swarming.taskServiceAccount",
194 groups = "project-webrtc-try-task-accounts",
195 ),
196])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100197luci.realm(name = "try", bindings = [
198 luci.binding(
199 roles = "role/swarming.taskTriggerer",
200 groups = "project-webrtc-led-users",
201 ),
202 # Allow try builders to create invocations in their own builds.
203 luci.binding(
204 roles = "role/resultdb.invocationCreator",
205 groups = "project-webrtc-try-task-accounts",
206 ),
207])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200208
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200209luci.realm(name = "pools/perf", bindings = [
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100210 # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200211 luci.binding(
212 roles = "role/swarming.poolUser",
213 groups = "project-webrtc-led-users",
214 ),
215])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100216luci.realm(name = "perf", bindings = [
217 luci.binding(
218 roles = "role/swarming.taskTriggerer",
219 groups = "project-webrtc-led-users",
220 ),
221])
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200222
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100223luci.realm(name = "@root", bindings = [
224 # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
225 luci.binding(
226 roles = "role/swarming.poolUser",
227 groups = "project-webrtc-admins",
228 ),
229 luci.binding(
230 roles = "role/swarming.taskTriggerer",
231 groups = "project-webrtc-admins",
232 ),
233])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200234
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100235# Bucket definitions:
236
237luci.bucket(
238 name = "try",
239 acls = [
240 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
241 "service-account-cq",
242 "project-webrtc-tryjob-access",
243 ]),
244 ],
245)
246
247luci.bucket(
248 name = "ci",
249 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200250 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
251 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100252 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200253 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
254 # Allow Pinpoint to trigger builds for bisection
255 "service-account-chromeperf",
256 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100257 ],
258)
259
260luci.bucket(
261 name = "perf",
262 acls = [
263 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100264 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
265 ]),
266 ],
267)
268
269luci.bucket(
270 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100271)
272
273# Commit queue definitions:
274
275luci.cq_group(
276 name = "cq",
277 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200278 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100279 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 Prypin1a0593f2019-03-11 09:43:28 +0100285)
286
287luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100288 name = "cq_branch",
289 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
290 acls = [
291 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
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 Prypin7d1cabe2019-03-14 15:10:30 +0100296)
297
298luci.cq_group(
299 name = "cq_infra",
300 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100301 acls = [
302 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
303 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
304 ],
305 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200306 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100307)
308
309luci.cq_tryjob_verifier(
310 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100311 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100312)
313
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200314luci.cq_tryjob_verifier(
315 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
316 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
317 cq_group = "cq",
318)
319
Oleh Prypin71d17422019-03-28 08:43:16 +0100320# Notifier definitions:
321
322luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200323 name = "post_submit_failure_notifier",
324 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200325 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200326 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200327 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200328 name = "build_failure",
329 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200330 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100331)
332
333luci.notifier(
334 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200335 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200336 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200337 template = luci.notifier_template(
338 name = "cron",
339 body = io.read_file("luci-notify/email-templates/cron.template"),
340 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100341)
342
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200343luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200344 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200345 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200346 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200347 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200348 name = "infra_failure",
349 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200350 ),
351)
352
Owen Rodley6b721ba2020-05-26 10:04:20 +1000353# Tree closer definitions:
354
355luci.tree_closer(
356 name = "webrtc_tree_closer",
357 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000358 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
359 # that LUCI-Notify would take the exact same actions. Once we've switched
360 # over, this should be updated - several of these steps don't exist in
361 # WebRTC recipes.
362 failed_step_regexp = [
363 "bot_update",
364 "compile",
365 "gclient runhooks",
366 "runhooks",
367 "update",
368 "extract build",
369 "cleanup_temp",
370 "taskkill",
371 "compile",
372 "gn",
373 ],
374 failed_step_regexp_exclude = ".*\\(experimental\\).*",
375)
376
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100377# Recipe definitions:
378
379def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
380 return luci.recipe(
381 name = recipe.split("/")[-1],
382 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200383 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100384 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100385 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100386 )
387
388recipe("chromium_trybot")
389recipe("run_presubmit")
390recipe("webrtc/auto_roll_webrtc_deps")
391recipe("webrtc/ios")
392recipe("webrtc/ios_api_framework")
393recipe("webrtc/libfuzzer")
394recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100395recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100396recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800397recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100398
399# Console definitions:
400
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700401luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
402luci.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 +0100403luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100404luci.list_view(name = "try", title = "Tryserver")
405
406def add_milo(builder, views):
407 """Add Milo console entries for the builder.
408
409 Args:
410 builder: builder name (str).
411 views: dict where keys are names of consoles and values are either a
412 category for the console (str, pipe-separated) or True, which means
413 adding to a list view rather than a console.
414 """
415 for view_name, category in views.items():
416 if category == None:
417 continue
418 elif type(category) == "string":
419 category, _, short_name = category.rpartition("|")
420 luci.console_view_entry(
421 console_view = view_name,
422 builder = builder,
423 category = category or None,
424 short_name = short_name or None,
425 )
426 elif category == True:
427 luci.list_view_entry(
428 list_view = view_name,
429 builder = builder,
430 )
431 else:
432 fail("Unexpected value for category: %r" % category)
433
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200434lkgr_builders = {}
435
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100436# Builder-defining functions:
437
Artem Titarenkof6588b72019-11-14 14:28:11 +0100438def webrtc_builder(
439 name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100440 bucket,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100441 recipe = "standalone",
442 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200443 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100444 priority = 30,
445 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200446 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100447 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200448 """WebRTC specific wrapper around luci.builder.
449
450 Args:
451 name: builder name (str).
Jeremy Lecontec2516202021-12-14 13:01:24 +0100452 bucket: The name of the bucket the builder belongs to.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200453 recipe: string with the name of the recipe to run.
454 dimensions: dict of Swarming dimensions (strings) to search machines by.
455 properties: dict of properties to pass to the recipe (on top of the default ones).
456 priority: int [1-255] or None, indicating swarming task priority, lower is
457 more important. If None, defer the decision to Buildbucket service.
458 execution_timeout: int or None, how long to wait for a running build to finish before
459 forcefully aborting it and marking the build as timed out. If None,
460 defer the decision to Buildbucket service.
461 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
462 decition to the goma module.
463 **kwargs: Pass on to webrtc_builder / luci.builder.
464 Returns:
465 A luci.builder.
466 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100467 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
468
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200469 if goma_jobs != None:
470 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
471 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900472 properties = merge_dicts(properties, {
473 "$recipe_engine/isolated": {
474 "server": "https://isolateserver.appspot.com",
475 },
476 })
Jeremy Lecontec2516202021-12-14 13:01:24 +0100477 resultdb_bq_table = "webrtc-ci.resultdb." + bucket + "_test_results"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100478 return luci.builder(
479 name = name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100480 bucket = bucket,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200481 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100482 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200483 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100484 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100485 priority = priority,
486 build_numbers = True,
487 swarming_tags = ["vpython:native-python-wrapper"],
Jeremy Lecontec2516202021-12-14 13:01:24 +0100488 resultdb_settings = resultdb.settings(
489 enable = True,
490 bq_exports = [
491 resultdb.export_test_results(bq_table = resultdb_bq_table),
492 ],
493 ),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100494 **kwargs
495 )
496
497def ci_builder(
498 name,
499 ci_cat,
500 perf_cat = None,
501 fyi_cat = None,
502 properties = {},
503 dimensions = {},
504 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100505 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100506 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200507 """Add a post-submit builder.
508
509 Args:
510 name: builder name (str).
511 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
512 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
513 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
514 properties: dict of properties to pass to the recipe (on top of the default ones).
515 dimensions: dict of Swarming dimensions (strings) to search machines by.
516 prioritized: True to make this builder have a higher priority and never batch builds.
517 enabled: False to exclude this builder from consoles and failure notifications.
518 **kwargs: Pass on to webrtc_builder / luci.builder.
519 Returns:
520 A luci.builder.
521
522 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
523 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100524 if prioritized:
525 kwargs["triggering_policy"] = scheduler.greedy_batching(
526 max_batch_size = 1,
527 max_concurrent_invocations = 3,
528 )
529 kwargs["priority"] = 29
530
Oleh Prypinf5432c52019-03-19 15:10:37 +0100531 if enabled:
532 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200533 if ci_cat:
534 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200535 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
536 if notifies and name not in skipped_lkgr_bots:
537 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100538 return webrtc_builder(
539 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700540 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100541 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
542 bucket = "ci",
543 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200544 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100545 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200546 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100547 **kwargs
548 )
549
550def try_builder(
551 name,
552 try_cat = True,
553 fyi_cat = None,
554 properties = {},
555 dimensions = {},
556 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100557 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100558 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200559 """Add a pre-submit builder.
560
561 Args:
562 name: builder name (str).
563 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
564 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
565 properties: dict of properties to pass to the recipe (on top of the default ones).
566 dimensions: dict of Swarming dimensions (strings) to search machines by.
567 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 +0100568 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200569 **kwargs: Pass on to webrtc_builder / luci.builder.
570 Returns:
571 A luci.builder.
572 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100573 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
574 if cq != None:
575 luci.cq_tryjob_verifier(
576 builder = name,
577 cq_group = "cq",
578 **cq
579 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100580 if branch_cq:
581 luci.cq_tryjob_verifier(
582 builder = name,
583 cq_group = "cq_branch",
584 **cq
585 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100586
587 return webrtc_builder(
588 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700589 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100590 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
591 bucket = "try",
592 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200593 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100594 **kwargs
595 )
596
597def perf_builder(
598 name,
599 perf_cat,
600 recipe = "standalone",
601 properties = {},
602 dimensions = {},
603 **kwargs):
604 add_milo(name, {"perf": perf_cat})
605 return webrtc_builder(
606 name = name,
607 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700608 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100609 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
610 bucket = "perf",
611 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
612 # log_base of 1.7 means:
613 # when there are P pending builds, LUCI will batch the first B builds.
614 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
615 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200616 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Christoffer Jansson16635012021-10-25 16:32:38 +0200617 repo = WEBRTC_GIT,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100618 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200619 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100620 **kwargs
621 )
622
Mirko Bonadei12643772020-03-27 13:16:35 +0100623def android_perf_builder(
624 name,
625 perf_cat,
626 recipe = "standalone",
627 properties = {},
628 dimensions = {},
629 **kwargs):
630 return perf_builder(
631 name = name,
632 perf_cat = perf_cat,
633 recipe = recipe,
634 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
635 dimensions = dimensions,
636 **kwargs
637 )
638
639def linux_perf_builder(
640 name,
641 perf_cat,
642 recipe = "standalone",
643 properties = {},
644 dimensions = {},
645 **kwargs):
646 return perf_builder(
647 name = name,
648 perf_cat = perf_cat,
649 recipe = recipe,
650 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
651 dimensions = dimensions,
652 **kwargs
653 )
654
655def mac_perf_builder(
656 name,
657 perf_cat,
658 recipe = "standalone",
659 properties = {},
660 dimensions = {},
661 **kwargs):
662 return perf_builder(
663 name = name,
664 perf_cat = perf_cat,
665 recipe = recipe,
666 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
667 dimensions = dimensions,
668 **kwargs
669 )
670
671def win_perf_builder(
672 name,
673 perf_cat,
674 recipe = "standalone",
675 properties = {},
676 dimensions = {},
677 **kwargs):
678 return perf_builder(
679 name = name,
680 perf_cat = perf_cat,
681 recipe = recipe,
682 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
683 dimensions = dimensions,
684 **kwargs
685 )
686
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100687def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
688 if service_account == None:
689 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100690 add_milo(name, {"cron": True})
691 return webrtc_builder(
692 name = name,
693 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
694 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100695 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100696 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100697 **kwargs
698 )
699
700# Helpers:
701
702def merge_dicts(a, b):
703 """Return the result of merging two dicts.
704
705 If matching values are both dicts or both lists, they will be merged (non-recursively).
706
707 Args:
708 a: first dict.
709 b: second dict (takes priority).
710 Returns:
711 Merged dict.
712 """
713 a = dict(a)
714 for k, bv in b.items():
715 av = a.get(k)
716 if type(av) == "dict" and type(bv) == "dict":
717 a[k] = dict(av)
718 a[k].update(bv)
719 elif type(av) == "list" and type(bv) == "list":
720 a[k] = av + bv
721 else:
722 a[k] = bv
723 return a
724
725def normal_builder_factory(**common_kwargs):
726 def builder(*args, **kwargs):
727 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
728
729 def try_job(*args, **kwargs):
730 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
731
732 return builder, try_job
733
734# Mixins:
735
736linux_builder, linux_try_job = normal_builder_factory(
737 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100738 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100739)
740
741android_builder, android_try_job = normal_builder_factory(
742 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100743 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100744)
745
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200746def win_builder(*args, **kwargs):
747 return ci_builder(
748 *args,
749 **merge_dicts({
750 "dimensions": {"os": "Windows"},
751 "properties": GOMA_BACKEND_RBE_ATS_PROD,
752 }, kwargs)
753 )
754
755def win_try_job(*args, **kwargs):
756 return try_builder(
757 *args,
758 **merge_dicts({
759 "dimensions": {"os": "Windows"},
760 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
761 }, kwargs)
762 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100763
764mac_builder, mac_try_job = normal_builder_factory(
765 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100766 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100767)
768
769ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200770 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100771 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100772 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
773 caches = [swarming.cache("osx_sdk")],
774)
775
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200776ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200777 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100778 recipe = "ios",
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200779 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100780 caches = [swarming.cache("osx_sdk")],
781)
782
783# Actual builder configuration:
784
785android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
786android_try_job("android_compile_arm_dbg", cq = None)
787android_try_job("android_arm_dbg")
788android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000789android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100790android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
791android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200792android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100793android_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 +0100794android_try_job("android_compile_arm64_dbg", cq = None)
795android_try_job("android_arm64_dbg", cq = None)
796android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
797android_try_job("android_arm64_rel")
798android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100799android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
800android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100801android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100802android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
803android_try_job("android_compile_x64_dbg")
804android_try_job("android_compile_x64_rel", cq = None)
805android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
806android_try_job("android_compile_x86_dbg")
807android_builder("Android32 Builder x86", "Android|x86|rel")
808android_try_job("android_compile_x86_rel")
809android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
810android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100811android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100812
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100813ios_builder("iOS64 Debug", "iOS|arm64|dbg")
814ios_try_job("ios_compile_arm64_dbg")
815ios_builder("iOS64 Release", "iOS|arm64|rel")
816ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100817ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000818ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100819ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000820ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100821ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000822ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200823ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
824ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100825
826linux_builder("Linux32 Debug", "Linux|x86|dbg")
827linux_try_job("linux_x86_dbg")
828linux_builder("Linux32 Release", "Linux|x86|rel")
829linux_try_job("linux_x86_rel")
830linux_builder("Linux64 Debug", "Linux|x64|dbg")
831linux_try_job("linux_dbg", cq = None)
832linux_try_job("linux_compile_dbg")
833linux_builder("Linux64 Release", "Linux|x64|rel")
834linux_try_job("linux_rel")
835linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
836linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100837linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
Christoffer Jansson627cb052021-06-29 12:34:58 +0200838linux_perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100839linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
840linux_try_job("linux_compile_arm_dbg")
841linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
842linux_try_job("linux_compile_arm_rel")
843linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
844linux_try_job("linux_compile_arm64_dbg")
845linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
846linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100847linux_builder("Linux Asan", "Linux|x64|asan")
848linux_try_job("linux_asan")
849linux_builder("Linux MSan", "Linux|x64|msan")
850linux_try_job("linux_msan")
851linux_builder("Linux Tsan v2", "Linux|x64|tsan")
852linux_try_job("linux_tsan2")
853linux_builder("Linux UBSan", "Linux|x64|ubsan")
854linux_try_job("linux_ubsan")
855linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
856linux_try_job("linux_ubsan_vptr")
857linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
858linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
859linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
860linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100861linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100862linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100863
864mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200865mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100866mac_try_job("mac_compile_dbg")
867mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200868mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100869mac_try_job("mac_compile_rel", cq = None)
870mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100871mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100872mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000873mac_try_job("mac_asan")
Christoffer Jansson4a8d1f52021-12-09 10:16:43 +0100874mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200875mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100876
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100877win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
878win_try_job("win_x86_clang_dbg", cq = None)
879win_try_job("win_compile_x86_clang_dbg")
880win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
881win_try_job("win_x86_clang_rel")
882win_try_job("win_compile_x86_clang_rel", cq = None)
883win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100884win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100885win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
886win_try_job("win_x64_clang_dbg", cq = None)
887win_try_job("win_x64_clang_dbg_win8", cq = None)
888win_try_job("win_x64_clang_dbg_win10", cq = None)
889win_try_job("win_compile_x64_clang_dbg")
890win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
891win_try_job("win_x64_clang_rel", cq = None)
892win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200893win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100894win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100895win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
896win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200897win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
898win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100899
900linux_try_job(
901 "presubmit",
902 recipe = "run_presubmit",
903 properties = {"repo_name": "webrtc", "runhooks": True},
904 priority = 28,
905 cq = {"disable_reuse": True},
906)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100907
908cron_builder(
909 "Auto-roll - WebRTC DEPS",
910 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200911 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100912)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200913
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100914cron_builder(
915 "WebRTC version update",
916 recipe = "update_webrtc_binary_version",
917 schedule = "0 4 * * *", # Every day at 4am.
918 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
919)
920
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200921lkgr_config = {
922 "project": "webrtc",
923 "source_url": WEBRTC_GIT,
924 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200925 "allowed_lag": 150, # hours
926 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200927 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200928 "buckets": {
929 "webrtc/ci": {
930 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100931 "builders": [
932 b
933 for b in sorted(lkgr_builders)
934 if b not in skipped_lkgr_bots
935 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200936 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200937 "chromium/webrtc.fyi": {
938 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200939 "builders": [
940 "WebRTC Chromium FYI Android Builder (dbg)",
941 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
942 "WebRTC Chromium FYI Android Builder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200943 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
landrey3f323922021-10-21 07:30:03 +0000944 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200945 "WebRTC Chromium FYI Linux Builder (dbg)",
946 "WebRTC Chromium FYI Linux Builder",
947 "WebRTC Chromium FYI Linux Tester",
948 "WebRTC Chromium FYI Mac Builder (dbg)",
949 "WebRTC Chromium FYI Mac Builder",
950 "WebRTC Chromium FYI Mac Tester",
951 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000952 "WebRTC Chromium FYI Win Builder",
Andrey Logvin7484d1b82021-09-15 17:32:39 +0000953 "WebRTC Chromium FYI Win10 Tester",
954 "WebRTC Chromium FYI Win7 Tester",
955 "WebRTC Chromium FYI Win8 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100956 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200957 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200958 ],
959 },
960 },
961}
962
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100963cron_builder(
964 "WebRTC lkgr finder",
965 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200966 properties = {
967 "project": "webrtc",
968 "repo": WEBRTC_GIT,
969 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200970 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200971 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
972 "config": lkgr_config,
973 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100974 schedule = "*/10 * * * *", # Every 10 minutes.
975)