blob: 86eed36415718352d68c5acbbea804f522309b19 [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"
17WEBRTC_IOS_SDK_PROPERTY = {"$depot_tools/osx_sdk": {"sdk_version": WEBRTC_IOS_XCODE_VERSION}}
Oleh Prypin1a0593f2019-03-11 09:43:28 +010018
Jeremy Leconte39fbd002022-02-22 10:01:14 +010019# Helpers:
20
21def merge_dicts(a, b):
22 """Return the result of merging two dicts.
23
24 If matching values are both dicts or both lists, they will be merged (non-recursively).
25
26 Args:
27 a: first dict.
28 b: second dict (takes priority).
29 Returns:
30 Merged dict.
31 """
32 a = dict(a)
33 for k, bv in b.items():
34 av = a.get(k)
35 if type(av) == "dict" and type(bv) == "dict":
36 a[k] = dict(av)
37 a[k].update(bv)
38 elif type(av) == "list" and type(bv) == "list":
39 a[k] = av + bv
40 else:
41 a[k] = bv
42 return a
43
44def make_goma_properties(enable_ats = None, jobs = None):
45 """Makes a default goma property with the specified argument.
46
47 Args:
48 enable_ats: True if the ATS should be enabled.
49 jobs: Number of jobs to be used by the builder.
50 Returns:
51 A dictonary with the goma properties.
52 """
53 goma_properties = {
Mirko Bonadei1e905342020-03-04 09:39:42 +010054 "server_host": "goma.chromium.org",
Jeremy Leconteea2016b2020-07-01 09:47:22 +020055 "use_luci_auth": True,
Jeremy Leconte39fbd002022-02-22 10:01:14 +010056 }
57 if enable_ats:
58 goma_properties["enable_ats"] = enable_ats
59 if jobs:
60 goma_properties["jobs"] = jobs
61 return {"$build/goma": goma_properties}
Mirko Bonadei5aafd472021-04-21 10:42:00 +020062
Artem Titov70d45af2021-10-11 13:25:18 +020063# Add names of builders to remove from LKGR finder to this list. This is
64# useful when a failure can be safely ignored while fixing it without
65# blocking the LKGR finder on it.
66skipped_lkgr_bots = [
Artem Titov70d45af2021-10-11 13:25:18 +020067]
68
Vadim Shtayurac343a082022-02-09 12:59:42 -080069# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
70lucicfg.enable_experiment("crbug.com/1182002")
71
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010072luci.builder.defaults.experiments.set(
73 {
Christoffer Jansson3e21f3f2021-11-17 16:30:51 +010074 "luci.recipes.use_python3": 100,
75 },
76)
Jeremy Leconte34db3992021-11-23 09:44:31 +010077luci.builder.defaults.test_presentation.set(
78 resultdb.test_presentation(grouping_keys = ["status", "v.test_suite"]),
79)
Andrii Shyshkalov20b21872021-04-28 15:10:53 +020080
Oleh Prypin1a0593f2019-03-11 09:43:28 +010081lucicfg.config(
82 config_dir = ".",
83 tracked_files = [
84 "commit-queue.cfg",
85 "cr-buildbucket.cfg",
86 "luci-logdog.cfg",
87 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010088 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020089 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010090 "luci-scheduler.cfg",
91 "project.cfg",
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +020092 "realms.cfg",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010093 ],
Jeremy Leconteea2016b2020-07-01 09:47:22 +020094 lint_checks = ["default"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +010095)
96
97luci.project(
98 name = "webrtc",
99 buildbucket = "cr-buildbucket.appspot.com",
100 logdog = "luci-logdog.appspot.com",
101 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +0100102 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100103 scheduler = "luci-scheduler.appspot.com",
104 swarming = "chromium-swarm.appspot.com",
105 acls = [
106 acl.entry(
107 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
108 groups = ["all"],
109 ),
110 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
111 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
112 ],
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200113 bindings = [
114 luci.binding(
Vadim Shtayura64ca5e62021-11-11 17:10:18 -0800115 roles = "role/configs.validator",
116 users = [
117 "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
118 ],
119 ),
120 luci.binding(
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200121 roles = "role/swarming.poolOwner",
122 groups = "project-webrtc-admins",
123 ),
124 luci.binding(
125 roles = "role/swarming.poolViewer",
126 groups = "all",
127 ),
Andrii Shyshkalov2961b642021-04-29 14:01:53 +0200128 # Allow any WebRTC build to trigger a test ran under chromium-tester@
129 # task service account.
130 luci.binding(
131 roles = "role/swarming.taskServiceAccount",
132 users = [
133 "chromium-tester@chops-service-accounts.iam.gserviceaccount.com",
134 ],
135 ),
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200136 ],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100137)
138
139luci.logdog(
140 gs_bucket = "chromium-luci-logdog",
141)
142
143luci.milo(
144 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
145)
146
Owen Rodleya55c38e2020-06-15 11:16:10 +1000147luci.notify(tree_closing_enabled = True)
148
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100149luci.cq(
150 status_host = "chromium-cq-status.appspot.com",
151 submit_max_burst = 1,
152 submit_burst_delay = 1 * time.minute,
153)
154
155luci.gitiles_poller(
Christoffer Janssonfa646892021-06-28 17:34:20 +0200156 name = "webrtc-gitiles-trigger-main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100157 bucket = "ci",
158 repo = WEBRTC_GIT,
Christoffer Janssonfa646892021-06-28 17:34:20 +0200159 refs = ["refs/heads/main"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100160)
161
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200162# Swarming permissions:
163
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200164luci.realm(name = "pools/cron", bindings = [
165 # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool.
166 luci.binding(
167 roles = "role/swarming.poolUser",
168 projects = "libyuv",
169 ),
170])
171
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200172luci.realm(name = "pools/ci")
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200173luci.realm(name = "pools/ci-tests", bindings = [
174 # Allow task service accounts of .ci pool/bucket to trigger tasks here.
175 luci.binding(
176 roles = "role/swarming.poolUser",
177 groups = "project-webrtc-ci-task-accounts",
178 ),
179 # Allow tasks here to use .ci task service accounts.
180 luci.binding(
181 roles = "role/swarming.taskServiceAccount",
182 groups = "project-webrtc-ci-task-accounts",
183 ),
184])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100185luci.realm(name = "ci", bindings = [
186 # Allow CI builders to create invocations in their own builds.
187 luci.binding(
188 roles = "role/resultdb.invocationCreator",
189 groups = "project-webrtc-ci-task-accounts",
190 ),
191])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200192
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100193luci.realm(name = "pools/try", bindings = [
194 # Allow to use LED & Swarming "Debug" feature to a larger group but only on try bots / builders.
195 luci.binding(
196 roles = "role/swarming.poolUser",
197 groups = "project-webrtc-led-users",
198 ),
199])
Andrii Shyshkalovc26aaad2021-04-27 16:47:26 +0200200luci.realm(name = "pools/try-tests", bindings = [
201 # Allow task service accounts of .try pool/bucket to trigger tasks here.
202 luci.binding(
203 roles = "role/swarming.poolUser",
204 groups = "project-webrtc-try-task-accounts",
205 ),
206 # Allow tasks here to use .try task service accounts.
207 luci.binding(
208 roles = "role/swarming.taskServiceAccount",
209 groups = "project-webrtc-try-task-accounts",
210 ),
211])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100212luci.realm(name = "try", bindings = [
213 luci.binding(
214 roles = "role/swarming.taskTriggerer",
215 groups = "project-webrtc-led-users",
216 ),
217 # Allow try builders to create invocations in their own builds.
218 luci.binding(
219 roles = "role/resultdb.invocationCreator",
220 groups = "project-webrtc-try-task-accounts",
221 ),
222])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200223
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200224luci.realm(name = "pools/perf", bindings = [
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100225 # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf bots / builders.
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200226 luci.binding(
227 roles = "role/swarming.poolUser",
228 groups = "project-webrtc-led-users",
229 ),
230])
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100231luci.realm(name = "perf", bindings = [
232 luci.binding(
233 roles = "role/swarming.taskTriggerer",
234 groups = "project-webrtc-led-users",
235 ),
236])
Mirko Bonadei4cf0fc72021-08-31 17:38:10 +0200237
Jeremy Leconte053e63c2021-11-24 13:55:48 +0100238luci.realm(name = "@root", bindings = [
239 # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots.
240 luci.binding(
241 roles = "role/swarming.poolUser",
242 groups = "project-webrtc-admins",
243 ),
244 luci.binding(
245 roles = "role/swarming.taskTriggerer",
246 groups = "project-webrtc-admins",
247 ),
248])
Andrii Shyshkalov0efa6da2021-04-26 20:40:33 +0200249
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100250# Bucket definitions:
251
252luci.bucket(
253 name = "try",
254 acls = [
255 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
256 "service-account-cq",
257 "project-webrtc-tryjob-access",
258 ]),
259 ],
260)
261
262luci.bucket(
263 name = "ci",
264 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200265 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
266 "project-webrtc-ci-schedulers",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100267 ]),
Jeremy Leconte2e25bb52020-07-16 09:38:56 +0200268 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
269 # Allow Pinpoint to trigger builds for bisection
270 "service-account-chromeperf",
271 ]),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100272 ],
273)
274
275luci.bucket(
276 name = "perf",
277 acls = [
278 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100279 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
280 ]),
281 ],
282)
283
284luci.bucket(
285 name = "cron",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100286)
287
288# Commit queue definitions:
289
290luci.cq_group(
291 name = "cq",
292 tree_status_host = "webrtc-status.appspot.com",
Christoffer Jansson1746b252021-05-31 16:03:55 +0200293 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100294 acls = [
295 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
296 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
297 ],
298 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200299 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100300)
301
302luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100303 name = "cq_branch",
304 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
305 acls = [
306 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
307 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
308 ],
309 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200310 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100311)
312
313luci.cq_group(
314 name = "cq_infra",
315 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100316 acls = [
317 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
318 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
319 ],
320 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200321 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100322)
323
324luci.cq_tryjob_verifier(
325 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100326 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100327)
328
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200329luci.cq_tryjob_verifier(
330 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
331 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
332 cq_group = "cq",
333)
334
Oleh Prypin71d17422019-03-28 08:43:16 +0100335# Notifier definitions:
336
337luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200338 name = "post_submit_failure_notifier",
339 on_new_status = ["FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200340 notify_emails = [WEBRTC_TROOPER_EMAIL],
Christoffer Jansson16635012021-10-25 16:32:38 +0200341 notify_blamelist = True,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200342 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200343 name = "build_failure",
344 body = io.read_file("luci-notify/email-templates/build_failure.template"),
Oleh Prypin705b6a62019-04-03 23:10:51 +0200345 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100346)
347
348luci.notifier(
349 name = "cron_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200350 on_new_status = ["FAILURE", "INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200351 notify_emails = [WEBRTC_TROOPER_EMAIL],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200352 template = luci.notifier_template(
353 name = "cron",
354 body = io.read_file("luci-notify/email-templates/cron.template"),
355 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100356)
357
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200358luci.notifier(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200359 name = "infra_failure_notifier",
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200360 on_new_status = ["INFRA_FAILURE"],
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200361 notify_emails = [WEBRTC_TROOPER_EMAIL],
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200362 template = luci.notifier_template(
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200363 name = "infra_failure",
364 body = io.read_file("luci-notify/email-templates/infra_failure.template"),
Jeremy Leconte67a904e2020-07-08 11:48:18 +0200365 ),
366)
367
Owen Rodley6b721ba2020-05-26 10:04:20 +1000368# Tree closer definitions:
369
370luci.tree_closer(
371 name = "webrtc_tree_closer",
372 tree_status_host = "webrtc-status.appspot.com",
Owen Rodley6b721ba2020-05-26 10:04:20 +1000373 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
374 # that LUCI-Notify would take the exact same actions. Once we've switched
375 # over, this should be updated - several of these steps don't exist in
376 # WebRTC recipes.
377 failed_step_regexp = [
378 "bot_update",
379 "compile",
380 "gclient runhooks",
381 "runhooks",
382 "update",
383 "extract build",
384 "cleanup_temp",
385 "taskkill",
386 "compile",
387 "gn",
388 ],
389 failed_step_regexp_exclude = ".*\\(experimental\\).*",
390)
391
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100392# Recipe definitions:
393
394def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
395 return luci.recipe(
396 name = recipe.split("/")[-1],
397 cipd_package = pkg,
Christoffer Janssona814c562021-09-09 13:44:54 +0200398 cipd_version = "refs/heads/main",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100399 recipe = recipe,
Christoffer Jansson659d9322021-11-18 15:56:00 +0100400 use_python3 = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100401 )
402
403recipe("chromium_trybot")
404recipe("run_presubmit")
405recipe("webrtc/auto_roll_webrtc_deps")
406recipe("webrtc/ios")
407recipe("webrtc/ios_api_framework")
408recipe("webrtc/libfuzzer")
409recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100410recipe("webrtc/standalone")
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100411recipe("webrtc/update_webrtc_binary_version")
Jeff Yoonf421c682020-12-17 00:16:22 -0800412recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100413
414# Console definitions:
415
Josip Sokcevic5a906ed2021-06-28 08:55:46 -0700416luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"])
417luci.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 +0100418luci.list_view(name = "cron", title = "Cron")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100419luci.list_view(name = "try", title = "Tryserver")
420
421def add_milo(builder, views):
422 """Add Milo console entries for the builder.
423
424 Args:
425 builder: builder name (str).
426 views: dict where keys are names of consoles and values are either a
427 category for the console (str, pipe-separated) or True, which means
428 adding to a list view rather than a console.
429 """
430 for view_name, category in views.items():
431 if category == None:
432 continue
433 elif type(category) == "string":
434 category, _, short_name = category.rpartition("|")
435 luci.console_view_entry(
436 console_view = view_name,
437 builder = builder,
438 category = category or None,
439 short_name = short_name or None,
440 )
441 elif category == True:
442 luci.list_view_entry(
443 list_view = view_name,
444 builder = builder,
445 )
446 else:
447 fail("Unexpected value for category: %r" % category)
448
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200449lkgr_builders = {}
450
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100451# Builder-defining functions:
452
Artem Titarenkof6588b72019-11-14 14:28:11 +0100453def webrtc_builder(
454 name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100455 bucket,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100456 recipe = "standalone",
457 dimensions = {},
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200458 properties = {},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100459 priority = 30,
460 execution_timeout = 2 * time.hour,
461 **kwargs):
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200462 """WebRTC specific wrapper around luci.builder.
463
464 Args:
465 name: builder name (str).
Jeremy Lecontec2516202021-12-14 13:01:24 +0100466 bucket: The name of the bucket the builder belongs to.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200467 recipe: string with the name of the recipe to run.
468 dimensions: dict of Swarming dimensions (strings) to search machines by.
469 properties: dict of properties to pass to the recipe (on top of the default ones).
470 priority: int [1-255] or None, indicating swarming task priority, lower is
471 more important. If None, defer the decision to Buildbucket service.
472 execution_timeout: int or None, how long to wait for a running build to finish before
473 forcefully aborting it and marking the build as timed out. If None,
474 defer the decision to Buildbucket service.
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200475 **kwargs: Pass on to webrtc_builder / luci.builder.
476 Returns:
477 A luci.builder.
478 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100479 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
Ye Kuang8df20492020-10-15 14:54:17 +0900480 properties = merge_dicts(properties, {
481 "$recipe_engine/isolated": {
482 "server": "https://isolateserver.appspot.com",
483 },
484 })
Jeremy Lecontec2516202021-12-14 13:01:24 +0100485 resultdb_bq_table = "webrtc-ci.resultdb." + bucket + "_test_results"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100486 return luci.builder(
487 name = name,
Jeremy Lecontec2516202021-12-14 13:01:24 +0100488 bucket = bucket,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200489 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100490 dimensions = {k: v for k, v in dimensions.items() if v != None},
Mirko Bonadeib7ef4602020-07-01 13:28:26 +0200491 properties = properties,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100492 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100493 priority = priority,
494 build_numbers = True,
495 swarming_tags = ["vpython:native-python-wrapper"],
Jeremy Lecontec2516202021-12-14 13:01:24 +0100496 resultdb_settings = resultdb.settings(
497 enable = True,
498 bq_exports = [
499 resultdb.export_test_results(bq_table = resultdb_bq_table),
500 ],
501 ),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100502 **kwargs
503 )
504
505def ci_builder(
506 name,
507 ci_cat,
508 perf_cat = None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100509 properties = {},
510 dimensions = {},
511 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100512 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100513 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200514 """Add a post-submit builder.
515
516 Args:
517 name: builder name (str).
518 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
519 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
Oleh Prypine5677672019-04-25 12:21:35 +0200520 properties: dict of properties to pass to the recipe (on top of the default ones).
521 dimensions: dict of Swarming dimensions (strings) to search machines by.
522 prioritized: True to make this builder have a higher priority and never batch builds.
523 enabled: False to exclude this builder from consoles and failure notifications.
524 **kwargs: Pass on to webrtc_builder / luci.builder.
525 Returns:
526 A luci.builder.
527
528 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
529 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100530 if prioritized:
531 kwargs["triggering_policy"] = scheduler.greedy_batching(
532 max_batch_size = 1,
533 max_concurrent_invocations = 3,
534 )
535 kwargs["priority"] = 29
536
Oleh Prypinf5432c52019-03-19 15:10:37 +0100537 if enabled:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100538 add_milo(name, {"ci": ci_cat, "perf": perf_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200539 if ci_cat:
540 lkgr_builders[name] = True
Artem Titov70d45af2021-10-11 13:25:18 +0200541 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None
542 if notifies and name not in skipped_lkgr_bots:
543 notifies.append("webrtc_tree_closer")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100544 return webrtc_builder(
545 name = name,
Garrett Beaty4a106ce2020-09-09 14:51:23 -0700546 properties = merge_dicts({"builder_group": "client.webrtc"}, properties),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100547 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
548 bucket = "ci",
549 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Christoffer Janssonfa646892021-06-28 17:34:20 +0200550 triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100551 repo = WEBRTC_GIT,
Artem Titov70d45af2021-10-11 13:25:18 +0200552 notifies = notifies,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100553 **kwargs
554 )
555
556def try_builder(
557 name,
558 try_cat = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100559 properties = {},
560 dimensions = {},
561 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100562 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100563 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200564 """Add a pre-submit builder.
565
566 Args:
567 name: builder name (str).
568 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
Oleh Prypine5677672019-04-25 12:21:35 +0200569 properties: dict of properties to pass to the recipe (on top of the default ones).
570 dimensions: dict of Swarming dimensions (strings) to search machines by.
571 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 +0100572 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200573 **kwargs: Pass on to webrtc_builder / luci.builder.
574 Returns:
575 A luci.builder.
576 """
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100577 add_milo(name, {"try": try_cat})
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100578 if cq != None:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100579 luci.cq_tryjob_verifier(name, cq_group = "cq", **cq)
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100580 if branch_cq:
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100581 luci.cq_tryjob_verifier(name, cq_group = "cq_branch", **cq)
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,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100596 goma_enable_ats = None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100597 **kwargs):
598 add_milo(name, {"perf": perf_cat})
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100599 properties = make_goma_properties(goma_enable_ats)
600 properties["builder_group"] = "client.webrtc.perf"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100601 return webrtc_builder(
602 name = name,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100603 properties = properties,
604 dimensions = {"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100605 bucket = "perf",
606 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
607 # log_base of 1.7 means:
608 # when there are P pending builds, LUCI will batch the first B builds.
609 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
610 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
Jeremy Leconteea2016b2020-07-01 09:47:22 +0200611 triggering_policy = scheduler.logarithmic_batching(log_base = 1.7),
Christoffer Jansson16635012021-10-25 16:32:38 +0200612 repo = WEBRTC_GIT,
Artem Titarenkof6588b72019-11-14 14:28:11 +0100613 execution_timeout = 3 * time.hour,
Mirko Bonadei875a27a2020-07-11 15:04:58 +0200614 notifies = ["post_submit_failure_notifier", "infra_failure_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100615 **kwargs
616 )
617
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100618def cron_builder(name, service_account = None, **kwargs):
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100619 if service_account == None:
620 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com"
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100621 add_milo(name, {"cron": True})
622 return webrtc_builder(
623 name = name,
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100624 dimensions = {"pool": "luci.webrtc.cron", "os": "Linux"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100625 bucket = "cron",
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100626 service_account = service_account,
Oleh Prypin71d17422019-03-28 08:43:16 +0100627 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100628 **kwargs
629 )
630
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100631def normal_builder_factory(**common_kwargs):
632 def builder(*args, **kwargs):
633 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
634
635 def try_job(*args, **kwargs):
636 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
637
638 return builder, try_job
639
640# Mixins:
641
642linux_builder, linux_try_job = normal_builder_factory(
643 dimensions = {"os": "Linux", "inside_docker": "0"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100644 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100645)
646
647android_builder, android_try_job = normal_builder_factory(
648 dimensions = {"os": "Linux"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100649 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100650)
651
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100652def win_builder(name, ci_cat, **kwargs):
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200653 return ci_builder(
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100654 name,
655 ci_cat,
656 dimensions = {"os": "Windows"},
657 properties = make_goma_properties(enable_ats = True),
658 **kwargs
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200659 )
660
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100661def win_try_job(name, goma_jobs = None, **kwargs):
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200662 return try_builder(
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100663 name,
664 dimensions = {"os": "Windows"},
665 properties = make_goma_properties(enable_ats = False, jobs = goma_jobs),
666 **kwargs
Mirko Bonadei5aafd472021-04-21 10:42:00 +0200667 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100668
669mac_builder, mac_try_job = normal_builder_factory(
670 dimensions = {"os": "Mac"},
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100671 properties = make_goma_properties(),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100672)
673
674ios_builder, ios_try_job = normal_builder_factory(
Mirko Bonadei8096c232020-08-26 21:44:42 +0200675 dimensions = {"os": "Mac-10.15"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100676 recipe = "ios",
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100677 properties = merge_dicts(make_goma_properties(), WEBRTC_IOS_SDK_PROPERTY),
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100678 caches = [swarming.cache("osx_sdk")],
679)
680
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200681ios_builder_macos11, ios_try_job_macos11 = normal_builder_factory(
Mirko Bonadeie680bce2021-10-03 12:05:13 +0200682 dimensions = {"os": "Mac-11"},
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100683 recipe = "ios",
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100684 properties = merge_dicts(make_goma_properties(), WEBRTC_IOS_SDK_PROPERTY),
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100685 caches = [swarming.cache("osx_sdk")],
686)
687
688# Actual builder configuration:
689
690android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
691android_try_job("android_compile_arm_dbg", cq = None)
692android_try_job("android_arm_dbg")
693android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
Andrey Logvin849978d2021-09-14 10:20:19 +0000694android_try_job("android_arm_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100695android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
696android_try_job("android_compile_arm_rel")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100697perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"])
698perf_builder("Perf Android32 (M AOSP Nexus6)", "Android|arm|Tester|M AOSP Nexus6", triggered_by = ["Android32 Builder arm"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100699android_try_job("android_compile_arm64_dbg", cq = None)
700android_try_job("android_arm64_dbg", cq = None)
701android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
702android_try_job("android_arm64_rel")
703android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100704perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
705perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100706android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100707android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
708android_try_job("android_compile_x64_dbg")
709android_try_job("android_compile_x64_rel", cq = None)
710android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
711android_try_job("android_compile_x86_dbg")
712android_builder("Android32 Builder x86", "Android|x86|rel")
713android_try_job("android_compile_x86_rel")
714android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
715android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100716android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100717
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100718ios_builder("iOS64 Debug", "iOS|arm64|dbg")
719ios_try_job("ios_compile_arm64_dbg")
720ios_builder("iOS64 Release", "iOS|arm64|rel")
721ios_try_job("ios_compile_arm64_rel")
Artem Titov1d47d312020-11-03 14:45:52 +0100722ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000723ios_try_job("ios_sim_x64_dbg_ios14")
Artem Titov1d47d312020-11-03 14:45:52 +0100724ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000725ios_try_job("ios_sim_x64_dbg_ios13")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100726ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Andrey Logvin81320ad2021-06-02 16:45:09 +0000727ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadeia7677a32021-10-05 08:31:36 +0200728ios_builder_macos11("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
729ios_try_job_macos11("ios_api_framework", recipe = "ios_api_framework")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100730
731linux_builder("Linux32 Debug", "Linux|x86|dbg")
732linux_try_job("linux_x86_dbg")
733linux_builder("Linux32 Release", "Linux|x86|rel")
734linux_try_job("linux_x86_rel")
735linux_builder("Linux64 Debug", "Linux|x64|dbg")
736linux_try_job("linux_dbg", cq = None)
737linux_try_job("linux_compile_dbg")
738linux_builder("Linux64 Release", "Linux|x64|rel")
739linux_try_job("linux_rel")
740linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
741linux_try_job("linux_compile_rel")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100742perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
743perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100744linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
745linux_try_job("linux_compile_arm_dbg")
746linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
747linux_try_job("linux_compile_arm_rel")
748linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
749linux_try_job("linux_compile_arm64_dbg")
750linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
751linux_try_job("linux_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100752linux_builder("Linux Asan", "Linux|x64|asan")
753linux_try_job("linux_asan")
754linux_builder("Linux MSan", "Linux|x64|msan")
755linux_try_job("linux_msan")
756linux_builder("Linux Tsan v2", "Linux|x64|tsan")
757linux_try_job("linux_tsan2")
758linux_builder("Linux UBSan", "Linux|x64|ubsan")
759linux_try_job("linux_ubsan")
760linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
761linux_try_job("linux_ubsan_vptr")
762linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
763linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
764linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
765linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100766linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100767linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100768
769mac_builder("Mac64 Debug", "Mac|x64|dbg")
Mirko Bonadei36a79c52021-10-15 19:52:52 +0200770mac_try_job("mac_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100771mac_try_job("mac_compile_dbg")
772mac_builder("Mac64 Release", "Mac|x64|rel")
Mirko Bonadei624568e2021-10-15 15:31:57 +0200773mac_try_job("mac_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100774mac_try_job("mac_compile_rel", cq = None)
775mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100776perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100777mac_builder("Mac Asan", "Mac|x64|asan")
Andrey Logvina9501222021-04-27 18:08:39 +0000778mac_try_job("mac_asan")
Christoffer Jansson4a8d1f52021-12-09 10:16:43 +0100779mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Christoffer Janssonb21c9502021-06-09 16:15:39 +0200780mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"})
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100781mac_try_job("mac_rel_m1", try_cat = None, cq = None)
782mac_try_job("mac_dbg_m1", try_cat = None, cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100783
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100784win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
785win_try_job("win_x86_clang_dbg", cq = None)
786win_try_job("win_compile_x86_clang_dbg")
787win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
788win_try_job("win_x86_clang_rel")
789win_try_job("win_compile_x86_clang_rel", cq = None)
790win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Jeremy Leconte39fbd002022-02-22 10:01:14 +0100791perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"], goma_enable_ats = True)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100792win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
793win_try_job("win_x64_clang_dbg", cq = None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100794win_try_job("win_x64_clang_dbg_win10", cq = None)
795win_try_job("win_compile_x64_clang_dbg")
796win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
797win_try_job("win_x64_clang_rel", cq = None)
798win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200799win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100800win_try_job("win_asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100801win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
802win_try_job("win_x86_more_configs", recipe = "more_configs")
Mirko Bonadei825f9c22020-07-01 11:52:39 +0200803win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
804win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100805
806linux_try_job(
807 "presubmit",
808 recipe = "run_presubmit",
809 properties = {"repo_name": "webrtc", "runhooks": True},
810 priority = 28,
811 cq = {"disable_reuse": True},
812)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100813
814cron_builder(
815 "Auto-roll - WebRTC DEPS",
816 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200817 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100818)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200819
Mirko Bonadei54bbd1c2020-12-14 15:54:46 +0100820cron_builder(
821 "WebRTC version update",
822 recipe = "update_webrtc_binary_version",
823 schedule = "0 4 * * *", # Every day at 4am.
824 service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com",
825)
826
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200827lkgr_config = {
828 "project": "webrtc",
829 "source_url": WEBRTC_GIT,
830 "status_url": "https://webrtc-status.appspot.com",
Christoffer Jansson75938042021-10-21 16:56:34 +0200831 "allowed_lag": 150, # hours
832 "allowed_gap": 4, # commits behind
Mirko Bonadeif4b78bf2021-04-29 11:23:41 +0200833 "error_recipients": WEBRTC_TROOPER_EMAIL,
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200834 "buckets": {
835 "webrtc/ci": {
836 # bucket alias: luci.webrtc.ci
Mirko Bonadeiab3ff262020-12-18 10:17:43 +0100837 "builders": [
838 b
839 for b in sorted(lkgr_builders)
840 if b not in skipped_lkgr_bots
841 ],
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200842 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200843 "chromium/webrtc.fyi": {
844 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200845 "builders": [
846 "WebRTC Chromium FYI Android Builder (dbg)",
847 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
848 "WebRTC Chromium FYI Android Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100849 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
850 "WebRTC Chromium FYI Android Tests (dbg) (N Nexus5X)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200851 "WebRTC Chromium FYI Linux Builder (dbg)",
852 "WebRTC Chromium FYI Linux Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100853 "WebRTC Chromium FYI Linux Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200854 "WebRTC Chromium FYI Mac Builder (dbg)",
855 "WebRTC Chromium FYI Mac Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100856 "WebRTC Chromium FYI Mac Tester",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200857 "WebRTC Chromium FYI Win Builder (dbg)",
Andrey Logvin7228ba12021-09-15 17:59:21 +0000858 "WebRTC Chromium FYI Win Builder",
Mirko Bonadeidbda38f2022-01-24 13:16:58 +0100859 "WebRTC Chromium FYI Win10 Tester",
860 "WebRTC Chromium FYI Win7 Tester",
Mirko Bonadei2f05cfe2020-11-25 10:41:58 +0100861 "WebRTC Chromium FYI ios-device",
Björn Tereliusc20ed6b2021-06-21 14:31:35 +0200862 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200863 ],
864 },
865 },
866}
867
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100868cron_builder(
869 "WebRTC lkgr finder",
870 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200871 properties = {
872 "project": "webrtc",
873 "repo": WEBRTC_GIT,
874 "ref": "refs/heads/lkgr",
Christoffer Janssone9fcc7b2021-06-29 13:02:15 +0200875 "src_ref": "refs/heads/main",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200876 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
877 "config": lkgr_config,
878 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100879 schedule = "*/10 * * * *", # Every 10 minutes.
880)