blob: 82cbbfbdc7d950943e15c0354590950d93e84339 [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
Mirko Bonadei9189d9c2020-06-09 21:54:18 +02009lucicfg.check_version('1.15.0')
10
Oleh Prypin1a0593f2019-03-11 09:43:28 +010011WEBRTC_GIT = "https://webrtc.googlesource.com/src"
12WEBRTC_GERRIT = "https://webrtc-review.googlesource.com/src"
13
Mirko Bonadei32ca4862020-03-11 10:39:45 +010014GOMA_BACKEND_WEBRTC_RBE_PROD = {
Mirko Bonadei1e905342020-03-04 09:39:42 +010015 "$build/goma": {
16 "server_host": "goma.chromium.org",
17 "use_luci_auth": True
18 }
19}
20
Mirko Bonadei84360ca2020-03-12 08:35:48 +010021GOMA_BACKEND_WEBRTC_IOS_RBE_PROD = {
22 "$build/goma": {
23 "server_host": "goma.chromium.org",
24 "use_luci_auth": True
25 },
26 "$depot_tools/osx_sdk": {"sdk_version": "11c29"},
27}
28
Patrik Höglund3916a972019-12-04 13:19:38 +010029GOMA_BACKEND_RBE_ATS_PROD = {
30 "$build/goma": {
31 "server_host": "goma.chromium.org",
Mirko Bonadei2688eca2020-03-25 09:15:54 +010032 "use_luci_auth": True,
Patrik Höglund3916a972019-12-04 13:19:38 +010033 "enable_ats": True
34 }
35}
36
Oleh Prypin1a0593f2019-03-11 09:43:28 +010037# Top-level configs:
38
Owen Rodley6b721ba2020-05-26 10:04:20 +100039# Enable luci.tree_closer.
40lucicfg.enable_experiment("crbug.com/1054172")
41
Oleh Prypin1a0593f2019-03-11 09:43:28 +010042lucicfg.config(
43 config_dir = ".",
44 tracked_files = [
45 "commit-queue.cfg",
46 "cr-buildbucket.cfg",
47 "luci-logdog.cfg",
48 "luci-milo.cfg",
Oleh Prypin71d17422019-03-28 08:43:16 +010049 "luci-notify.cfg",
Oleh Prypin705b6a62019-04-03 23:10:51 +020050 "luci-notify/**/*",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010051 "luci-scheduler.cfg",
52 "project.cfg",
53 ],
54)
55
56luci.project(
57 name = "webrtc",
58 buildbucket = "cr-buildbucket.appspot.com",
59 logdog = "luci-logdog.appspot.com",
60 milo = "luci-milo.appspot.com",
Oleh Prypin71d17422019-03-28 08:43:16 +010061 notify = "luci-notify.appspot.com",
Oleh Prypin1a0593f2019-03-11 09:43:28 +010062 scheduler = "luci-scheduler.appspot.com",
63 swarming = "chromium-swarm.appspot.com",
64 acls = [
65 acl.entry(
66 [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER],
67 groups = ["all"],
68 ),
69 acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]),
70 acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]),
71 ],
72)
73
74luci.logdog(
75 gs_bucket = "chromium-luci-logdog",
76)
77
78luci.milo(
79 logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png",
80)
81
Owen Rodleya55c38e2020-06-15 11:16:10 +100082luci.notify(tree_closing_enabled = True)
83
Oleh Prypin1a0593f2019-03-11 09:43:28 +010084luci.cq(
85 status_host = "chromium-cq-status.appspot.com",
86 submit_max_burst = 1,
87 submit_burst_delay = 1 * time.minute,
88)
89
90luci.gitiles_poller(
91 name = "webrtc-gitiles-trigger-master",
92 bucket = "ci",
93 repo = WEBRTC_GIT,
94)
95
96# Bucket definitions:
97
98luci.bucket(
99 name = "try",
100 acls = [
101 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
102 "service-account-cq",
103 "project-webrtc-tryjob-access",
104 ]),
105 ],
106)
107
108luci.bucket(
109 name = "ci",
110 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200111 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
112 "project-webrtc-ci-schedulers",
113 ], users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100114 "luci-scheduler@appspot.gserviceaccount.com",
115 ]),
116 ],
117)
118
119luci.bucket(
120 name = "perf",
121 acls = [
122 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
123 "luci-scheduler@appspot.gserviceaccount.com",
124 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
125 ]),
126 ],
127)
128
129luci.bucket(
130 name = "cron",
131 acls = [
132 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
133 "luci-scheduler@appspot.gserviceaccount.com",
134 ]),
135 ],
136)
137
138# Commit queue definitions:
139
140luci.cq_group(
141 name = "cq",
142 tree_status_host = "webrtc-status.appspot.com",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100143 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100144 acls = [
145 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
146 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
147 ],
148 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200149 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100150)
151
152luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100153 name = "cq_branch",
154 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
155 acls = [
156 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
157 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
158 ],
159 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200160 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100161)
162
163luci.cq_group(
164 name = "cq_infra",
165 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100166 acls = [
167 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
168 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
169 ],
170 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200171 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100172)
173
174luci.cq_tryjob_verifier(
175 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100176 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100177)
178
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200179luci.cq_tryjob_verifier(
180 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
181 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
182 cq_group = "cq",
183)
184
Oleh Prypin71d17422019-03-28 08:43:16 +0100185# Notifier definitions:
186
187luci.notifier(
188 name = "ci_notifier",
189 on_failure = True,
190 notify_emails = ["webrtc-sheriffs-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200191 template = luci.notifier_template(
192 name = "ci",
193 body = io.read_file("luci-notify/email-templates/ci.template"),
194 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100195)
196
197luci.notifier(
198 name = "cron_notifier",
199 on_failure = True,
200 notify_emails = ["webrtc-troopers-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200201 template = luci.notifier_template(
202 name = "cron",
203 body = io.read_file("luci-notify/email-templates/cron.template"),
204 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100205)
206
Owen Rodley6b721ba2020-05-26 10:04:20 +1000207# Tree closer definitions:
208
209luci.tree_closer(
210 name = "webrtc_tree_closer",
211 tree_status_host = "webrtc-status.appspot.com",
212 template = luci.notifier_template(
213 name = "status",
214 body = io.read_file("luci-notify/email-templates/status.template"),
215 ),
216 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
217 # that LUCI-Notify would take the exact same actions. Once we've switched
218 # over, this should be updated - several of these steps don't exist in
219 # WebRTC recipes.
220 failed_step_regexp = [
221 "bot_update",
222 "compile",
223 "gclient runhooks",
224 "runhooks",
225 "update",
226 "extract build",
227 "cleanup_temp",
228 "taskkill",
229 "compile",
230 "gn",
231 ],
232 failed_step_regexp_exclude = ".*\\(experimental\\).*",
233)
234
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100235# Recipe definitions:
236
237def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
238 return luci.recipe(
239 name = recipe.split("/")[-1],
240 cipd_package = pkg,
241 cipd_version = "refs/heads/master",
242 recipe = recipe,
243 )
244
245recipe("chromium_trybot")
246recipe("run_presubmit")
247recipe("webrtc/auto_roll_webrtc_deps")
248recipe("webrtc/ios")
249recipe("webrtc/ios_api_framework")
250recipe("webrtc/libfuzzer")
251recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100252recipe("webrtc/standalone")
253recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/infra/infra")
254
255# Console definitions:
256
257luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb")
258luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb")
259luci.list_view(name = "cron", title = "Cron")
260luci.console_view(name = "fyi", title = "FYI", repo = WEBRTC_GIT, header = "console-header.textpb")
261luci.list_view(name = "try", title = "Tryserver")
262
263def add_milo(builder, views):
264 """Add Milo console entries for the builder.
265
266 Args:
267 builder: builder name (str).
268 views: dict where keys are names of consoles and values are either a
269 category for the console (str, pipe-separated) or True, which means
270 adding to a list view rather than a console.
271 """
272 for view_name, category in views.items():
273 if category == None:
274 continue
275 elif type(category) == "string":
276 category, _, short_name = category.rpartition("|")
277 luci.console_view_entry(
278 console_view = view_name,
279 builder = builder,
280 category = category or None,
281 short_name = short_name or None,
282 )
283 elif category == True:
284 luci.list_view_entry(
285 list_view = view_name,
286 builder = builder,
287 )
288 else:
289 fail("Unexpected value for category: %r" % category)
290
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200291lkgr_builders = {}
292
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100293# Builder-defining functions:
294
Artem Titarenkof6588b72019-11-14 14:28:11 +0100295def webrtc_builder(
296 name,
297 recipe = "standalone",
298 dimensions = {},
299 priority = 30,
300 execution_timeout = 2 * time.hour,
301 **kwargs):
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100302 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
303
304 return luci.builder(
305 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200306 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100307 dimensions = {k: v for k, v in dimensions.items() if v != None},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100308 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100309 priority = priority,
310 build_numbers = True,
311 swarming_tags = ["vpython:native-python-wrapper"],
312 **kwargs
313 )
314
315def ci_builder(
316 name,
317 ci_cat,
318 perf_cat = None,
319 fyi_cat = None,
320 properties = {},
321 dimensions = {},
322 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100323 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100324 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200325 """Add a post-submit builder.
326
327 Args:
328 name: builder name (str).
329 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
330 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
331 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
332 properties: dict of properties to pass to the recipe (on top of the default ones).
333 dimensions: dict of Swarming dimensions (strings) to search machines by.
334 prioritized: True to make this builder have a higher priority and never batch builds.
335 enabled: False to exclude this builder from consoles and failure notifications.
336 **kwargs: Pass on to webrtc_builder / luci.builder.
337 Returns:
338 A luci.builder.
339
340 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
341 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100342 if prioritized:
343 kwargs["triggering_policy"] = scheduler.greedy_batching(
344 max_batch_size = 1,
345 max_concurrent_invocations = 3,
346 )
347 kwargs["priority"] = 29
348
Oleh Prypinf5432c52019-03-19 15:10:37 +0100349 if enabled:
350 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200351 if ci_cat:
352 lkgr_builders[name] = True
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100353 return webrtc_builder(
354 name = name,
355 properties = merge_dicts({"mastername": "client.webrtc"}, properties),
356 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
357 bucket = "ci",
358 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Oleh Prypinf5432c52019-03-19 15:10:37 +0100359 triggered_by = ["webrtc-gitiles-trigger-master"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100360 repo = WEBRTC_GIT,
Owen Rodley6b721ba2020-05-26 10:04:20 +1000361 notifies = ["ci_notifier", "webrtc_tree_closer"] if enabled and (ci_cat or perf_cat) else None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100362 **kwargs
363 )
364
365def try_builder(
366 name,
367 try_cat = True,
368 fyi_cat = None,
369 properties = {},
370 dimensions = {},
371 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100372 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100373 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200374 """Add a pre-submit builder.
375
376 Args:
377 name: builder name (str).
378 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
379 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
380 properties: dict of properties to pass to the recipe (on top of the default ones).
381 dimensions: dict of Swarming dimensions (strings) to search machines by.
382 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 +0100383 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200384 **kwargs: Pass on to webrtc_builder / luci.builder.
385 Returns:
386 A luci.builder.
387 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100388 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
389 if cq != None:
390 luci.cq_tryjob_verifier(
391 builder = name,
392 cq_group = "cq",
393 **cq
394 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100395 if branch_cq:
396 luci.cq_tryjob_verifier(
397 builder = name,
398 cq_group = "cq_branch",
399 **cq
400 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100401
402 return webrtc_builder(
403 name = name,
404 properties = merge_dicts({"mastername": "tryserver.webrtc"}, properties),
405 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
406 bucket = "try",
407 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
408 **kwargs
409 )
410
411def perf_builder(
412 name,
413 perf_cat,
414 recipe = "standalone",
415 properties = {},
416 dimensions = {},
417 **kwargs):
418 add_milo(name, {"perf": perf_cat})
419 return webrtc_builder(
420 name = name,
421 recipe = recipe,
422 properties = merge_dicts({"mastername": "client.webrtc.perf"}, properties),
423 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
424 bucket = "perf",
425 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
426 # log_base of 1.7 means:
427 # when there are P pending builds, LUCI will batch the first B builds.
428 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
429 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
430 triggering_policy = scheduler.logarithmic_batching(log_base = 17 / 10),
Artem Titarenkof6588b72019-11-14 14:28:11 +0100431 execution_timeout = 3 * time.hour,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100432 **kwargs
433 )
434
Mirko Bonadei12643772020-03-27 13:16:35 +0100435def android_perf_builder(
436 name,
437 perf_cat,
438 recipe = "standalone",
439 properties = {},
440 dimensions = {},
441 **kwargs):
442 return perf_builder(
443 name = name,
444 perf_cat = perf_cat,
445 recipe = recipe,
446 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
447 dimensions = dimensions,
448 **kwargs
449 )
450
451def linux_perf_builder(
452 name,
453 perf_cat,
454 recipe = "standalone",
455 properties = {},
456 dimensions = {},
457 **kwargs):
458 return perf_builder(
459 name = name,
460 perf_cat = perf_cat,
461 recipe = recipe,
462 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
463 dimensions = dimensions,
464 **kwargs
465 )
466
467def mac_perf_builder(
468 name,
469 perf_cat,
470 recipe = "standalone",
471 properties = {},
472 dimensions = {},
473 **kwargs):
474 return perf_builder(
475 name = name,
476 perf_cat = perf_cat,
477 recipe = recipe,
478 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
479 dimensions = dimensions,
480 **kwargs
481 )
482
483def win_perf_builder(
484 name,
485 perf_cat,
486 recipe = "standalone",
487 properties = {},
488 dimensions = {},
489 **kwargs):
490 return perf_builder(
491 name = name,
492 perf_cat = perf_cat,
493 recipe = recipe,
494 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
495 dimensions = dimensions,
496 **kwargs
497 )
498
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100499def cron_builder(name, dimensions = {}, **kwargs):
500 add_milo(name, {"cron": True})
501 return webrtc_builder(
502 name = name,
503 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
504 bucket = "cron",
505 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com",
Oleh Prypin71d17422019-03-28 08:43:16 +0100506 repo = WEBRTC_GIT,
507 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100508 **kwargs
509 )
510
511# Helpers:
512
513def merge_dicts(a, b):
514 """Return the result of merging two dicts.
515
516 If matching values are both dicts or both lists, they will be merged (non-recursively).
517
518 Args:
519 a: first dict.
520 b: second dict (takes priority).
521 Returns:
522 Merged dict.
523 """
524 a = dict(a)
525 for k, bv in b.items():
526 av = a.get(k)
527 if type(av) == "dict" and type(bv) == "dict":
528 a[k] = dict(av)
529 a[k].update(bv)
530 elif type(av) == "list" and type(bv) == "list":
531 a[k] = av + bv
532 else:
533 a[k] = bv
534 return a
535
536def normal_builder_factory(**common_kwargs):
537 def builder(*args, **kwargs):
538 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
539
540 def try_job(*args, **kwargs):
541 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
542
543 return builder, try_job
544
545# Mixins:
546
547linux_builder, linux_try_job = normal_builder_factory(
548 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100549 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100550)
551
552android_builder, android_try_job = normal_builder_factory(
553 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100554 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100555)
556
557win_builder, win_try_job = normal_builder_factory(
558 dimensions = {"os": "Windows"},
Patrik Höglund3916a972019-12-04 13:19:38 +0100559 properties = GOMA_BACKEND_RBE_ATS_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100560)
561
562mac_builder, mac_try_job = normal_builder_factory(
563 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100564 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100565)
566
567ios_builder, ios_try_job = normal_builder_factory(
Patrik Höglundd5dcd0e2020-02-19 21:50:39 +0100568 dimensions = {"os": "Mac-10.14"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100569 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100570 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
571 caches = [swarming.cache("osx_sdk")],
572)
573
574# Some iOS builders don't use goma because they build using
575# `use_xcode_clang=true` which is not supported by goma.
576# https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder
577# https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework
578ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory(
579 dimensions = {"os": "Mac-10.14"},
580 recipe = "ios",
Patrik Höglundb681c162020-02-21 07:34:53 +0100581 properties = {"$depot_tools/osx_sdk": {"sdk_version": "11c29"}},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100582 caches = [swarming.cache("osx_sdk")],
583)
584
585# Actual builder configuration:
586
587android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
588android_try_job("android_compile_arm_dbg", cq = None)
589android_try_job("android_arm_dbg")
590android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
591android_try_job("android_arm_rel")
592android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
593android_try_job("android_compile_arm_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100594android_perf_builder("Perf Android32 (K Nexus5)", "Android|arm|Tester|K Nexus5", triggered_by = ["Android32 Builder arm"])
595android_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 +0100596android_try_job("android_compile_arm64_dbg", cq = None)
597android_try_job("android_arm64_dbg", cq = None)
598android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
599android_try_job("android_arm64_rel")
600android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100601android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
602android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100603android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100604android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
605android_try_job("android_compile_x64_dbg")
606android_try_job("android_compile_x64_rel", cq = None)
607android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
608android_try_job("android_compile_x86_dbg")
609android_builder("Android32 Builder x86", "Android|x86|rel")
610android_try_job("android_compile_x86_rel")
611android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
612android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100613android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100614
615ios_builder("iOS32 Debug", "iOS|arm|dbg")
616ios_try_job("ios_compile_arm_dbg")
617ios_builder("iOS32 Release", "iOS|arm|rel")
618ios_try_job("ios_compile_arm_rel")
619ios_builder("iOS64 Debug", "iOS|arm64|dbg")
620ios_try_job("ios_compile_arm64_dbg")
621ios_builder("iOS64 Release", "iOS|arm64|rel")
622ios_try_job("ios_compile_arm64_rel")
623ios_builder("iOS64 Sim Debug (iOS 10.0)", "iOS|x64|10")
Patrik Höglund17bed672020-02-20 13:31:36 +0000624ios_try_job("ios_sim_x64_dbg_ios10")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100625ios_builder("iOS64 Sim Debug (iOS 11)", "iOS|x64|11")
Patrik Höglund17bed672020-02-20 13:31:36 +0000626ios_try_job("ios_sim_x64_dbg_ios11")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100627ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Patrik Höglund17bed672020-02-20 13:31:36 +0000628ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100629ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
630ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq=None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100631
632linux_builder("Linux32 Debug", "Linux|x86|dbg")
633linux_try_job("linux_x86_dbg")
634linux_builder("Linux32 Release", "Linux|x86|rel")
635linux_try_job("linux_x86_rel")
636linux_builder("Linux64 Debug", "Linux|x64|dbg")
637linux_try_job("linux_dbg", cq = None)
638linux_try_job("linux_compile_dbg")
639linux_builder("Linux64 Release", "Linux|x64|rel")
640linux_try_job("linux_rel")
641linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
642linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100643linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
644linux_perf_builder("Perf Linux Xenial", None, triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100645linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
646linux_try_job("linux_compile_arm_dbg")
647linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
648linux_try_job("linux_compile_arm_rel")
649linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
650linux_try_job("linux_compile_arm64_dbg")
651linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
652linux_try_job("linux_compile_arm64_rel")
653linux_builder("Linux64 Release (GCC)", "Linux|x64|gcc")
654linux_try_job("linux_compile_gcc_rel")
655linux_builder("Linux Asan", "Linux|x64|asan")
656linux_try_job("linux_asan")
657linux_builder("Linux MSan", "Linux|x64|msan")
658linux_try_job("linux_msan")
659linux_builder("Linux Tsan v2", "Linux|x64|tsan")
660linux_try_job("linux_tsan2")
661linux_builder("Linux UBSan", "Linux|x64|ubsan")
662linux_try_job("linux_ubsan")
663linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
664linux_try_job("linux_ubsan_vptr")
665linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
666linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
667linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
668linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100669linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100670linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100671
672mac_builder("Mac64 Debug", "Mac|x64|dbg")
673mac_try_job("mac_dbg", cq = None)
674mac_try_job("mac_compile_dbg")
675mac_builder("Mac64 Release", "Mac|x64|rel")
676mac_try_job("mac_rel")
677mac_try_job("mac_compile_rel", cq = None)
678mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100679mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100680mac_builder("Mac Asan", "Mac|x64|asan")
681mac_try_job("mac_asan")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100682mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100683
684win_builder("Win32 Debug", "Win MSVC|x86|dbg")
685win_try_job("win_x86_msvc_dbg")
686win_try_job("win_compile_x86_msvc_dbg", cq = None)
Oleh Prypin63041b82019-03-19 22:56:01 +0000687win_builder("Win32 Release", "Win MSVC|x86|rel")
688win_try_job("win_x86_msvc_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100689win_try_job("win_compile_x86_msvc_rel", cq = None)
690win_builder("Win64 Debug", "Win MSVC|x64|dbg")
691win_try_job("win_x64_msvc_dbg")
692win_try_job("win_compile_x64_msvc_dbg", cq = None)
693win_builder("Win64 Release", "Win MSVC|x64|rel")
694win_try_job("win_x64_msvc_rel")
695win_try_job("win_compile_x64_msvc_rel", cq = None)
696win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
697win_try_job("win_x86_clang_dbg", cq = None)
698win_try_job("win_compile_x86_clang_dbg")
699win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
700win_try_job("win_x86_clang_rel")
701win_try_job("win_compile_x86_clang_rel", cq = None)
702win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100703win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100704win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
705win_try_job("win_x64_clang_dbg", cq = None)
706win_try_job("win_x64_clang_dbg_win8", cq = None)
707win_try_job("win_x64_clang_dbg_win10", cq = None)
708win_try_job("win_compile_x64_clang_dbg")
709win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
710win_try_job("win_x64_clang_rel", cq = None)
711win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200712win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100713win_try_job("win_asan")
714win_builder("Win64 UWP", ci_cat = None, fyi_cat = "")
715win_try_job("win_x64_uwp", cq = None, try_cat = None, fyi_cat = "")
716win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
717win_try_job("win_x86_more_configs", recipe = "more_configs")
Patrik Höglund39534612019-12-09 14:46:41 +0100718win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Patrik Höglundfe350452019-12-10 11:33:53 +0100719win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100720
721linux_try_job(
722 "presubmit",
723 recipe = "run_presubmit",
724 properties = {"repo_name": "webrtc", "runhooks": True},
725 priority = 28,
726 cq = {"disable_reuse": True},
727)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100728
729cron_builder(
730 "Auto-roll - WebRTC DEPS",
731 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200732 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100733)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200734
735lkgr_config = {
736 "project": "webrtc",
737 "source_url": WEBRTC_GIT,
738 "status_url": "https://webrtc-status.appspot.com",
739 "allowed_lag": 300, # hours
740 "allowed_gap": 12, # commits behind
741 "error_recipients": "webrtc-troopers-robots@google.com",
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200742 "buckets": {
743 "webrtc/ci": {
744 # bucket alias: luci.webrtc.ci
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200745 "builders": sorted(lkgr_builders),
746 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200747 "chromium/webrtc.fyi": {
748 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200749 "builders": [
750 "WebRTC Chromium FYI Android Builder (dbg)",
751 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
752 "WebRTC Chromium FYI Android Builder",
Mirko Bonadei04fe32f2020-05-01 00:45:58 +0200753 "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200754 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
755 "WebRTC Chromium FYI Linux Builder (dbg)",
756 "WebRTC Chromium FYI Linux Builder",
757 "WebRTC Chromium FYI Linux Tester",
758 "WebRTC Chromium FYI Mac Builder (dbg)",
759 "WebRTC Chromium FYI Mac Builder",
760 "WebRTC Chromium FYI Mac Tester",
761 "WebRTC Chromium FYI Win Builder (dbg)",
762 "WebRTC Chromium FYI Win Builder",
763 "WebRTC Chromium FYI Win10 Tester",
764 "WebRTC Chromium FYI Win7 Tester",
765 "WebRTC Chromium FYI Win8 Tester",
766 "WebRTC Chromium FYI ios-device",
Mirko Bonadei37071f62020-02-15 10:42:49 +0100767 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200768 ],
769 },
770 },
771}
772
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100773cron_builder(
774 "WebRTC lkgr finder",
775 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200776 properties = {
777 "project": "webrtc",
778 "repo": WEBRTC_GIT,
779 "ref": "refs/heads/lkgr",
780 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
781 "config": lkgr_config,
782 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100783 schedule = "*/10 * * * *", # Every 10 minutes.
784)