blob: 50a3e375ad1aaa0c3d275a2edd35e04f5eb61b5e [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 Shtayurac343a082022-02-09 12:59:42 -080011lucicfg.check_version("1.30.9")
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
Vadim Shtayurac343a082022-02-09 12:59:42 -080055# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
56lucicfg.enable_experiment("crbug.com/1182002")
57
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010058luci.builder.defaults.experiments.set(
59 {
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010060 "luci.recipes.use_python3": 100,
61 },
62)
Jeremy Leconte34db3992021-11-23 09:44:31 +010063luci.builder.defaults.test_presentation.set(
64 resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
65)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020066
Oleh Prypin1a0593f2019-03-11 09:43:28 +010067lucicfg.config(
68 config_dir = ".",
69 tracked_files = [
70 "commit-queue.cfg",
71 "cr-buildbucket.cfg",
72 "luci-logdog.cfg",
73 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010074 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020075 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010076 "luci-scheduler.cfg",
77 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020078 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010079 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020080 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010081)
82
83luci.project(
84 name = "webrtc",
85 buildbucket = "cr-buildbucket.appspot.com",
86 logdog = "luci-logdog.appspot.com",
87 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010088 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010089 scheduler = "luci-scheduler.appspot.com",
90 swarming = "chromium-swarm.appspot.com",
91 acls = [
92 acl.entry(
93 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
94 groups = ["all"],
95 ),
96 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
97 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
98 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020099 bindings = [
100 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800101 roles = "role/configs.validator",
102 users = [
103 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
104 ],
105 ),
106 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200107 roles = "role/swarming.poolOwner",
108 groups = "project-webrtc-admins",
109 ),
110 luci.binding(
111 roles = "role/swarming.poolViewer",
112 groups = "all",
113 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200114 # Allow any WebRTC build to trigger a test ran under chromium-tester@
115 # task service account.
116 luci.binding(
117 roles = "role/swarming.taskServiceAccount",
118 users = [
119 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
120 ],
121 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200122 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100123)
124
125luci.logdog(
126 gs_bucket = "chromium-luci-logdog",
127)
128
129luci.milo(
130 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
131)
132
Owen Rodleya55c38e2020-06-15 11:16:10 +1000133luci.notify(tree_closing_enabled = True)
134
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100135luci.cq(
136 status_host = "chromium-cq-status.appspot.com",
137 submit_max_burst = 1,
138 submit_burst_delay = 1 * time.minute,
139)
140
141luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200142 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100143 bucket = "ci",
144 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200145 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100146)
147
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200148# Swarming permissions:
149
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200150luci.realm(name = "pools/cron", bindings = [
151 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
152 luci.binding(
153 roles = "role/swarming.poolUser",
154 projects = "libyuv",
155 ),
156])
157
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200158luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200159luci.realm(name = "pools/ci-tests", bindings = [
160 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
161 luci.binding(
162 roles = "role/swarming.poolUser",
163 groups = "project-webrtc-ci-task-accounts",
164 ),
165 # Allow tasks here to use .ci task service accounts.
166 luci.binding(
167 roles = "role/swarming.taskServiceAccount",
168 groups = "project-webrtc-ci-task-accounts",
169 ),
170])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100171luci.realm(name = "ci", bindings = [
172 # Allow CI builders to create invocations in their own builds.
173 luci.binding(
174 roles = "role/resultdb.invocationCreator",
175 groups = "project-webrtc-ci-task-accounts",
176 ),
177])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200178
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100179luci.realm(name = "pools/try", bindings = [
180 # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
181 luci.binding(
182 roles = "role/swarming.poolUser",
183 groups = "project-webrtc-led-users",
184 ),
185])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200186luci.realm(name = "pools/try-tests", bindings = [
187 # Allow task service accounts of .try pool/bucket to trigger tasks here.
188 luci.binding(
189 roles = "role/swarming.poolUser",
190 groups = "project-webrtc-try-task-accounts",
191 ),
192 # Allow tasks here to use .try task service accounts.
193 luci.binding(
194 roles = "role/swarming.taskServiceAccount",
195 groups = "project-webrtc-try-task-accounts",
196 ),
197])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100198luci.realm(name = "try", bindings = [
199 luci.binding(
200 roles = "role/swarming.taskTriggerer",
201 groups = "project-webrtc-led-users",
202 ),
203 # Allow try builders to create invocations in their own builds.
204 luci.binding(
205 roles = "role/resultdb.invocationCreator",
206 groups = "project-webrtc-try-task-accounts",
207 ),
208])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200209
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200210luci.realm(name = "pools/perf", bindings = [
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100211 # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200212 luci.binding(
213 roles = "role/swarming.poolUser",
214 groups = "project-webrtc-led-users",
215 ),
216])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100217luci.realm(name = "perf", bindings = [
218 luci.binding(
219 roles = "role/swarming.taskTriggerer",
220 groups = "project-webrtc-led-users",
221 ),
222])
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200223
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100224luci.realm(name = "@root", bindings = [
225 # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
226 luci.binding(
227 roles = "role/swarming.poolUser",
228 groups = "project-webrtc-admins",
229 ),
230 luci.binding(
231 roles = "role/swarming.taskTriggerer",
232 groups = "project-webrtc-admins",
233 ),
234])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200235
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100236# Bucket definitions:
237
238luci.bucket(
239 name = "try",
240 acls = [
241 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
242 "service-account-cq",
243 "project-webrtc-tryjob-access",
244 ]),
245 ],
246)
247
248luci.bucket(
249 name = "ci",
250 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200251 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
252 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100253 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200254 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
255 # Allow Pinpoint to trigger builds for bisection
256 "service-account-chromeperf",
257 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100258 ],
259)
260
261luci.bucket(
262 name = "perf",
263 acls = [
264 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100265 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
266 ]),
267 ],
268)
269
270luci.bucket(
271 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100272)
273
274# Commit queue definitions:
275
276luci.cq_group(
277 name = "cq",
278 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200279 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100280 acls = [
281 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
282 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
283 ],
284 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200285 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100286)
287
288luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100289 name = "cq_branch",
290 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
291 acls = [
292 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
293 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
294 ],
295 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200296 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100297)
298
299luci.cq_group(
300 name = "cq_infra",
301 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100302 acls = [
303 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
304 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
305 ],
306 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200307 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100308)
309
310luci.cq_tryjob_verifier(
311 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100312 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100313)
314
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200315luci.cq_tryjob_verifier(
316 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
317 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
318 cq_group = "cq",
319)
320
Oleh Prypin71d17422019-03-28 08:43:16 +0100321# Notifier definitions:
322
323luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200324 name = "post_submit_failure_notifier",
325 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200326 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200327 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200328 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200329 name = "build_failure",
330 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200331 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100332)
333
334luci.notifier(
335 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200336 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200337 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200338 template = luci.notifier_template(
339 name = "cron",
340 body = io.read_file("luci-notify/email-templates/cron.template"),
341 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100342)
343
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200344luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200345 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200346 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200347 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200348 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200349 name = "infra_failure",
350 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200351 ),
352)
353
Owen Rodley6b721ba2020-05-26 10:04:20 +1000354# Tree closer definitions:
355
356luci.tree_closer(
357 name = "webrtc_tree_closer",
358 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000359 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
360 # that LUCI-Notify would take the exact same actions. Once we've switched
361 # over, this should be updated - several of these steps don't exist in
362 # WebRTC recipes.
363 failed_step_regexp = [
364 "bot_update",
365 "compile",
366 "gclient runhooks",
367 "runhooks",
368 "update",
369 "extract build",
370 "cleanup_temp",
371 "taskkill",
372 "compile",
373 "gn",
374 ],
375 failed_step_regexp_exclude = ".*\\(experimental\\).*",
376)
377
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100378# Recipe definitions:
379
380def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
381 return luci.recipe(
382 name = recipe.split("/")[-1],
383 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200384 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100385 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100386 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100387 )
388
389recipe("chromium_trybot")
390recipe("run_presubmit")
391recipe("webrtc/auto_roll_webrtc_deps")
392recipe("webrtc/ios")
393recipe("webrtc/ios_api_framework")
394recipe("webrtc/libfuzzer")
395recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100396recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100397recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800398recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100399
400# Console definitions:
401
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700402luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
403luci.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 +0100404luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100405luci.list_view(name = "try", title = "Tryserver")
406
407def add_milo(builder, views):
408 """Add Milo console entries for the builder.
409
410 Args:
411 builder: builder name (str).
412 views: dict where keys are names of consoles and values are either a
413 category for the console (str, pipe-separated) or True, which means
414 adding to a list view rather than a console.
415 """
416 for view_name, category in views.items():
417 if category == None:
418 continue
419 elif type(category) == "string":
420 category, _, short_name = category.rpartition("|")
421 luci.console_view_entry(
422 console_view = view_name,
423 builder = builder,
424 category = category or None,
425 short_name = short_name or None,
426 )
427 elif category == True:
428 luci.list_view_entry(
429 list_view = view_name,
430 builder = builder,
431 )
432 else:
433 fail("Unexpected value for category: %r" % category)
434
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200435lkgr_builders = {}
436
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100437# Builder-defining functions:
438
Artem Titarenkof6588b72019-11-14 14:28:11 +0100439def webrtc_builder(
440 name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100441 bucket,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100442 recipe = "standalone",
443 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200444 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100445 priority = 30,
446 execution_timeout = 2 * time.hour,
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200447 goma_jobs = None,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100448 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200449 """WebRTC specific wrapper around luci.builder.
450
451 Args:
452 name: builder name (str).
Jeremy Lecontec2516202021-12-14 13:01:24 +0100453 bucket: The name of the bucket the builder belongs to.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200454 recipe: string with the name of the recipe to run.
455 dimensions: dict of Swarming dimensions (strings) to search machines by.
456 properties: dict of properties to pass to the recipe (on top of the default ones).
457 priority: int [1-255] or None, indicating swarming task priority, lower is
458 more important. If None, defer the decision to Buildbucket service.
459 execution_timeout: int or None, how long to wait for a running build to finish before
460 forcefully aborting it and marking the build as timed out. If None,
461 defer the decision to Buildbucket service.
462 goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the
463 decition to the goma module.
464 **kwargs: Pass on to webrtc_builder / luci.builder.
465 Returns:
466 A luci.builder.
467 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100468 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
469
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200470 if goma_jobs != None:
471 goma_additional_params = {"$build/goma": {"jobs": goma_jobs}}
472 properties = merge_dicts(properties, goma_additional_params)
Ye Kuang8df20492020-10-15 14:54:17 +0900473 properties = merge_dicts(properties, {
474 "$recipe_engine/isolated": {
475 "server": "https://isolateserver.appspot.com",
476 },
477 })
Jeremy Lecontec2516202021-12-14 13:01:24 +0100478 resultdb_bq_table = "webrtc-ci.resultdb." + bucket + "_test_results"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100479 return luci.builder(
480 name = name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100481 bucket = bucket,
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 Lecontec2516202021-12-14 13:01:24 +0100489 resultdb_settings = resultdb.settings(
490 enable = True,
491 bq_exports = [
492 resultdb.export_test_results(bq_table = resultdb_bq_table),
493 ],
494 ),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100495 **kwargs
496 )
497
498def ci_builder(
499 name,
500 ci_cat,
501 perf_cat = None,
502 fyi_cat = None,
503 properties = {},
504 dimensions = {},
505 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100506 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100507 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200508 """Add a post-submit builder.
509
510 Args:
511 name: builder name (str).
512 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
513 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
514 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
515 properties: dict of properties to pass to the recipe (on top of the default ones).
516 dimensions: dict of Swarming dimensions (strings) to search machines by.
517 prioritized: True to make this builder have a higher priority and never batch builds.
518 enabled: False to exclude this builder from consoles and failure notifications.
519 **kwargs: Pass on to webrtc_builder / luci.builder.
520 Returns:
521 A luci.builder.
522
523 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
524 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100525 if prioritized:
526 kwargs["triggering_policy"] = scheduler.greedy_batching(
527 max_batch_size = 1,
528 max_concurrent_invocations = 3,
529 )
530 kwargs["priority"] = 29
531
Oleh Prypinf5432c52019-03-19 15:10:37 +0100532 if enabled:
533 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200534 if ci_cat:
535 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200536 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
537 if notifies and name not in skipped_lkgr_bots:
538 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100539 return webrtc_builder(
540 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700541 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100542 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
543 bucket = "ci",
544 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200545 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100546 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200547 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100548 **kwargs
549 )
550
551def try_builder(
552 name,
553 try_cat = True,
554 fyi_cat = None,
555 properties = {},
556 dimensions = {},
557 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100558 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100559 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200560 """Add a pre-submit builder.
561
562 Args:
563 name: builder name (str).
564 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
565 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
566 properties: dict of properties to pass to the recipe (on top of the default ones).
567 dimensions: dict of Swarming dimensions (strings) to search machines by.
568 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 +0100569 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200570 **kwargs: Pass on to webrtc_builder / luci.builder.
571 Returns:
572 A luci.builder.
573 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100574 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
575 if cq != None:
576 luci.cq_tryjob_verifier(
577 builder = name,
578 cq_group = "cq",
579 **cq
580 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100581 if branch_cq:
582 luci.cq_tryjob_verifier(
583 builder = name,
584 cq_group = "cq_branch",
585 **cq
586 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100587
588 return webrtc_builder(
589 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700590 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100591 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
592 bucket = "try",
593 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200594 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100595 **kwargs
596 )
597
598def perf_builder(
599 name,
600 perf_cat,
601 recipe = "standalone",
602 properties = {},
603 dimensions = {},
604 **kwargs):
605 add_milo(name, {"perf": perf_cat})
606 return webrtc_builder(
607 name = name,
608 recipe = recipe,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700609 properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100610 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
611 bucket = "perf",
612 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
613 # log_base of 1.7 means:
614 # when there are P pending builds, LUCI will batch the first B builds.
615 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
616 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200617 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Christoffer Jansson16635012021-10-25 16:32:38 +0200618 repo = WEBRTC_GIT,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100619 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200620 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100621 **kwargs
622 )
623
Mirko Bonadei12643772020-03-27 13:16:35 +0100624def android_perf_builder(
625 name,
626 perf_cat,
627 recipe = "standalone",
628 properties = {},
629 dimensions = {},
630 **kwargs):
631 return perf_builder(
632 name = name,
633 perf_cat = perf_cat,
634 recipe = recipe,
635 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
636 dimensions = dimensions,
637 **kwargs
638 )
639
640def linux_perf_builder(
641 name,
642 perf_cat,
643 recipe = "standalone",
644 properties = {},
645 dimensions = {},
646 **kwargs):
647 return perf_builder(
648 name = name,
649 perf_cat = perf_cat,
650 recipe = recipe,
651 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
652 dimensions = dimensions,
653 **kwargs
654 )
655
656def mac_perf_builder(
657 name,
658 perf_cat,
659 recipe = "standalone",
660 properties = {},
661 dimensions = {},
662 **kwargs):
663 return perf_builder(
664 name = name,
665 perf_cat = perf_cat,
666 recipe = recipe,
667 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
668 dimensions = dimensions,
669 **kwargs
670 )
671
672def win_perf_builder(
673 name,
674 perf_cat,
675 recipe = "standalone",
676 properties = {},
677 dimensions = {},
678 **kwargs):
679 return perf_builder(
680 name = name,
681 perf_cat = perf_cat,
682 recipe = recipe,
683 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
684 dimensions = dimensions,
685 **kwargs
686 )
687
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100688def cron_builder(name, dimensions = {}, service_account = None, **kwargs):
689 if service_account == None:
690 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100691 add_milo(name, {"cron": True})
692 return webrtc_builder(
693 name = name,
694 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
695 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100696 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100697 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100698 **kwargs
699 )
700
701# Helpers:
702
703def merge_dicts(a, b):
704 """Return the result of merging two dicts.
705
706 If matching values are both dicts or both lists, they will be merged (non-recursively).
707
708 Args:
709 a: first dict.
710 b: second dict (takes priority).
711 Returns:
712 Merged dict.
713 """
714 a = dict(a)
715 for k, bv in b.items():
716 av = a.get(k)
717 if type(av) == "dict" and type(bv) == "dict":
718 a[k] = dict(av)
719 a[k].update(bv)
720 elif type(av) == "list" and type(bv) == "list":
721 a[k] = av + bv
722 else:
723 a[k] = bv
724 return a
725
726def normal_builder_factory(**common_kwargs):
727 def builder(*args, **kwargs):
728 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
729
730 def try_job(*args, **kwargs):
731 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
732
733 return builder, try_job
734
735# Mixins:
736
737linux_builder, linux_try_job = normal_builder_factory(
738 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100739 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100740)
741
742android_builder, android_try_job = normal_builder_factory(
743 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100744 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100745)
746
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200747def win_builder(*args, **kwargs):
748 return ci_builder(
749 *args,
750 **merge_dicts({
751 "dimensions": {"os": "Windows"},
752 "properties": GOMA_BACKEND_RBE_ATS_PROD,
753 }, kwargs)
754 )
755
756def win_try_job(*args, **kwargs):
757 return try_builder(
758 *args,
759 **merge_dicts({
760 "dimensions": {"os": "Windows"},
761 "properties": GOMA_BACKEND_RBE_NO_ATS_PROD,
762 }, kwargs)
763 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100764
765mac_builder, mac_try_job = normal_builder_factory(
766 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100767 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100768)
769
770ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200771 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100772 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100773 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
774 caches = [swarming.cache("osx_sdk")],
775)
776
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200777ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200778 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100779 recipe = "ios",
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200780 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100781 caches = [swarming.cache("osx_sdk")],
782)
783
784# Actual builder configuration:
785
786android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
787android_try_job("android_compile_arm_dbg", cq = None)
788android_try_job("android_arm_dbg")
789android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000790android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100791android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
792android_try_job("android_compile_arm_rel")
Mirko Bonadei86b4f2d2020-07-08 14:24:48 +0200793android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
Mirko Bonadei12643772020-03-27 13:16:35 +0100794android_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 +0100795android_try_job("android_compile_arm64_dbg", cq = None)
796android_try_job("android_arm64_dbg", cq = None)
797android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
798android_try_job("android_arm64_rel")
799android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100800android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
801android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100802android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100803android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
804android_try_job("android_compile_x64_dbg")
805android_try_job("android_compile_x64_rel", cq = None)
806android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
807android_try_job("android_compile_x86_dbg")
808android_builder("Android32 Builder x86", "Android|x86|rel")
809android_try_job("android_compile_x86_rel")
810android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
811android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100812android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100813
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100814ios_builder("iOS64 Debug", "iOS|arm64|dbg")
815ios_try_job("ios_compile_arm64_dbg")
816ios_builder("iOS64 Release", "iOS|arm64|rel")
817ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100818ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000819ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100820ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000821ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100822ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000823ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200824ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
825ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100826
827linux_builder("Linux32 Debug", "Linux|x86|dbg")
828linux_try_job("linux_x86_dbg")
829linux_builder("Linux32 Release", "Linux|x86|rel")
830linux_try_job("linux_x86_rel")
831linux_builder("Linux64 Debug", "Linux|x64|dbg")
832linux_try_job("linux_dbg", cq = None)
833linux_try_job("linux_compile_dbg")
834linux_builder("Linux64 Release", "Linux|x64|rel")
835linux_try_job("linux_rel")
836linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
837linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100838linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
Christoffer Jansson627cb052021-06-29 12:34:58 +0200839linux_perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100840linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
841linux_try_job("linux_compile_arm_dbg")
842linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
843linux_try_job("linux_compile_arm_rel")
844linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
845linux_try_job("linux_compile_arm64_dbg")
846linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
847linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100848linux_builder("Linux Asan", "Linux|x64|asan")
849linux_try_job("linux_asan")
850linux_builder("Linux MSan", "Linux|x64|msan")
851linux_try_job("linux_msan")
852linux_builder("Linux Tsan v2", "Linux|x64|tsan")
853linux_try_job("linux_tsan2")
854linux_builder("Linux UBSan", "Linux|x64|ubsan")
855linux_try_job("linux_ubsan")
856linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
857linux_try_job("linux_ubsan_vptr")
858linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
859linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
860linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
861linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100862linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100863linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100864
865mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200866mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100867mac_try_job("mac_compile_dbg")
868mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200869mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100870mac_try_job("mac_compile_rel", cq = None)
871mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100872mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100873mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000874mac_try_job("mac_asan")
Christoffer Jansson4a8d1f52021-12-09 10:16:43 +0100875mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200876mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Christoffer Jansson1d56a422022-01-28 17:04:47 +0100877mac_try_job("mac_rel_m1", try_cat = None, cq = None, branch_cq = False)
878mac_try_job("mac_dbg_m1", try_cat = None, cq = None, branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100879
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100880win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
881win_try_job("win_x86_clang_dbg", cq = None)
882win_try_job("win_compile_x86_clang_dbg")
883win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
884win_try_job("win_x86_clang_rel")
885win_try_job("win_compile_x86_clang_rel", cq = None)
886win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100887win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100888win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
889win_try_job("win_x64_clang_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100890win_try_job("win_x64_clang_dbg_win10", cq = None)
891win_try_job("win_compile_x64_clang_dbg")
892win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
893win_try_job("win_x64_clang_rel", cq = None)
894win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200895win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100896win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100897win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
898win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200899win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
900win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100901
902linux_try_job(
903 "presubmit",
904 recipe = "run_presubmit",
905 properties = {"repo_name": "webrtc", "runhooks": True},
906 priority = 28,
907 cq = {"disable_reuse": True},
908)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100909
910cron_builder(
911 "Auto-roll - WebRTC DEPS",
912 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200913 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100914)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200915
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100916cron_builder(
917 "WebRTC version update",
918 recipe = "update_webrtc_binary_version",
919 schedule = "0 4 * * *", # Every day at 4am.
920 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
921)
922
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200923lkgr_config = {
924 "project": "webrtc",
925 "source_url": WEBRTC_GIT,
926 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200927 "allowed_lag": 150, # hours
928 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200929 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200930 "buckets": {
931 "webrtc/ci": {
932 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100933 "builders": [
934 b
935 for b in sorted(lkgr_builders)
936 if b not in skipped_lkgr_bots
937 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200938 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200939 "chromium/webrtc.fyi": {
940 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200941 "builders": [
942 "WebRTC Chromium FYI Android Builder (dbg)",
943 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
944 "WebRTC Chromium FYI Android Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100945 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
946 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200947 "WebRTC Chromium FYI Linux Builder (dbg)",
948 "WebRTC Chromium FYI Linux Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100949 "WebRTC Chromium FYI Linux Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200950 "WebRTC Chromium FYI Mac Builder (dbg)",
951 "WebRTC Chromium FYI Mac Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100952 "WebRTC Chromium FYI Mac Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200953 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000954 "WebRTC Chromium FYI Win Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100955 "WebRTC Chromium FYI Win10 Tester",
956 "WebRTC Chromium FYI Win7 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100957 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200958 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200959 ],
960 },
961 },
962}
963
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100964cron_builder(
965 "WebRTC lkgr finder",
966 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200967 properties = {
968 "project": "webrtc",
969 "repo": WEBRTC_GIT,
970 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200971 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200972 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
973 "config": lkgr_config,
974 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100975 schedule = "*/10 * * * *", # Every 10 minutes.
976)