blob: 89de032b55bee24a5312a2bcd797a72655252c9c [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)
Jeremy Leconte34db3992021-11-23 09:44:31 +010067luci.builder.defaults.test_presentation.set(
68 resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
69)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020070
Oleh Prypin1a0593f2019-03-11 09:43:28 +010071lucicfg.config(
72 config_dir = ".",
73 tracked_files = [
74 "commit-queue.cfg",
75 "cr-buildbucket.cfg",
76 "luci-logdog.cfg",
77 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010078 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020079 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010080 "luci-scheduler.cfg",
81 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020082 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010083 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020084 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010085)
86
87luci.project(
88 name = "webrtc",
89 buildbucket = "cr-buildbucket.appspot.com",
90 logdog = "luci-logdog.appspot.com",
91 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010092 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010093 scheduler = "luci-scheduler.appspot.com",
94 swarming = "chromium-swarm.appspot.com",
95 acls = [
96 acl.entry(
97 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
98 groups = ["all"],
99 ),
100 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
101 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
102 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200103 bindings = [
104 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800105 roles = "role/configs.validator",
106 users = [
107 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
108 ],
109 ),
110 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200111 roles = "role/swarming.poolOwner",
112 groups = "project-webrtc-admins",
113 ),
114 luci.binding(
115 roles = "role/swarming.poolViewer",
116 groups = "all",
117 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200118 # Allow any WebRTC build to trigger a test ran under chromium-tester@
119 # task service account.
120 luci.binding(
121 roles = "role/swarming.taskServiceAccount",
122 users = [
123 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
124 ],
125 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200126 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100127)
128
129luci.logdog(
130 gs_bucket = "chromium-luci-logdog",
131)
132
133luci.milo(
134 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
135)
136
Owen Rodleya55c38e2020-06-15 11:16:10 +1000137luci.notify(tree_closing_enabled = True)
138
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100139luci.cq(
140 status_host = "chromium-cq-status.appspot.com",
141 submit_max_burst = 1,
142 submit_burst_delay = 1 * time.minute,
143)
144
145luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200146 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100147 bucket = "ci",
148 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200149 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100150)
151
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200152# Swarming permissions:
153
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200154luci.realm(name = "pools/cron", bindings = [
155 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
156 luci.binding(
157 roles = "role/swarming.poolUser",
158 projects = "libyuv",
159 ),
160])
161
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200162luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200163luci.realm(name = "pools/ci-tests", bindings = [
164 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
165 luci.binding(
166 roles = "role/swarming.poolUser",
167 groups = "project-webrtc-ci-task-accounts",
168 ),
169 # Allow tasks here to use .ci task service accounts.
170 luci.binding(
171 roles = "role/swarming.taskServiceAccount",
172 groups = "project-webrtc-ci-task-accounts",
173 ),
174])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100175luci.realm(name = "ci", bindings = [
176 # Allow CI builders to create invocations in their own builds.
177 luci.binding(
178 roles = "role/resultdb.invocationCreator",
179 groups = "project-webrtc-ci-task-accounts",
180 ),
181])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200182
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100183luci.realm(name = "pools/try", bindings = [
184 # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
185 luci.binding(
186 roles = "role/swarming.poolUser",
187 groups = "project-webrtc-led-users",
188 ),
189])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200190luci.realm(name = "pools/try-tests", bindings = [
191 # Allow task service accounts of .try pool/bucket to trigger tasks here.
192 luci.binding(
193 roles = "role/swarming.poolUser",
194 groups = "project-webrtc-try-task-accounts",
195 ),
196 # Allow tasks here to use .try task service accounts.
197 luci.binding(
198 roles = "role/swarming.taskServiceAccount",
199 groups = "project-webrtc-try-task-accounts",
200 ),
201])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100202luci.realm(name = "try", bindings = [
203 luci.binding(
204 roles = "role/swarming.taskTriggerer",
205 groups = "project-webrtc-led-users",
206 ),
207 # Allow try builders to create invocations in their own builds.
208 luci.binding(
209 roles = "role/resultdb.invocationCreator",
210 groups = "project-webrtc-try-task-accounts",
211 ),
212])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200213
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200214luci.realm(name = "pools/perf", bindings = [
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100215 # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200216 luci.binding(
217 roles = "role/swarming.poolUser",
218 groups = "project-webrtc-led-users",
219 ),
220])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100221luci.realm(name = "perf", bindings = [
222 luci.binding(
223 roles = "role/swarming.taskTriggerer",
224 groups = "project-webrtc-led-users",
225 ),
226])
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200227
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100228luci.realm(name = "@root", bindings = [
229 # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
230 luci.binding(
231 roles = "role/swarming.poolUser",
232 groups = "project-webrtc-admins",
233 ),
234 luci.binding(
235 roles = "role/swarming.taskTriggerer",
236 groups = "project-webrtc-admins",
237 ),
238])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200239
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100240# Bucket definitions:
241
242luci.bucket(
243 name = "try",
244 acls = [
245 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
246 "service-account-cq",
247 "project-webrtc-tryjob-access",
248 ]),
249 ],
250)
251
252luci.bucket(
253 name = "ci",
254 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200255 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
256 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100257 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200258 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
259 # Allow Pinpoint to trigger builds for bisection
260 "service-account-chromeperf",
261 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100262 ],
263)
264
265luci.bucket(
266 name = "perf",
267 acls = [
268 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100269 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
270 ]),
271 ],
272)
273
274luci.bucket(
275 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100276)
277
278# Commit queue definitions:
279
280luci.cq_group(
281 name = "cq",
282 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200283 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100284 acls = [
285 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
286 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
287 ],
288 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200289 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100290)
291
292luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100293 name = "cq_branch",
294 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
295 acls = [
296 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
297 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
298 ],
299 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200300 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100301)
302
303luci.cq_group(
304 name = "cq_infra",
305 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100306 acls = [
307 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
308 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
309 ],
310 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200311 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100312)
313
314luci.cq_tryjob_verifier(
315 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100316 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100317)
318
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200319luci.cq_tryjob_verifier(
320 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
321 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
322 cq_group = "cq",
323)
324
Oleh Prypin71d17422019-03-28 08:43:16 +0100325# Notifier definitions:
326
327luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200328 name = "post_submit_failure_notifier",
329 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200330 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200331 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200332 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200333 name = "build_failure",
334 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200335 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100336)
337
338luci.notifier(
339 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200340 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200341 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200342 template = luci.notifier_template(
343 name = "cron",
344 body = io.read_file("luci-notify/email-templates/cron.template"),
345 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100346)
347
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200348luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200349 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200350 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200351 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200352 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200353 name = "infra_failure",
354 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200355 ),
356)
357
Owen Rodley6b721ba2020-05-26 10:04:20 +1000358# Tree closer definitions:
359
360luci.tree_closer(
361 name = "webrtc_tree_closer",
362 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000363 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
364 # that LUCI-Notify would take the exact same actions. Once we've switched
365 # over, this should be updated - several of these steps don't exist in
366 # WebRTC recipes.
367 failed_step_regexp = [
368 "bot_update",
369 "compile",
370 "gclient runhooks",
371 "runhooks",
372 "update",
373 "extract build",
374 "cleanup_temp",
375 "taskkill",
376 "compile",
377 "gn",
378 ],
379 failed_step_regexp_exclude = ".*\\(experimental\\).*",
380)
381
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100382# Recipe definitions:
383
384def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
385 return luci.recipe(
386 name = recipe.split("/")[-1],
387 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200388 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100389 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100390 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100391 )
392
393recipe("chromium_trybot")
394recipe("run_presubmit")
395recipe("webrtc/auto_roll_webrtc_deps")
396recipe("webrtc/ios")
397recipe("webrtc/ios_api_framework")
398recipe("webrtc/libfuzzer")
399recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100400recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100401recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800402recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100403
404# Console definitions:
405
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700406luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
407luci.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 +0100408luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100409luci.list_view(name = "try", title = "Tryserver")
410
411def add_milo(builder, views):
412 """Add Milo console entries for the builder.
413
414 Args:
415 builder: builder name (str).
416 views: dict where keys are names of consoles and values are either a
417 category for the console (str, pipe-separated) or True, which means
418 adding to a list view rather than a console.
419 """
420 for view_name, category in views.items():
421 if category == None:
422 continue
423 elif type(category) == "string":
424 category, _, short_name = category.rpartition("|")
425 luci.console_view_entry(
426 console_view = view_name,
427 builder = builder,
428 category = category or None,
429 short_name = short_name or None,
430 )
431 elif category == True:
432 luci.list_view_entry(
433 list_view = view_name,
434 builder = builder,
435 )
436 else:
437 fail("Unexpected value for category: %r" % category)
438
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200439lkgr_builders = {}
440
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100441# Builder-defining functions:
442
Artem Titarenkof6588b72019-11-14 14:28:11 +0100443def webrtc_builder(
444 name,
445 recipe = "standalone",
446 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200447 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100448 priority = 30,
449 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200450 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100451 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200452 """WebRTC specific wrapper around luci.builder.
453
454 Args:
455 name: builder name (str).
456 recipe: string with the name of the recipe to run.
457 dimensions: dict of Swarming dimensions (strings) to search machines by.
458 properties: dict of properties to pass to the recipe (on top of the default ones).
459 priority: int [1-255] or None, indicating swarming task priority, lower is
460 more important. If None, defer the decision to Buildbucket service.
461 execution_timeout: int or None, how long to wait for a running build to finish before
462 forcefully aborting it and marking the build as timed out. If None,
463 defer the decision to Buildbucket service.
464 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
465 decition to the goma module.
466 **kwargs: Pass on to webrtc_builder / luci.builder.
467 Returns:
468 A luci.builder.
469 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100470 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
471
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200472 if goma_jobs != None:
473 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
474 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900475 properties = merge_dicts(properties, {
476 "$recipe_engine/isolated": {
477 "server": "https://isolateserver.appspot.com",
478 },
479 })
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100480 return luci.builder(
481 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200482 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100483 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200484 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100485 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100486 priority = priority,
487 build_numbers = True,
488 swarming_tags = ["vpython:native-python-wrapper"],
Jeremy Lecontef2312112021-11-12 11:55:27 +0100489 resultdb_settings = resultdb.settings(enable = True),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100490 **kwargs
491 )
492
493def ci_builder(
494 name,
495 ci_cat,
496 perf_cat = None,
497 fyi_cat = None,
498 properties = {},
499 dimensions = {},
500 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100501 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100502 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200503 """Add a post-submit builder.
504
505 Args:
506 name: builder name (str).
507 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
508 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
509 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
510 properties: dict of properties to pass to the recipe (on top of the default ones).
511 dimensions: dict of Swarming dimensions (strings) to search machines by.
512 prioritized: True to make this builder have a higher priority and never batch builds.
513 enabled: False to exclude this builder from consoles and failure notifications.
514 **kwargs: Pass on to webrtc_builder / luci.builder.
515 Returns:
516 A luci.builder.
517
518 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
519 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100520 if prioritized:
521 kwargs["triggering_policy"] = scheduler.greedy_batching(
522 max_batch_size = 1,
523 max_concurrent_invocations = 3,
524 )
525 kwargs["priority"] = 29
526
Oleh Prypinf5432c52019-03-19 15:10:37 +0100527 if enabled:
528 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200529 if ci_cat:
530 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200531 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
532 if notifies and name not in skipped_lkgr_bots:
533 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100534 return webrtc_builder(
535 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700536 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100537 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
538 bucket = "ci",
539 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200540 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100541 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200542 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100543 **kwargs
544 )
545
546def try_builder(
547 name,
548 try_cat = True,
549 fyi_cat = None,
550 properties = {},
551 dimensions = {},
552 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100553 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100554 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200555 """Add a pre-submit builder.
556
557 Args:
558 name: builder name (str).
559 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
560 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
561 properties: dict of properties to pass to the recipe (on top of the default ones).
562 dimensions: dict of Swarming dimensions (strings) to search machines by.
563 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 +0100564 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200565 **kwargs: Pass on to webrtc_builder / luci.builder.
566 Returns:
567 A luci.builder.
568 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100569 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
570 if cq != None:
571 luci.cq_tryjob_verifier(
572 builder = name,
573 cq_group = "cq",
574 **cq
575 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100576 if branch_cq:
577 luci.cq_tryjob_verifier(
578 builder = name,
579 cq_group = "cq_branch",
580 **cq
581 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100582
583 return webrtc_builder(
584 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700585 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100586 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
587 bucket = "try",
588 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200589 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100590 **kwargs
591 )
592
593def perf_builder(
594 name,
595 perf_cat,
596 recipe = "standalone",
597 properties = {},
598 dimensions = {},
599 **kwargs):
600 add_milo(name, {"perf": perf_cat})
601 return webrtc_builder(
602 name = name,
603 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700604 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100605 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
606 bucket = "perf",
607 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
608 # log_base of 1.7 means:
609 # when there are P pending builds, LUCI will batch the first B builds.
610 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
611 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200612 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Christoffer Jansson16635012021-10-25 16:32:38 +0200613 repo = WEBRTC_GIT,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100614 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200615 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100616 **kwargs
617 )
618
Mirko Bonadei12643772020-03-27 13:16:35 +0100619def android_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 linux_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 mac_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_WEBRTC_RBE_PROD, properties),
663 dimensions = dimensions,
664 **kwargs
665 )
666
667def win_perf_builder(
668 name,
669 perf_cat,
670 recipe = "standalone",
671 properties = {},
672 dimensions = {},
673 **kwargs):
674 return perf_builder(
675 name = name,
676 perf_cat = perf_cat,
677 recipe = recipe,
678 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
679 dimensions = dimensions,
680 **kwargs
681 )
682
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100683def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
684 if service_account == None:
685 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100686 add_milo(name, {"cron": True})
687 return webrtc_builder(
688 name = name,
689 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
690 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100691 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100692 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100693 **kwargs
694 )
695
696# Helpers:
697
698def merge_dicts(a, b):
699 """Return the result of merging two dicts.
700
701 If matching values are both dicts or both lists, they will be merged (non-recursively).
702
703 Args:
704 a: first dict.
705 b: second dict (takes priority).
706 Returns:
707 Merged dict.
708 """
709 a = dict(a)
710 for k, bv in b.items():
711 av = a.get(k)
712 if type(av) == "dict" and type(bv) == "dict":
713 a[k] = dict(av)
714 a[k].update(bv)
715 elif type(av) == "list" and type(bv) == "list":
716 a[k] = av + bv
717 else:
718 a[k] = bv
719 return a
720
721def normal_builder_factory(**common_kwargs):
722 def builder(*args, **kwargs):
723 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
724
725 def try_job(*args, **kwargs):
726 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
727
728 return builder, try_job
729
730# Mixins:
731
732linux_builder, linux_try_job = normal_builder_factory(
733 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100734 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100735)
736
737android_builder, android_try_job = normal_builder_factory(
738 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100739 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100740)
741
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200742def win_builder(*args, **kwargs):
743 return ci_builder(
744 *args,
745 **merge_dicts({
746 "dimensions": {"os": "Windows"},
747 "properties": GOMA_BACKEND_RBE_ATS_PROD,
748 }, kwargs)
749 )
750
751def win_try_job(*args, **kwargs):
752 return try_builder(
753 *args,
754 **merge_dicts({
755 "dimensions": {"os": "Windows"},
756 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
757 }, kwargs)
758 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100759
760mac_builder, mac_try_job = normal_builder_factory(
761 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100762 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100763)
764
765ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200766 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100767 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100768 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
769 caches = [swarming.cache("osx_sdk")],
770)
771
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200772ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200773 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100774 recipe = "ios",
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200775 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100776 caches = [swarming.cache("osx_sdk")],
777)
778
779# Actual builder configuration:
780
781android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
782android_try_job("android_compile_arm_dbg", cq = None)
783android_try_job("android_arm_dbg")
784android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000785android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100786android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
787android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200788android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100789android_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 +0100790android_try_job("android_compile_arm64_dbg", cq = None)
791android_try_job("android_arm64_dbg", cq = None)
792android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
793android_try_job("android_arm64_rel")
794android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100795android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
796android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100797android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100798android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
799android_try_job("android_compile_x64_dbg")
800android_try_job("android_compile_x64_rel", cq = None)
801android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
802android_try_job("android_compile_x86_dbg")
803android_builder("Android32 Builder x86", "Android|x86|rel")
804android_try_job("android_compile_x86_rel")
805android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
806android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100807android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100808
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100809ios_builder("iOS64 Debug", "iOS|arm64|dbg")
810ios_try_job("ios_compile_arm64_dbg")
811ios_builder("iOS64 Release", "iOS|arm64|rel")
812ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100813ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000814ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100815ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000816ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100817ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000818ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200819ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
820ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100821
822linux_builder("Linux32 Debug", "Linux|x86|dbg")
823linux_try_job("linux_x86_dbg")
824linux_builder("Linux32 Release", "Linux|x86|rel")
825linux_try_job("linux_x86_rel")
826linux_builder("Linux64 Debug", "Linux|x64|dbg")
827linux_try_job("linux_dbg", cq = None)
828linux_try_job("linux_compile_dbg")
829linux_builder("Linux64 Release", "Linux|x64|rel")
830linux_try_job("linux_rel")
831linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
832linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100833linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
Christoffer Jansson627cb052021-06-29 12:34:58 +0200834linux_perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100835linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
836linux_try_job("linux_compile_arm_dbg")
837linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
838linux_try_job("linux_compile_arm_rel")
839linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
840linux_try_job("linux_compile_arm64_dbg")
841linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
842linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100843linux_builder("Linux Asan", "Linux|x64|asan")
844linux_try_job("linux_asan")
845linux_builder("Linux MSan", "Linux|x64|msan")
846linux_try_job("linux_msan")
847linux_builder("Linux Tsan v2", "Linux|x64|tsan")
848linux_try_job("linux_tsan2")
849linux_builder("Linux UBSan", "Linux|x64|ubsan")
850linux_try_job("linux_ubsan")
851linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
852linux_try_job("linux_ubsan_vptr")
853linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
854linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
855linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
856linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100857linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100858linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100859
860mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200861mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100862mac_try_job("mac_compile_dbg")
863mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200864mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100865mac_try_job("mac_compile_rel", cq = None)
866mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100867mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100868mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000869mac_try_job("mac_asan")
Mirko Bonadei2f407ea2021-08-31 07:27:22 +0000870mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200871mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100872
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100873win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
874win_try_job("win_x86_clang_dbg", cq = None)
875win_try_job("win_compile_x86_clang_dbg")
876win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
877win_try_job("win_x86_clang_rel")
878win_try_job("win_compile_x86_clang_rel", cq = None)
879win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100880win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100881win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
882win_try_job("win_x64_clang_dbg", cq = None)
883win_try_job("win_x64_clang_dbg_win8", cq = None)
884win_try_job("win_x64_clang_dbg_win10", cq = None)
885win_try_job("win_compile_x64_clang_dbg")
886win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
887win_try_job("win_x64_clang_rel", cq = None)
888win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200889win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100890win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100891win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
892win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200893win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
894win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100895
896linux_try_job(
897 "presubmit",
898 recipe = "run_presubmit",
899 properties = {"repo_name": "webrtc", "runhooks": True},
900 priority = 28,
901 cq = {"disable_reuse": True},
902)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100903
904cron_builder(
905 "Auto-roll - WebRTC DEPS",
906 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200907 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100908)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200909
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100910cron_builder(
911 "WebRTC version update",
912 recipe = "update_webrtc_binary_version",
913 schedule = "0 4 * * *", # Every day at 4am.
914 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
915)
916
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200917lkgr_config = {
918 "project": "webrtc",
919 "source_url": WEBRTC_GIT,
920 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200921 "allowed_lag": 150, # hours
922 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200923 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200924 "buckets": {
925 "webrtc/ci": {
926 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100927 "builders": [
928 b
929 for b in sorted(lkgr_builders)
930 if b not in skipped_lkgr_bots
931 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200932 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200933 "chromium/webrtc.fyi": {
934 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200935 "builders": [
936 "WebRTC Chromium FYI Android Builder (dbg)",
937 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
938 "WebRTC Chromium FYI Android Builder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200939 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
landrey3f323922021-10-21 07:30:03 +0000940 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200941 "WebRTC Chromium FYI Linux Builder (dbg)",
942 "WebRTC Chromium FYI Linux Builder",
943 "WebRTC Chromium FYI Linux Tester",
944 "WebRTC Chromium FYI Mac Builder (dbg)",
945 "WebRTC Chromium FYI Mac Builder",
946 "WebRTC Chromium FYI Mac Tester",
947 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000948 "WebRTC Chromium FYI Win Builder",
Andrey Logvin7484d1b82021-09-15 17:32:39 +0000949 "WebRTC Chromium FYI Win10 Tester",
950 "WebRTC Chromium FYI Win7 Tester",
951 "WebRTC Chromium FYI Win8 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100952 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200953 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200954 ],
955 },
956 },
957}
958
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100959cron_builder(
960 "WebRTC lkgr finder",
961 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200962 properties = {
963 "project": "webrtc",
964 "repo": WEBRTC_GIT,
965 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200966 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200967 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
968 "config": lkgr_config,
969 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100970 schedule = "*/10 * * * *", # Every 10 minutes.
971)