blob: c9001e9e0b3fce214ab82a7ac77be4d144593c27 [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
7# https://chromium.googlesource.com/infra/luci/luci-go/+/master/lucicfg/doc/
8
9WEBRTC_GIT = "https://webrtc.googlesource.com/src"
10WEBRTC_GERRIT = "https://webrtc-review.googlesource.com/src"
11
Mirko Bonadei32ca4862020-03-11 10:39:45 +010012GOMA_BACKEND_WEBRTC_RBE_PROD = {
Mirko Bonadei1e905342020-03-04 09:39:42 +010013 "$build/goma": {
14 "server_host": "goma.chromium.org",
15 "use_luci_auth": True
16 }
17}
18
Mirko Bonadei84360ca2020-03-12 08:35:48 +010019GOMA_BACKEND_WEBRTC_IOS_RBE_PROD = {
20 "$build/goma": {
21 "server_host": "goma.chromium.org",
22 "use_luci_auth": True
23 },
24 "$depot_tools/osx_sdk": {"sdk_version": "11c29"},
25}
26
Patrik Höglund3916a972019-12-04 13:19:38 +010027GOMA_BACKEND_RBE_ATS_PROD = {
28 "$build/goma": {
29 "server_host": "goma.chromium.org",
Mirko Bonadei2688eca2020-03-25 09:15:54 +010030 "use_luci_auth": True,
Patrik Höglund3916a972019-12-04 13:19:38 +010031 "enable_ats": True
32 }
33}
34
Oleh Prypin1a0593f2019-03-11 09:43:28 +010035# Top-level configs:
36
Owen Rodley6b721ba2020-05-26 10:04:20 +100037# Enable luci.tree_closer.
38lucicfg.enable_experiment("crbug.com/1054172")
39
Oleh Prypin1a0593f2019-03-11 09:43:28 +010040lucicfg.config(
41 config_dir = ".",
42 tracked_files = [
43 "commit-queue.cfg",
44 "cr-buildbucket.cfg",
45 "luci-logdog.cfg",
46 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010047 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020048 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010049 "luci-scheduler.cfg",
50 "project.cfg",
51 ],
52)
53
54luci.project(
55 name = "webrtc",
56 buildbucket = "cr-buildbucket.appspot.com",
57 logdog = "luci-logdog.appspot.com",
58 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010059 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010060 scheduler = "luci-scheduler.appspot.com",
61 swarming = "chromium-swarm.appspot.com",
62 acls = [
63 acl.entry(
64 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
65 groups = ["all"],
66 ),
67 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
68 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
69 ],
70)
71
72luci.logdog(
73 gs_bucket = "chromium-luci-logdog",
74)
75
76luci.milo(
77 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
78)
79
80luci.cq(
81 status_host = "chromium-cq-status.appspot.com",
82 submit_max_burst = 1,
83 submit_burst_delay = 1 * time.minute,
84)
85
86luci.gitiles_poller(
87 name = "webrtc-gitiles-trigger-master",
88 bucket = "ci",
89 repo = WEBRTC_GIT,
90)
91
92# Bucket definitions:
93
94luci.bucket(
95 name = "try",
96 acls = [
97 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
98 "service-account-cq",
99 "project-webrtc-tryjob-access",
100 ]),
101 ],
102)
103
104luci.bucket(
105 name = "ci",
106 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200107 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
108 "project-webrtc-ci-schedulers",
109 ], users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100110 "luci-scheduler@appspot.gserviceaccount.com",
111 ]),
112 ],
113)
114
115luci.bucket(
116 name = "perf",
117 acls = [
118 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
119 "luci-scheduler@appspot.gserviceaccount.com",
120 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
121 ]),
122 ],
123)
124
125luci.bucket(
126 name = "cron",
127 acls = [
128 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
129 "luci-scheduler@appspot.gserviceaccount.com",
130 ]),
131 ],
132)
133
134# Commit queue definitions:
135
136luci.cq_group(
137 name = "cq",
138 tree_status_host = "webrtc-status.appspot.com",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100139 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100140 acls = [
141 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
142 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
143 ],
144 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200145 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100146)
147
148luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100149 name = "cq_branch",
150 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
151 acls = [
152 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
153 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
154 ],
155 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200156 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100157)
158
159luci.cq_group(
160 name = "cq_infra",
161 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100162 acls = [
163 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
164 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
165 ],
166 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200167 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100168)
169
170luci.cq_tryjob_verifier(
171 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100172 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100173)
174
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200175luci.cq_tryjob_verifier(
176 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
177 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
178 cq_group = "cq",
179)
180
Oleh Prypin71d17422019-03-28 08:43:16 +0100181# Notifier definitions:
182
183luci.notifier(
184 name = "ci_notifier",
185 on_failure = True,
186 notify_emails = ["webrtc-sheriffs-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200187 template = luci.notifier_template(
188 name = "ci",
189 body = io.read_file("luci-notify/email-templates/ci.template"),
190 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100191)
192
193luci.notifier(
194 name = "cron_notifier",
195 on_failure = True,
196 notify_emails = ["webrtc-troopers-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200197 template = luci.notifier_template(
198 name = "cron",
199 body = io.read_file("luci-notify/email-templates/cron.template"),
200 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100201)
202
Owen Rodley6b721ba2020-05-26 10:04:20 +1000203# Tree closer definitions:
204
205luci.tree_closer(
206 name = "webrtc_tree_closer",
207 tree_status_host = "webrtc-status.appspot.com",
208 template = luci.notifier_template(
209 name = "status",
210 body = io.read_file("luci-notify/email-templates/status.template"),
211 ),
212 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
213 # that LUCI-Notify would take the exact same actions. Once we've switched
214 # over, this should be updated - several of these steps don't exist in
215 # WebRTC recipes.
216 failed_step_regexp = [
217 "bot_update",
218 "compile",
219 "gclient runhooks",
220 "runhooks",
221 "update",
222 "extract build",
223 "cleanup_temp",
224 "taskkill",
225 "compile",
226 "gn",
227 ],
228 failed_step_regexp_exclude = ".*\\(experimental\\).*",
229)
230
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100231# Recipe definitions:
232
233def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
234 return luci.recipe(
235 name = recipe.split("/")[-1],
236 cipd_package = pkg,
237 cipd_version = "refs/heads/master",
238 recipe = recipe,
239 )
240
241recipe("chromium_trybot")
242recipe("run_presubmit")
243recipe("webrtc/auto_roll_webrtc_deps")
244recipe("webrtc/ios")
245recipe("webrtc/ios_api_framework")
246recipe("webrtc/libfuzzer")
247recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100248recipe("webrtc/standalone")
249recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/infra/infra")
250
251# Console definitions:
252
253luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb")
254luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb")
255luci.list_view(name = "cron", title = "Cron")
256luci.console_view(name = "fyi", title = "FYI", repo = WEBRTC_GIT, header = "console-header.textpb")
257luci.list_view(name = "try", title = "Tryserver")
258
259def add_milo(builder, views):
260 """Add Milo console entries for the builder.
261
262 Args:
263 builder: builder name (str).
264 views: dict where keys are names of consoles and values are either a
265 category for the console (str, pipe-separated) or True, which means
266 adding to a list view rather than a console.
267 """
268 for view_name, category in views.items():
269 if category == None:
270 continue
271 elif type(category) == "string":
272 category, _, short_name = category.rpartition("|")
273 luci.console_view_entry(
274 console_view = view_name,
275 builder = builder,
276 category = category or None,
277 short_name = short_name or None,
278 )
279 elif category == True:
280 luci.list_view_entry(
281 list_view = view_name,
282 builder = builder,
283 )
284 else:
285 fail("Unexpected value for category: %r" % category)
286
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200287lkgr_builders = {}
288
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100289# Builder-defining functions:
290
Artem Titarenkof6588b72019-11-14 14:28:11 +0100291def webrtc_builder(
292 name,
293 recipe = "standalone",
294 dimensions = {},
295 priority = 30,
296 execution_timeout = 2 * time.hour,
297 **kwargs):
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100298 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
299
300 return luci.builder(
301 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200302 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100303 dimensions = {k: v for k, v in dimensions.items() if v != None},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100304 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100305 priority = priority,
306 build_numbers = True,
307 swarming_tags = ["vpython:native-python-wrapper"],
308 **kwargs
309 )
310
311def ci_builder(
312 name,
313 ci_cat,
314 perf_cat = None,
315 fyi_cat = None,
316 properties = {},
317 dimensions = {},
318 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100319 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100320 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200321 """Add a post-submit builder.
322
323 Args:
324 name: builder name (str).
325 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
326 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
327 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
328 properties: dict of properties to pass to the recipe (on top of the default ones).
329 dimensions: dict of Swarming dimensions (strings) to search machines by.
330 prioritized: True to make this builder have a higher priority and never batch builds.
331 enabled: False to exclude this builder from consoles and failure notifications.
332 **kwargs: Pass on to webrtc_builder / luci.builder.
333 Returns:
334 A luci.builder.
335
336 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
337 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100338 if prioritized:
339 kwargs["triggering_policy"] = scheduler.greedy_batching(
340 max_batch_size = 1,
341 max_concurrent_invocations = 3,
342 )
343 kwargs["priority"] = 29
344
Oleh Prypinf5432c52019-03-19 15:10:37 +0100345 if enabled:
346 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200347 if ci_cat:
348 lkgr_builders[name] = True
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100349 return webrtc_builder(
350 name = name,
351 properties = merge_dicts({"mastername": "client.webrtc"}, properties),
352 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
353 bucket = "ci",
354 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Oleh Prypinf5432c52019-03-19 15:10:37 +0100355 triggered_by = ["webrtc-gitiles-trigger-master"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100356 repo = WEBRTC_GIT,
Owen Rodley6b721ba2020-05-26 10:04:20 +1000357 notifies = ["ci_notifier", "webrtc_tree_closer"] if enabled and (ci_cat or perf_cat) else None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100358 **kwargs
359 )
360
361def try_builder(
362 name,
363 try_cat = True,
364 fyi_cat = None,
365 properties = {},
366 dimensions = {},
367 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100368 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100369 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200370 """Add a pre-submit builder.
371
372 Args:
373 name: builder name (str).
374 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
375 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
376 properties: dict of properties to pass to the recipe (on top of the default ones).
377 dimensions: dict of Swarming dimensions (strings) to search machines by.
378 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 +0100379 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200380 **kwargs: Pass on to webrtc_builder / luci.builder.
381 Returns:
382 A luci.builder.
383 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100384 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
385 if cq != None:
386 luci.cq_tryjob_verifier(
387 builder = name,
388 cq_group = "cq",
389 **cq
390 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100391 if branch_cq:
392 luci.cq_tryjob_verifier(
393 builder = name,
394 cq_group = "cq_branch",
395 **cq
396 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100397
398 return webrtc_builder(
399 name = name,
400 properties = merge_dicts({"mastername": "tryserver.webrtc"}, properties),
401 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
402 bucket = "try",
403 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
404 **kwargs
405 )
406
407def perf_builder(
408 name,
409 perf_cat,
410 recipe = "standalone",
411 properties = {},
412 dimensions = {},
413 **kwargs):
414 add_milo(name, {"perf": perf_cat})
415 return webrtc_builder(
416 name = name,
417 recipe = recipe,
418 properties = merge_dicts({"mastername": "client.webrtc.perf"}, properties),
419 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
420 bucket = "perf",
421 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
422 # log_base of 1.7 means:
423 # when there are P pending builds, LUCI will batch the first B builds.
424 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
425 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
426 triggering_policy = scheduler.logarithmic_batching(log_base = 17 / 10),
Artem Titarenkof6588b72019-11-14 14:28:11 +0100427 execution_timeout = 3 * time.hour,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100428 **kwargs
429 )
430
Mirko Bonadei12643772020-03-27 13:16:35 +0100431def android_perf_builder(
432 name,
433 perf_cat,
434 recipe = "standalone",
435 properties = {},
436 dimensions = {},
437 **kwargs):
438 return perf_builder(
439 name = name,
440 perf_cat = perf_cat,
441 recipe = recipe,
442 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
443 dimensions = dimensions,
444 **kwargs
445 )
446
447def linux_perf_builder(
448 name,
449 perf_cat,
450 recipe = "standalone",
451 properties = {},
452 dimensions = {},
453 **kwargs):
454 return perf_builder(
455 name = name,
456 perf_cat = perf_cat,
457 recipe = recipe,
458 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
459 dimensions = dimensions,
460 **kwargs
461 )
462
463def mac_perf_builder(
464 name,
465 perf_cat,
466 recipe = "standalone",
467 properties = {},
468 dimensions = {},
469 **kwargs):
470 return perf_builder(
471 name = name,
472 perf_cat = perf_cat,
473 recipe = recipe,
474 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
475 dimensions = dimensions,
476 **kwargs
477 )
478
479def win_perf_builder(
480 name,
481 perf_cat,
482 recipe = "standalone",
483 properties = {},
484 dimensions = {},
485 **kwargs):
486 return perf_builder(
487 name = name,
488 perf_cat = perf_cat,
489 recipe = recipe,
490 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
491 dimensions = dimensions,
492 **kwargs
493 )
494
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100495def cron_builder(name, dimensions = {}, **kwargs):
496 add_milo(name, {"cron": True})
497 return webrtc_builder(
498 name = name,
499 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
500 bucket = "cron",
501 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com",
Oleh Prypin71d17422019-03-28 08:43:16 +0100502 repo = WEBRTC_GIT,
503 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100504 **kwargs
505 )
506
507# Helpers:
508
509def merge_dicts(a, b):
510 """Return the result of merging two dicts.
511
512 If matching values are both dicts or both lists, they will be merged (non-recursively).
513
514 Args:
515 a: first dict.
516 b: second dict (takes priority).
517 Returns:
518 Merged dict.
519 """
520 a = dict(a)
521 for k, bv in b.items():
522 av = a.get(k)
523 if type(av) == "dict" and type(bv) == "dict":
524 a[k] = dict(av)
525 a[k].update(bv)
526 elif type(av) == "list" and type(bv) == "list":
527 a[k] = av + bv
528 else:
529 a[k] = bv
530 return a
531
532def normal_builder_factory(**common_kwargs):
533 def builder(*args, **kwargs):
534 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
535
536 def try_job(*args, **kwargs):
537 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
538
539 return builder, try_job
540
541# Mixins:
542
543linux_builder, linux_try_job = normal_builder_factory(
544 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100545 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100546)
547
548android_builder, android_try_job = normal_builder_factory(
549 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100550 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100551)
552
553win_builder, win_try_job = normal_builder_factory(
554 dimensions = {"os": "Windows"},
Patrik Höglund3916a972019-12-04 13:19:38 +0100555 properties = GOMA_BACKEND_RBE_ATS_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100556)
557
558mac_builder, mac_try_job = normal_builder_factory(
559 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100560 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100561)
562
563ios_builder, ios_try_job = normal_builder_factory(
Patrik Höglundd5dcd0e2020-02-19 21:50:39 +0100564 dimensions = {"os": "Mac-10.14"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100565 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100566 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
567 caches = [swarming.cache("osx_sdk")],
568)
569
570# Some iOS builders don't use goma because they build using
571# `use_xcode_clang=true` which is not supported by goma.
572# https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder
573# https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework
574ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory(
575 dimensions = {"os": "Mac-10.14"},
576 recipe = "ios",
Patrik Höglundb681c162020-02-21 07:34:53 +0100577 properties = {"$depot_tools/osx_sdk": {"sdk_version": "11c29"}},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100578 caches = [swarming.cache("osx_sdk")],
579)
580
581# Actual builder configuration:
582
583android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
584android_try_job("android_compile_arm_dbg", cq = None)
585android_try_job("android_arm_dbg")
586android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
587android_try_job("android_arm_rel")
588android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
589android_try_job("android_compile_arm_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100590android_perf_builder("Perf Android32 (K Nexus5)", "Android|arm|Tester|K Nexus5", triggered_by = ["Android32 Builder arm"])
591android_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 +0100592android_try_job("android_compile_arm64_dbg", cq = None)
593android_try_job("android_arm64_dbg", cq = None)
594android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
595android_try_job("android_arm64_rel")
596android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100597android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
598android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100599android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100600android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
601android_try_job("android_compile_x64_dbg")
602android_try_job("android_compile_x64_rel", cq = None)
603android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
604android_try_job("android_compile_x86_dbg")
605android_builder("Android32 Builder x86", "Android|x86|rel")
606android_try_job("android_compile_x86_rel")
607android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
608android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100609android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100610
611ios_builder("iOS32 Debug", "iOS|arm|dbg")
612ios_try_job("ios_compile_arm_dbg")
613ios_builder("iOS32 Release", "iOS|arm|rel")
614ios_try_job("ios_compile_arm_rel")
615ios_builder("iOS64 Debug", "iOS|arm64|dbg")
616ios_try_job("ios_compile_arm64_dbg")
617ios_builder("iOS64 Release", "iOS|arm64|rel")
618ios_try_job("ios_compile_arm64_rel")
619ios_builder("iOS64 Sim Debug (iOS 10.0)", "iOS|x64|10")
Patrik Höglund17bed672020-02-20 13:31:36 +0000620ios_try_job("ios_sim_x64_dbg_ios10")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100621ios_builder("iOS64 Sim Debug (iOS 11)", "iOS|x64|11")
Patrik Höglund17bed672020-02-20 13:31:36 +0000622ios_try_job("ios_sim_x64_dbg_ios11")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100623ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Patrik Höglund17bed672020-02-20 13:31:36 +0000624ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100625ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
626ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq=None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100627
628linux_builder("Linux32 Debug", "Linux|x86|dbg")
629linux_try_job("linux_x86_dbg")
630linux_builder("Linux32 Release", "Linux|x86|rel")
631linux_try_job("linux_x86_rel")
632linux_builder("Linux64 Debug", "Linux|x64|dbg")
633linux_try_job("linux_dbg", cq = None)
634linux_try_job("linux_compile_dbg")
635linux_builder("Linux64 Release", "Linux|x64|rel")
636linux_try_job("linux_rel")
637linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
638linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100639linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
640linux_perf_builder("Perf Linux Xenial", None, triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100641linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
642linux_try_job("linux_compile_arm_dbg")
643linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
644linux_try_job("linux_compile_arm_rel")
645linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
646linux_try_job("linux_compile_arm64_dbg")
647linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
648linux_try_job("linux_compile_arm64_rel")
649linux_builder("Linux64 Release (GCC)", "Linux|x64|gcc")
650linux_try_job("linux_compile_gcc_rel")
651linux_builder("Linux Asan", "Linux|x64|asan")
652linux_try_job("linux_asan")
653linux_builder("Linux MSan", "Linux|x64|msan")
654linux_try_job("linux_msan")
655linux_builder("Linux Tsan v2", "Linux|x64|tsan")
656linux_try_job("linux_tsan2")
657linux_builder("Linux UBSan", "Linux|x64|ubsan")
658linux_try_job("linux_ubsan")
659linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
660linux_try_job("linux_ubsan_vptr")
661linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
662linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
663linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
664linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100665linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100666linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100667
668mac_builder("Mac64 Debug", "Mac|x64|dbg")
669mac_try_job("mac_dbg", cq = None)
670mac_try_job("mac_compile_dbg")
671mac_builder("Mac64 Release", "Mac|x64|rel")
672mac_try_job("mac_rel")
673mac_try_job("mac_compile_rel", cq = None)
674mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100675mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100676mac_builder("Mac Asan", "Mac|x64|asan")
677mac_try_job("mac_asan")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100678mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100679
680win_builder("Win32 Debug", "Win MSVC|x86|dbg")
681win_try_job("win_x86_msvc_dbg")
682win_try_job("win_compile_x86_msvc_dbg", cq = None)
Oleh Prypin63041b82019-03-19 22:56:01 +0000683win_builder("Win32 Release", "Win MSVC|x86|rel")
684win_try_job("win_x86_msvc_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100685win_try_job("win_compile_x86_msvc_rel", cq = None)
686win_builder("Win64 Debug", "Win MSVC|x64|dbg")
687win_try_job("win_x64_msvc_dbg")
688win_try_job("win_compile_x64_msvc_dbg", cq = None)
689win_builder("Win64 Release", "Win MSVC|x64|rel")
690win_try_job("win_x64_msvc_rel")
691win_try_job("win_compile_x64_msvc_rel", cq = None)
692win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
693win_try_job("win_x86_clang_dbg", cq = None)
694win_try_job("win_compile_x86_clang_dbg")
695win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
696win_try_job("win_x86_clang_rel")
697win_try_job("win_compile_x86_clang_rel", cq = None)
698win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100699win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100700win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
701win_try_job("win_x64_clang_dbg", cq = None)
702win_try_job("win_x64_clang_dbg_win8", cq = None)
703win_try_job("win_x64_clang_dbg_win10", cq = None)
704win_try_job("win_compile_x64_clang_dbg")
705win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
706win_try_job("win_x64_clang_rel", cq = None)
707win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200708win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100709win_try_job("win_asan")
710win_builder("Win64 UWP", ci_cat = None, fyi_cat = "")
711win_try_job("win_x64_uwp", cq = None, try_cat = None, fyi_cat = "")
712win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
713win_try_job("win_x86_more_configs", recipe = "more_configs")
Patrik Höglund39534612019-12-09 14:46:41 +0100714win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Patrik Höglundfe350452019-12-10 11:33:53 +0100715win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100716
717linux_try_job(
718 "presubmit",
719 recipe = "run_presubmit",
720 properties = {"repo_name": "webrtc", "runhooks": True},
721 priority = 28,
722 cq = {"disable_reuse": True},
723)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100724
725cron_builder(
726 "Auto-roll - WebRTC DEPS",
727 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200728 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100729)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200730
731lkgr_config = {
732 "project": "webrtc",
733 "source_url": WEBRTC_GIT,
734 "status_url": "https://webrtc-status.appspot.com",
735 "allowed_lag": 300, # hours
736 "allowed_gap": 12, # commits behind
737 "error_recipients": "webrtc-troopers-robots@google.com",
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200738 "buckets": {
739 "webrtc/ci": {
740 # bucket alias: luci.webrtc.ci
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200741 "builders": sorted(lkgr_builders),
742 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200743 "chromium/webrtc.fyi": {
744 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200745 "builders": [
746 "WebRTC Chromium FYI Android Builder (dbg)",
747 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
748 "WebRTC Chromium FYI Android Builder",
Mirko Bonadei04fe32f2020-05-01 00:45:58 +0200749 "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200750 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
751 "WebRTC Chromium FYI Linux Builder (dbg)",
752 "WebRTC Chromium FYI Linux Builder",
753 "WebRTC Chromium FYI Linux Tester",
754 "WebRTC Chromium FYI Mac Builder (dbg)",
755 "WebRTC Chromium FYI Mac Builder",
756 "WebRTC Chromium FYI Mac Tester",
757 "WebRTC Chromium FYI Win Builder (dbg)",
758 "WebRTC Chromium FYI Win Builder",
759 "WebRTC Chromium FYI Win10 Tester",
760 "WebRTC Chromium FYI Win7 Tester",
761 "WebRTC Chromium FYI Win8 Tester",
762 "WebRTC Chromium FYI ios-device",
Mirko Bonadei37071f62020-02-15 10:42:49 +0100763 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200764 ],
765 },
766 },
767}
768
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100769cron_builder(
770 "WebRTC lkgr finder",
771 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200772 properties = {
773 "project": "webrtc",
774 "repo": WEBRTC_GIT,
775 "ref": "refs/heads/lkgr",
776 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
777 "config": lkgr_config,
778 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100779 schedule = "*/10 * * * *", # Every 10 minutes.
780)