blob: 8d99e661f93d41da3bb0664945548bdd1b5910af [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"
Jeremy Leconte39fbd002022-02-22 10:01:14 +010016WEBRTC_IOS_XCODE_VERSION = "12a7209"
Jeremy Lecontea9cd35e2022-02-22 15:15:21 +010017WEBRTC_XCODE13 = "13a233"
Jeremy Leconte39fbd002022-02-22 10:01:14 +010018WEBRTC_IOS_SDK_PROPERTY = {"$depot_tools/osx_sdk": {"sdk_version": WEBRTC_IOS_XCODE_VERSION}}
Oleh Prypin1a0593f2019-03-11 09:43:28 +010019
Jeremy Leconte39fbd002022-02-22 10:01:14 +010020# Helpers:
21
22def merge_dicts(a, b):
23 """Return the result of merging two dicts.
24
25 If matching values are both dicts or both lists, they will be merged (non-recursively).
26
27 Args:
28 a: first dict.
29 b: second dict (takes priority).
30 Returns:
31 Merged dict.
32 """
33 a = dict(a)
34 for k, bv in b.items():
35 av = a.get(k)
36 if type(av) == "dict" and type(bv) == "dict":
37 a[k] = dict(av)
38 a[k].update(bv)
39 elif type(av) == "list" and type(bv) == "list":
40 a[k] = av + bv
41 else:
42 a[k] = bv
43 return a
44
45def make_goma_properties(enable_ats = None, jobs = None):
46 """Makes a default goma property with the specified argument.
47
48 Args:
49 enable_ats: True if the ATS should be enabled.
50 jobs: Number of jobs to be used by the builder.
51 Returns:
52 A dictonary with the goma properties.
53 """
54 goma_properties = {
Mirko Bonadei1e905342020-03-04 09:39:42 +010055 "server_host": "goma.chromium.org",
Jeremy Leconteea2016b2020-07-01 09:47:22 +020056 "use_luci_auth": True,
Jeremy Leconte39fbd002022-02-22 10:01:14 +010057 }
58 if enable_ats:
59 goma_properties["enable_ats"] = enable_ats
60 if jobs:
61 goma_properties["jobs"] = jobs
62 return {"$build/goma": goma_properties}
Mirko Bonadei5aafd472021-04-21 10:42:00 +020063
Artem Titov70d45af2021-10-11 13:25:18 +020064# Add names of builders to remove from LKGR finder to this list. This is
65# useful when a failure can be safely ignored while fixing it without
66# blocking the LKGR finder on it.
67skipped_lkgr_bots = [
Artem Titov70d45af2021-10-11 13:25:18 +020068]
69
Vadim Shtayurac343a082022-02-09 12:59:42 -080070# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
71lucicfg.enable_experiment("crbug.com/1182002")
72
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010073luci.builder.defaults.experiments.set(
74 {
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010075 "luci.recipes.use_python3": 100,
76 },
77)
Jeremy Leconte34db3992021-11-23 09:44:31 +010078luci.builder.defaults.test_presentation.set(
79 resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
80)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020081
Oleh Prypin1a0593f2019-03-11 09:43:28 +010082lucicfg.config(
83 config_dir = ".",
84 tracked_files = [
85 "commit-queue.cfg",
86 "cr-buildbucket.cfg",
87 "luci-logdog.cfg",
88 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010089 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020090 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010091 "luci-scheduler.cfg",
92 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020093 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010094 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020095 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010096)
97
98luci.project(
99 name = "webrtc",
100 buildbucket = "cr-buildbucket.appspot.com",
101 logdog = "luci-logdog.appspot.com",
102 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +0100103 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100104 scheduler = "luci-scheduler.appspot.com",
105 swarming = "chromium-swarm.appspot.com",
106 acls = [
107 acl.entry(
108 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
109 groups = ["all"],
110 ),
111 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
112 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
113 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200114 bindings = [
115 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800116 roles = "role/configs.validator",
117 users = [
118 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
119 ],
120 ),
121 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200122 roles = "role/swarming.poolOwner",
123 groups = "project-webrtc-admins",
124 ),
125 luci.binding(
126 roles = "role/swarming.poolViewer",
127 groups = "all",
128 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200129 # Allow any WebRTC build to trigger a test ran under chromium-tester@
130 # task service account.
131 luci.binding(
132 roles = "role/swarming.taskServiceAccount",
133 users = [
134 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
135 ],
136 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200137 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100138)
139
140luci.logdog(
141 gs_bucket = "chromium-luci-logdog",
142)
143
144luci.milo(
145 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
146)
147
Owen Rodleya55c38e2020-06-15 11:16:10 +1000148luci.notify(tree_closing_enabled = True)
149
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100150luci.cq(
151 status_host = "chromium-cq-status.appspot.com",
152 submit_max_burst = 1,
153 submit_burst_delay = 1 * time.minute,
154)
155
156luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200157 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100158 bucket = "ci",
159 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200160 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100161)
162
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200163# Swarming permissions:
164
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200165luci.realm(name = "pools/cron", bindings = [
166 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
167 luci.binding(
168 roles = "role/swarming.poolUser",
169 projects = "libyuv",
170 ),
171])
172
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200173luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200174luci.realm(name = "pools/ci-tests", bindings = [
175 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
176 luci.binding(
177 roles = "role/swarming.poolUser",
178 groups = "project-webrtc-ci-task-accounts",
179 ),
180 # Allow tasks here to use .ci task service accounts.
181 luci.binding(
182 roles = "role/swarming.taskServiceAccount",
183 groups = "project-webrtc-ci-task-accounts",
184 ),
185])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100186luci.realm(name = "ci", bindings = [
187 # Allow CI builders to create invocations in their own builds.
188 luci.binding(
189 roles = "role/resultdb.invocationCreator",
190 groups = "project-webrtc-ci-task-accounts",
191 ),
192])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200193
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100194luci.realm(name = "pools/try", bindings = [
195 # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
196 luci.binding(
197 roles = "role/swarming.poolUser",
198 groups = "project-webrtc-led-users",
199 ),
200])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200201luci.realm(name = "pools/try-tests", bindings = [
202 # Allow task service accounts of .try pool/bucket to trigger tasks here.
203 luci.binding(
204 roles = "role/swarming.poolUser",
205 groups = "project-webrtc-try-task-accounts",
206 ),
207 # Allow tasks here to use .try task service accounts.
208 luci.binding(
209 roles = "role/swarming.taskServiceAccount",
210 groups = "project-webrtc-try-task-accounts",
211 ),
212])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100213luci.realm(name = "try", bindings = [
214 luci.binding(
215 roles = "role/swarming.taskTriggerer",
216 groups = "project-webrtc-led-users",
217 ),
218 # Allow try builders to create invocations in their own builds.
219 luci.binding(
220 roles = "role/resultdb.invocationCreator",
221 groups = "project-webrtc-try-task-accounts",
222 ),
223])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200224
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200225luci.realm(name = "pools/perf", bindings = [
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100226 # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200227 luci.binding(
228 roles = "role/swarming.poolUser",
229 groups = "project-webrtc-led-users",
230 ),
231])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100232luci.realm(name = "perf", bindings = [
233 luci.binding(
234 roles = "role/swarming.taskTriggerer",
235 groups = "project-webrtc-led-users",
236 ),
237])
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200238
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100239luci.realm(name = "@root", bindings = [
240 # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
241 luci.binding(
242 roles = "role/swarming.poolUser",
243 groups = "project-webrtc-admins",
244 ),
245 luci.binding(
246 roles = "role/swarming.taskTriggerer",
247 groups = "project-webrtc-admins",
248 ),
249])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200250
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100251# Bucket definitions:
252
253luci.bucket(
254 name = "try",
255 acls = [
256 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
257 "service-account-cq",
258 "project-webrtc-tryjob-access",
259 ]),
260 ],
261)
262
263luci.bucket(
264 name = "ci",
265 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200266 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
267 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100268 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200269 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
270 # Allow Pinpoint to trigger builds for bisection
271 "service-account-chromeperf",
272 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100273 ],
274)
275
276luci.bucket(
277 name = "perf",
278 acls = [
279 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100280 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
281 ]),
282 ],
283)
284
285luci.bucket(
286 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100287)
288
289# Commit queue definitions:
290
291luci.cq_group(
292 name = "cq",
293 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200294 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100295 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 Prypin1a0593f2019-03-11 09:43:28 +0100301)
302
303luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100304 name = "cq_branch",
305 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
306 acls = [
307 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
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 Prypin7d1cabe2019-03-14 15:10:30 +0100312)
313
314luci.cq_group(
315 name = "cq_infra",
316 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100317 acls = [
318 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
319 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
320 ],
321 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200322 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100323)
324
325luci.cq_tryjob_verifier(
326 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100327 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100328)
329
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200330luci.cq_tryjob_verifier(
331 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
332 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
333 cq_group = "cq",
334)
335
Oleh Prypin71d17422019-03-28 08:43:16 +0100336# Notifier definitions:
337
338luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200339 name = "post_submit_failure_notifier",
340 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200341 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200342 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200343 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200344 name = "build_failure",
345 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200346 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100347)
348
349luci.notifier(
350 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200351 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200352 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200353 template = luci.notifier_template(
354 name = "cron",
355 body = io.read_file("luci-notify/email-templates/cron.template"),
356 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100357)
358
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200359luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200360 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200361 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200362 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200363 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200364 name = "infra_failure",
365 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200366 ),
367)
368
Owen Rodley6b721ba2020-05-26 10:04:20 +1000369# Tree closer definitions:
370
371luci.tree_closer(
372 name = "webrtc_tree_closer",
373 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000374 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
375 # that LUCI-Notify would take the exact same actions. Once we've switched
376 # over, this should be updated - several of these steps don't exist in
377 # WebRTC recipes.
378 failed_step_regexp = [
379 "bot_update",
380 "compile",
381 "gclient runhooks",
382 "runhooks",
383 "update",
384 "extract build",
385 "cleanup_temp",
386 "taskkill",
387 "compile",
388 "gn",
389 ],
390 failed_step_regexp_exclude = ".*\\(experimental\\).*",
391)
392
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100393# Recipe definitions:
394
395def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
396 return luci.recipe(
397 name = recipe.split("/")[-1],
398 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200399 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100400 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100401 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100402 )
403
404recipe("chromium_trybot")
405recipe("run_presubmit")
406recipe("webrtc/auto_roll_webrtc_deps")
407recipe("webrtc/ios")
408recipe("webrtc/ios_api_framework")
409recipe("webrtc/libfuzzer")
410recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100411recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100412recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800413recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100414
415# Console definitions:
416
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700417luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
418luci.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 +0100419luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100420luci.list_view(name = "try", title = "Tryserver")
421
422def add_milo(builder, views):
423 """Add Milo console entries for the builder.
424
425 Args:
426 builder: builder name (str).
427 views: dict where keys are names of consoles and values are either a
428 category for the console (str, pipe-separated) or True, which means
429 adding to a list view rather than a console.
430 """
431 for view_name, category in views.items():
432 if category == None:
433 continue
434 elif type(category) == "string":
435 category, _, short_name = category.rpartition("|")
436 luci.console_view_entry(
437 console_view = view_name,
438 builder = builder,
439 category = category or None,
440 short_name = short_name or None,
441 )
442 elif category == True:
443 luci.list_view_entry(
444 list_view = view_name,
445 builder = builder,
446 )
447 else:
448 fail("Unexpected value for category: %r" % category)
449
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200450lkgr_builders = {}
451
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100452# Builder-defining functions:
453
Artem Titarenkof6588b72019-11-14 14:28:11 +0100454def webrtc_builder(
455 name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100456 bucket,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100457 recipe = "standalone",
458 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200459 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100460 priority = 30,
461 execution_timeout = 2 * time.hour,
462 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200463 """WebRTC specific wrapper around luci.builder.
464
465 Args:
466 name: builder name (str).
Jeremy Lecontec2516202021-12-14 13:01:24 +0100467 bucket: The name of the bucket the builder belongs to.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200468 recipe: string with the name of the recipe to run.
469 dimensions: dict of Swarming dimensions (strings) to search machines by.
470 properties: dict of properties to pass to the recipe (on top of the default ones).
471 priority: int [1-255] or None, indicating swarming task priority, lower is
472 more important. If None, defer the decision to Buildbucket service.
473 execution_timeout: int or None, how long to wait for a running build to finish before
474 forcefully aborting it and marking the build as timed out. If None,
475 defer the decision to Buildbucket service.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200476 **kwargs: Pass on to webrtc_builder / luci.builder.
477 Returns:
478 A luci.builder.
479 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100480 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
Ye Kuang8df20492020-10-15 14:54:17 +0900481 properties = merge_dicts(properties, {
482 "$recipe_engine/isolated": {
483 "server": "https://isolateserver.appspot.com",
484 },
485 })
Jeremy Lecontec2516202021-12-14 13:01:24 +0100486 resultdb_bq_table = "webrtc-ci.resultdb." + bucket + "_test_results"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100487 return luci.builder(
488 name = name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100489 bucket = bucket,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200490 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100491 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200492 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100493 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100494 priority = priority,
495 build_numbers = True,
496 swarming_tags = ["vpython:native-python-wrapper"],
Jeremy Lecontec2516202021-12-14 13:01:24 +0100497 resultdb_settings = resultdb.settings(
498 enable = True,
499 bq_exports = [
500 resultdb.export_test_results(bq_table = resultdb_bq_table),
501 ],
502 ),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100503 **kwargs
504 )
505
506def ci_builder(
507 name,
508 ci_cat,
509 perf_cat = None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100510 properties = {},
511 dimensions = {},
512 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100513 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100514 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200515 """Add a post-submit builder.
516
517 Args:
518 name: builder name (str).
519 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
520 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
Oleh Prypine5677672019-04-25 12:21:35 +0200521 properties: dict of properties to pass to the recipe (on top of the default ones).
522 dimensions: dict of Swarming dimensions (strings) to search machines by.
523 prioritized: True to make this builder have a higher priority and never batch builds.
524 enabled: False to exclude this builder from consoles and failure notifications.
525 **kwargs: Pass on to webrtc_builder / luci.builder.
526 Returns:
527 A luci.builder.
528
529 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
530 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100531 if prioritized:
532 kwargs["triggering_policy"] = scheduler.greedy_batching(
533 max_batch_size = 1,
534 max_concurrent_invocations = 3,
535 )
536 kwargs["priority"] = 29
537
Oleh Prypinf5432c52019-03-19 15:10:37 +0100538 if enabled:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100539 add_milo(name, {"ci": ci_cat, "perf": perf_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200540 if ci_cat:
541 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200542 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
543 if notifies and name not in skipped_lkgr_bots:
544 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100545 return webrtc_builder(
546 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700547 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100548 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
549 bucket = "ci",
550 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200551 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100552 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200553 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100554 **kwargs
555 )
556
557def try_builder(
558 name,
559 try_cat = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100560 properties = {},
561 dimensions = {},
562 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100563 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100564 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200565 """Add a pre-submit builder.
566
567 Args:
568 name: builder name (str).
569 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
Oleh Prypine5677672019-04-25 12:21:35 +0200570 properties: dict of properties to pass to the recipe (on top of the default ones).
571 dimensions: dict of Swarming dimensions (strings) to search machines by.
572 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 +0100573 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200574 **kwargs: Pass on to webrtc_builder / luci.builder.
575 Returns:
576 A luci.builder.
577 """
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100578 add_milo(name, {"try": try_cat})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100579 if cq != None:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100580 luci.cq_tryjob_verifier(name, cq_group = "cq", **cq)
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100581 if branch_cq:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100582 luci.cq_tryjob_verifier(name, cq_group = "cq_branch", **cq)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100583
584 return webrtc_builder(
585 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700586 properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100587 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
588 bucket = "try",
589 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200590 notifies = ["infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100591 **kwargs
592 )
593
594def perf_builder(
595 name,
596 perf_cat,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100597 goma_enable_ats = None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100598 **kwargs):
599 add_milo(name, {"perf": perf_cat})
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100600 properties = make_goma_properties(goma_enable_ats)
601 properties["builder_group"] = "client.webrtc.perf"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100602 return webrtc_builder(
603 name = name,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100604 properties = properties,
605 dimensions = {"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100606 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
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100619def cron_builder(name, service_account = None, **kwargs):
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100620 if service_account == None:
621 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100622 add_milo(name, {"cron": True})
623 return webrtc_builder(
624 name = name,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100625 dimensions = {"pool": "luci.webrtc.cron", "os": "Linux"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100626 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100627 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100628 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100629 **kwargs
630 )
631
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100632def normal_builder_factory(**common_kwargs):
633 def builder(*args, **kwargs):
634 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
635
636 def try_job(*args, **kwargs):
637 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
638
639 return builder, try_job
640
641# Mixins:
642
643linux_builder, linux_try_job = normal_builder_factory(
644 dimensions = {"os": "Linux", "inside_docker": "0"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100645 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100646)
647
648android_builder, android_try_job = normal_builder_factory(
649 dimensions = {"os": "Linux"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100650 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100651)
652
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100653def win_builder(name, ci_cat, **kwargs):
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200654 return ci_builder(
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100655 name,
656 ci_cat,
657 dimensions = {"os": "Windows"},
658 properties = make_goma_properties(enable_ats = True),
659 **kwargs
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200660 )
661
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100662def win_try_job(name, goma_jobs = None, **kwargs):
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200663 return try_builder(
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100664 name,
665 dimensions = {"os": "Windows"},
666 properties = make_goma_properties(enable_ats = False, jobs = goma_jobs),
667 **kwargs
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200668 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100669
670mac_builder, mac_try_job = normal_builder_factory(
671 dimensions = {"os": "Mac"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100672 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100673)
674
Jeremy Leconte2338cc02022-02-22 13:22:05 +0100675ios_builder = normal_builder_factory(
676 dimensions = {"os": "Mac-10.15"},
677 properties = merge_dicts(
678 make_goma_properties(),
679 {"xcode_build_version": WEBRTC_IOS_XCODE_VERSION},
680 ),
681 caches = [swarming.cache(
682 name = "xcode_ios_" + WEBRTC_IOS_XCODE_VERSION,
683 path = "xcode_ios_" + WEBRTC_IOS_XCODE_VERSION + ".app",
684 )],
685)[0]
686
687ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200688 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100689 recipe = "ios",
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100690 properties = merge_dicts(make_goma_properties(), WEBRTC_IOS_SDK_PROPERTY),
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100691 caches = [swarming.cache("osx_sdk")],
Jeremy Leconte2338cc02022-02-22 13:22:05 +0100692)[1]
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100693
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200694ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200695 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100696 recipe = "ios",
Jeremy Lecontea9cd35e2022-02-22 15:15:21 +0100697 properties = merge_dicts(
698 make_goma_properties(),
699 {"xcode_build_version": WEBRTC_XCODE13},
700 ),
701 caches = [swarming.cache(
702 name = "xcode_ios_" + WEBRTC_XCODE13,
703 path = "xcode_ios_" + WEBRTC_XCODE13 + ".app",
704 )],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100705)
706
707# Actual builder configuration:
708
709android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
710android_try_job("android_compile_arm_dbg", cq = None)
711android_try_job("android_arm_dbg")
712android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000713android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100714android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
715android_try_job("android_compile_arm_rel")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100716perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
717perf_builder("Perf Android32 (M AOSP Nexus6)", "Android|arm|Tester|M AOSP Nexus6", triggered_by = ["Android32 Builder arm"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100718android_try_job("android_compile_arm64_dbg", cq = None)
719android_try_job("android_arm64_dbg", cq = None)
720android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
721android_try_job("android_arm64_rel")
722android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100723perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
724perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100725android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100726android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
727android_try_job("android_compile_x64_dbg")
728android_try_job("android_compile_x64_rel", cq = None)
729android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
730android_try_job("android_compile_x86_dbg")
731android_builder("Android32 Builder x86", "Android|x86|rel")
732android_try_job("android_compile_x86_rel")
733android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
734android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100735android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100736
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100737ios_builder("iOS64 Debug", "iOS|arm64|dbg")
738ios_try_job("ios_compile_arm64_dbg")
739ios_builder("iOS64 Release", "iOS|arm64|rel")
740ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100741ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000742ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100743ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000744ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100745ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000746ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200747ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
748ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100749
750linux_builder("Linux32 Debug", "Linux|x86|dbg")
751linux_try_job("linux_x86_dbg")
752linux_builder("Linux32 Release", "Linux|x86|rel")
753linux_try_job("linux_x86_rel")
754linux_builder("Linux64 Debug", "Linux|x64|dbg")
755linux_try_job("linux_dbg", cq = None)
756linux_try_job("linux_compile_dbg")
757linux_builder("Linux64 Release", "Linux|x64|rel")
758linux_try_job("linux_rel")
759linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
760linux_try_job("linux_compile_rel")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100761perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
762perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100763linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
764linux_try_job("linux_compile_arm_dbg")
765linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
766linux_try_job("linux_compile_arm_rel")
767linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
768linux_try_job("linux_compile_arm64_dbg")
769linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
770linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100771linux_builder("Linux Asan", "Linux|x64|asan")
772linux_try_job("linux_asan")
773linux_builder("Linux MSan", "Linux|x64|msan")
774linux_try_job("linux_msan")
775linux_builder("Linux Tsan v2", "Linux|x64|tsan")
776linux_try_job("linux_tsan2")
777linux_builder("Linux UBSan", "Linux|x64|ubsan")
778linux_try_job("linux_ubsan")
779linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
780linux_try_job("linux_ubsan_vptr")
781linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
782linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
783linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
784linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100785linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100786linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100787
788mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200789mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100790mac_try_job("mac_compile_dbg")
791mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200792mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100793mac_try_job("mac_compile_rel", cq = None)
794mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100795perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100796mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000797mac_try_job("mac_asan")
Christoffer Jansson4a8d1f52021-12-09 10:16:43 +0100798mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200799mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100800mac_try_job("mac_rel_m1", try_cat = None, cq = None)
801mac_try_job("mac_dbg_m1", try_cat = None, cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100802
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100803win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
804win_try_job("win_x86_clang_dbg", cq = None)
805win_try_job("win_compile_x86_clang_dbg")
806win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
807win_try_job("win_x86_clang_rel")
808win_try_job("win_compile_x86_clang_rel", cq = None)
809win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100810perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"], goma_enable_ats = True)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100811win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
812win_try_job("win_x64_clang_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100813win_try_job("win_x64_clang_dbg_win10", cq = None)
814win_try_job("win_compile_x64_clang_dbg")
815win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
816win_try_job("win_x64_clang_rel", cq = None)
817win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200818win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100819win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100820win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
821win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200822win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
823win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100824
825linux_try_job(
826 "presubmit",
827 recipe = "run_presubmit",
828 properties = {"repo_name": "webrtc", "runhooks": True},
829 priority = 28,
830 cq = {"disable_reuse": True},
831)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100832
833cron_builder(
834 "Auto-roll - WebRTC DEPS",
835 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200836 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100837)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200838
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100839cron_builder(
840 "WebRTC version update",
841 recipe = "update_webrtc_binary_version",
842 schedule = "0 4 * * *", # Every day at 4am.
843 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
844)
845
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200846lkgr_config = {
847 "project": "webrtc",
848 "source_url": WEBRTC_GIT,
849 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200850 "allowed_lag": 150, # hours
851 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200852 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200853 "buckets": {
854 "webrtc/ci": {
855 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100856 "builders": [
857 b
858 for b in sorted(lkgr_builders)
859 if b not in skipped_lkgr_bots
860 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200861 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200862 "chromium/webrtc.fyi": {
863 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200864 "builders": [
865 "WebRTC Chromium FYI Android Builder (dbg)",
866 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
867 "WebRTC Chromium FYI Android Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100868 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
869 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200870 "WebRTC Chromium FYI Linux Builder (dbg)",
871 "WebRTC Chromium FYI Linux Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100872 "WebRTC Chromium FYI Linux Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200873 "WebRTC Chromium FYI Mac Builder (dbg)",
874 "WebRTC Chromium FYI Mac Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100875 "WebRTC Chromium FYI Mac Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200876 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000877 "WebRTC Chromium FYI Win Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100878 "WebRTC Chromium FYI Win10 Tester",
879 "WebRTC Chromium FYI Win7 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100880 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200881 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200882 ],
883 },
884 },
885}
886
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100887cron_builder(
888 "WebRTC lkgr finder",
889 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200890 properties = {
891 "project": "webrtc",
892 "repo": WEBRTC_GIT,
893 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200894 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200895 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
896 "config": lkgr_config,
897 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100898 schedule = "*/10 * * * *", # Every 10 minutes.
899)