blob: ce2cb73f2b339d4fed3dc267a04082833bc35332 [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
82luci.cq(
83 status_host = "chromium-cq-status.appspot.com",
84 submit_max_burst = 1,
85 submit_burst_delay = 1 * time.minute,
86)
87
88luci.gitiles_poller(
89 name = "webrtc-gitiles-trigger-master",
90 bucket = "ci",
91 repo = WEBRTC_GIT,
92)
93
94# Bucket definitions:
95
96luci.bucket(
97 name = "try",
98 acls = [
99 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
100 "service-account-cq",
101 "project-webrtc-tryjob-access",
102 ]),
103 ],
104)
105
106luci.bucket(
107 name = "ci",
108 acls = [
Oleh Prypinf35939d2019-05-03 20:42:38 +0200109 acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [
110 "project-webrtc-ci-schedulers",
111 ], users = [
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100112 "luci-scheduler@appspot.gserviceaccount.com",
113 ]),
114 ],
115)
116
117luci.bucket(
118 name = "perf",
119 acls = [
120 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
121 "luci-scheduler@appspot.gserviceaccount.com",
122 "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
123 ]),
124 ],
125)
126
127luci.bucket(
128 name = "cron",
129 acls = [
130 acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [
131 "luci-scheduler@appspot.gserviceaccount.com",
132 ]),
133 ],
134)
135
136# Commit queue definitions:
137
138luci.cq_group(
139 name = "cq",
140 tree_status_host = "webrtc-status.appspot.com",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100141 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100142 acls = [
143 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
144 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
145 ],
146 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200147 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100148)
149
150luci.cq_group(
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100151 name = "cq_branch",
152 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])],
153 acls = [
154 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]),
155 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
156 ],
157 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200158 cancel_stale_tryjobs = True,
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100159)
160
161luci.cq_group(
162 name = "cq_infra",
163 watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100164 acls = [
165 acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]),
166 acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]),
167 ],
168 retry_config = cq.RETRY_ALL_FAILURES,
Oleh Prypin5416f2d2019-08-02 09:43:15 +0200169 cancel_stale_tryjobs = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100170)
171
172luci.cq_tryjob_verifier(
173 builder = "presubmit",
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100174 cq_group = "cq_infra",
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100175)
176
Oleh Prypine56cd9b2019-05-29 21:14:31 +0200177luci.cq_tryjob_verifier(
178 builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite",
179 owner_whitelist = ["project-webrtc-internal-tryjob-access"],
180 cq_group = "cq",
181)
182
Oleh Prypin71d17422019-03-28 08:43:16 +0100183# Notifier definitions:
184
185luci.notifier(
186 name = "ci_notifier",
187 on_failure = True,
188 notify_emails = ["webrtc-sheriffs-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200189 template = luci.notifier_template(
190 name = "ci",
191 body = io.read_file("luci-notify/email-templates/ci.template"),
192 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100193)
194
195luci.notifier(
196 name = "cron_notifier",
197 on_failure = True,
198 notify_emails = ["webrtc-troopers-robots@google.com"],
Oleh Prypin705b6a62019-04-03 23:10:51 +0200199 template = luci.notifier_template(
200 name = "cron",
201 body = io.read_file("luci-notify/email-templates/cron.template"),
202 ),
Oleh Prypin71d17422019-03-28 08:43:16 +0100203)
204
Owen Rodley6b721ba2020-05-26 10:04:20 +1000205# Tree closer definitions:
206
207luci.tree_closer(
208 name = "webrtc_tree_closer",
209 tree_status_host = "webrtc-status.appspot.com",
210 template = luci.notifier_template(
211 name = "status",
212 body = io.read_file("luci-notify/email-templates/status.template"),
213 ),
214 # TODO: These step filters are copied verbatim from Gatekeeper, for testing
215 # that LUCI-Notify would take the exact same actions. Once we've switched
216 # over, this should be updated - several of these steps don't exist in
217 # WebRTC recipes.
218 failed_step_regexp = [
219 "bot_update",
220 "compile",
221 "gclient runhooks",
222 "runhooks",
223 "update",
224 "extract build",
225 "cleanup_temp",
226 "taskkill",
227 "compile",
228 "gn",
229 ],
230 failed_step_regexp_exclude = ".*\\(experimental\\).*",
231)
232
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100233# Recipe definitions:
234
235def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"):
236 return luci.recipe(
237 name = recipe.split("/")[-1],
238 cipd_package = pkg,
239 cipd_version = "refs/heads/master",
240 recipe = recipe,
241 )
242
243recipe("chromium_trybot")
244recipe("run_presubmit")
245recipe("webrtc/auto_roll_webrtc_deps")
246recipe("webrtc/ios")
247recipe("webrtc/ios_api_framework")
248recipe("webrtc/libfuzzer")
249recipe("webrtc/more_configs")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100250recipe("webrtc/standalone")
251recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/infra/infra")
252
253# Console definitions:
254
255luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb")
256luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb")
257luci.list_view(name = "cron", title = "Cron")
258luci.console_view(name = "fyi", title = "FYI", repo = WEBRTC_GIT, header = "console-header.textpb")
259luci.list_view(name = "try", title = "Tryserver")
260
261def add_milo(builder, views):
262 """Add Milo console entries for the builder.
263
264 Args:
265 builder: builder name (str).
266 views: dict where keys are names of consoles and values are either a
267 category for the console (str, pipe-separated) or True, which means
268 adding to a list view rather than a console.
269 """
270 for view_name, category in views.items():
271 if category == None:
272 continue
273 elif type(category) == "string":
274 category, _, short_name = category.rpartition("|")
275 luci.console_view_entry(
276 console_view = view_name,
277 builder = builder,
278 category = category or None,
279 short_name = short_name or None,
280 )
281 elif category == True:
282 luci.list_view_entry(
283 list_view = view_name,
284 builder = builder,
285 )
286 else:
287 fail("Unexpected value for category: %r" % category)
288
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200289lkgr_builders = {}
290
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100291# Builder-defining functions:
292
Artem Titarenkof6588b72019-11-14 14:28:11 +0100293def webrtc_builder(
294 name,
295 recipe = "standalone",
296 dimensions = {},
297 priority = 30,
298 execution_timeout = 2 * time.hour,
299 **kwargs):
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100300 dimensions = merge_dicts({"cpu": "x86-64"}, dimensions)
301
302 return luci.builder(
303 name = name,
Oleh Prypin705b6a62019-04-03 23:10:51 +0200304 executable = recipe,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100305 dimensions = {k: v for k, v in dimensions.items() if v != None},
Artem Titarenkof6588b72019-11-14 14:28:11 +0100306 execution_timeout = execution_timeout,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100307 priority = priority,
308 build_numbers = True,
309 swarming_tags = ["vpython:native-python-wrapper"],
310 **kwargs
311 )
312
313def ci_builder(
314 name,
315 ci_cat,
316 perf_cat = None,
317 fyi_cat = None,
318 properties = {},
319 dimensions = {},
320 prioritized = False,
Oleh Prypinf5432c52019-03-19 15:10:37 +0100321 enabled = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100322 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200323 """Add a post-submit builder.
324
325 Args:
326 name: builder name (str).
327 ci_cat: the category + name for the /ci/ console, or None to omit from the console.
328 perf_cat: the category + name for the /perf/ console, or None to omit from the console.
329 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
330 properties: dict of properties to pass to the recipe (on top of the default ones).
331 dimensions: dict of Swarming dimensions (strings) to search machines by.
332 prioritized: True to make this builder have a higher priority and never batch builds.
333 enabled: False to exclude this builder from consoles and failure notifications.
334 **kwargs: Pass on to webrtc_builder / luci.builder.
335 Returns:
336 A luci.builder.
337
338 Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles.
339 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100340 if prioritized:
341 kwargs["triggering_policy"] = scheduler.greedy_batching(
342 max_batch_size = 1,
343 max_concurrent_invocations = 3,
344 )
345 kwargs["priority"] = 29
346
Oleh Prypinf5432c52019-03-19 15:10:37 +0100347 if enabled:
348 add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat})
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200349 if ci_cat:
350 lkgr_builders[name] = True
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100351 return webrtc_builder(
352 name = name,
353 properties = merge_dicts({"mastername": "client.webrtc"}, properties),
354 dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions),
355 bucket = "ci",
356 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
Oleh Prypinf5432c52019-03-19 15:10:37 +0100357 triggered_by = ["webrtc-gitiles-trigger-master"] if enabled else None,
Oleh Prypin71d17422019-03-28 08:43:16 +0100358 repo = WEBRTC_GIT,
Owen Rodley6b721ba2020-05-26 10:04:20 +1000359 notifies = ["ci_notifier", "webrtc_tree_closer"] if enabled and (ci_cat or perf_cat) else None,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100360 **kwargs
361 )
362
363def try_builder(
364 name,
365 try_cat = True,
366 fyi_cat = None,
367 properties = {},
368 dimensions = {},
369 cq = {},
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100370 branch_cq = True,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100371 **kwargs):
Oleh Prypine5677672019-04-25 12:21:35 +0200372 """Add a pre-submit builder.
373
374 Args:
375 name: builder name (str).
376 try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`.
377 fyi_cat: the category + name for the /fyi/ console, or None to omit from the console.
378 properties: dict of properties to pass to the recipe (on top of the default ones).
379 dimensions: dict of Swarming dimensions (strings) to search machines by.
380 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 +0100381 branch_cq: False to exclude this builder just from the release-branch CQ.
Oleh Prypine5677672019-04-25 12:21:35 +0200382 **kwargs: Pass on to webrtc_builder / luci.builder.
383 Returns:
384 A luci.builder.
385 """
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100386 add_milo(name, {"try": try_cat, "fyi": fyi_cat})
387 if cq != None:
388 luci.cq_tryjob_verifier(
389 builder = name,
390 cq_group = "cq",
391 **cq
392 )
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100393 if branch_cq:
394 luci.cq_tryjob_verifier(
395 builder = name,
396 cq_group = "cq_branch",
397 **cq
398 )
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100399
400 return webrtc_builder(
401 name = name,
402 properties = merge_dicts({"mastername": "tryserver.webrtc"}, properties),
403 dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions),
404 bucket = "try",
405 service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com",
406 **kwargs
407 )
408
409def perf_builder(
410 name,
411 perf_cat,
412 recipe = "standalone",
413 properties = {},
414 dimensions = {},
415 **kwargs):
416 add_milo(name, {"perf": perf_cat})
417 return webrtc_builder(
418 name = name,
419 recipe = recipe,
420 properties = merge_dicts({"mastername": "client.webrtc.perf"}, properties),
421 dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions),
422 bucket = "perf",
423 service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com",
424 # log_base of 1.7 means:
425 # when there are P pending builds, LUCI will batch the first B builds.
426 # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
427 # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ...
428 triggering_policy = scheduler.logarithmic_batching(log_base = 17 / 10),
Artem Titarenkof6588b72019-11-14 14:28:11 +0100429 execution_timeout = 3 * time.hour,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100430 **kwargs
431 )
432
Mirko Bonadei12643772020-03-27 13:16:35 +0100433def android_perf_builder(
434 name,
435 perf_cat,
436 recipe = "standalone",
437 properties = {},
438 dimensions = {},
439 **kwargs):
440 return perf_builder(
441 name = name,
442 perf_cat = perf_cat,
443 recipe = recipe,
444 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
445 dimensions = dimensions,
446 **kwargs
447 )
448
449def linux_perf_builder(
450 name,
451 perf_cat,
452 recipe = "standalone",
453 properties = {},
454 dimensions = {},
455 **kwargs):
456 return perf_builder(
457 name = name,
458 perf_cat = perf_cat,
459 recipe = recipe,
460 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
461 dimensions = dimensions,
462 **kwargs
463 )
464
465def mac_perf_builder(
466 name,
467 perf_cat,
468 recipe = "standalone",
469 properties = {},
470 dimensions = {},
471 **kwargs):
472 return perf_builder(
473 name = name,
474 perf_cat = perf_cat,
475 recipe = recipe,
476 properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties),
477 dimensions = dimensions,
478 **kwargs
479 )
480
481def win_perf_builder(
482 name,
483 perf_cat,
484 recipe = "standalone",
485 properties = {},
486 dimensions = {},
487 **kwargs):
488 return perf_builder(
489 name = name,
490 perf_cat = perf_cat,
491 recipe = recipe,
492 properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties),
493 dimensions = dimensions,
494 **kwargs
495 )
496
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100497def cron_builder(name, dimensions = {}, **kwargs):
498 add_milo(name, {"cron": True})
499 return webrtc_builder(
500 name = name,
501 dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions),
502 bucket = "cron",
503 service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com",
Oleh Prypin71d17422019-03-28 08:43:16 +0100504 repo = WEBRTC_GIT,
505 notifies = ["cron_notifier"],
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100506 **kwargs
507 )
508
509# Helpers:
510
511def merge_dicts(a, b):
512 """Return the result of merging two dicts.
513
514 If matching values are both dicts or both lists, they will be merged (non-recursively).
515
516 Args:
517 a: first dict.
518 b: second dict (takes priority).
519 Returns:
520 Merged dict.
521 """
522 a = dict(a)
523 for k, bv in b.items():
524 av = a.get(k)
525 if type(av) == "dict" and type(bv) == "dict":
526 a[k] = dict(av)
527 a[k].update(bv)
528 elif type(av) == "list" and type(bv) == "list":
529 a[k] = av + bv
530 else:
531 a[k] = bv
532 return a
533
534def normal_builder_factory(**common_kwargs):
535 def builder(*args, **kwargs):
536 return ci_builder(*args, **merge_dicts(common_kwargs, kwargs))
537
538 def try_job(*args, **kwargs):
539 return try_builder(*args, **merge_dicts(common_kwargs, kwargs))
540
541 return builder, try_job
542
543# Mixins:
544
545linux_builder, linux_try_job = normal_builder_factory(
546 dimensions = {"os": "Linux", "inside_docker": "0"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100547 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100548)
549
550android_builder, android_try_job = normal_builder_factory(
551 dimensions = {"os": "Linux"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100552 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100553)
554
555win_builder, win_try_job = normal_builder_factory(
556 dimensions = {"os": "Windows"},
Patrik Höglund3916a972019-12-04 13:19:38 +0100557 properties = GOMA_BACKEND_RBE_ATS_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100558)
559
560mac_builder, mac_try_job = normal_builder_factory(
561 dimensions = {"os": "Mac"},
Mirko Bonadei32ca4862020-03-11 10:39:45 +0100562 properties = GOMA_BACKEND_WEBRTC_RBE_PROD,
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100563)
564
565ios_builder, ios_try_job = normal_builder_factory(
Patrik Höglundd5dcd0e2020-02-19 21:50:39 +0100566 dimensions = {"os": "Mac-10.14"},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100567 recipe = "ios",
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100568 properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD,
569 caches = [swarming.cache("osx_sdk")],
570)
571
572# Some iOS builders don't use goma because they build using
573# `use_xcode_clang=true` which is not supported by goma.
574# https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder
575# https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework
576ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory(
577 dimensions = {"os": "Mac-10.14"},
578 recipe = "ios",
Patrik Höglundb681c162020-02-21 07:34:53 +0100579 properties = {"$depot_tools/osx_sdk": {"sdk_version": "11c29"}},
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100580 caches = [swarming.cache("osx_sdk")],
581)
582
583# Actual builder configuration:
584
585android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg")
586android_try_job("android_compile_arm_dbg", cq = None)
587android_try_job("android_arm_dbg")
588android_builder("Android32 (M Nexus5X)", "Android|arm|rel")
589android_try_job("android_arm_rel")
590android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True)
591android_try_job("android_compile_arm_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100592android_perf_builder("Perf Android32 (K Nexus5)", "Android|arm|Tester|K Nexus5", triggered_by = ["Android32 Builder arm"])
593android_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 +0100594android_try_job("android_compile_arm64_dbg", cq = None)
595android_try_job("android_arm64_dbg", cq = None)
596android_builder("Android64 (M Nexus5X)", "Android|arm64|rel")
597android_try_job("android_arm64_rel")
598android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True)
Mirko Bonadei12643772020-03-27 13:16:35 +0100599android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"])
600android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100601android_try_job("android_compile_arm64_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100602android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg")
603android_try_job("android_compile_x64_dbg")
604android_try_job("android_compile_x64_rel", cq = None)
605android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg")
606android_try_job("android_compile_x86_dbg")
607android_builder("Android32 Builder x86", "Android|x86|rel")
608android_try_job("android_compile_x86_rel")
609android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs")
610android_try_job("android_arm_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100611android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100612
613ios_builder("iOS32 Debug", "iOS|arm|dbg")
614ios_try_job("ios_compile_arm_dbg")
615ios_builder("iOS32 Release", "iOS|arm|rel")
616ios_try_job("ios_compile_arm_rel")
617ios_builder("iOS64 Debug", "iOS|arm64|dbg")
618ios_try_job("ios_compile_arm64_dbg")
619ios_builder("iOS64 Release", "iOS|arm64|rel")
620ios_try_job("ios_compile_arm64_rel")
621ios_builder("iOS64 Sim Debug (iOS 10.0)", "iOS|x64|10")
Patrik Höglund17bed672020-02-20 13:31:36 +0000622ios_try_job("ios_sim_x64_dbg_ios10")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100623ios_builder("iOS64 Sim Debug (iOS 11)", "iOS|x64|11")
Patrik Höglund17bed672020-02-20 13:31:36 +0000624ios_try_job("ios_sim_x64_dbg_ios11")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100625ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12")
Patrik Höglund17bed672020-02-20 13:31:36 +0000626ios_try_job("ios_sim_x64_dbg_ios12")
Mirko Bonadei84360ca2020-03-12 08:35:48 +0100627ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True)
628ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq=None)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100629
630linux_builder("Linux32 Debug", "Linux|x86|dbg")
631linux_try_job("linux_x86_dbg")
632linux_builder("Linux32 Release", "Linux|x86|rel")
633linux_try_job("linux_x86_rel")
634linux_builder("Linux64 Debug", "Linux|x64|dbg")
635linux_try_job("linux_dbg", cq = None)
636linux_try_job("linux_compile_dbg")
637linux_builder("Linux64 Release", "Linux|x64|rel")
638linux_try_job("linux_rel")
639linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True)
640linux_try_job("linux_compile_rel")
Mirko Bonadei12643772020-03-27 13:16:35 +0100641linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"])
642linux_perf_builder("Perf Linux Xenial", None, triggered_by = ["Linux64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100643linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg")
644linux_try_job("linux_compile_arm_dbg")
645linux_builder("Linux32 Release (ARM)", "Linux|arm|rel")
646linux_try_job("linux_compile_arm_rel")
647linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg")
648linux_try_job("linux_compile_arm64_dbg")
649linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel")
650linux_try_job("linux_compile_arm64_rel")
651linux_builder("Linux64 Release (GCC)", "Linux|x64|gcc")
652linux_try_job("linux_compile_gcc_rel")
653linux_builder("Linux Asan", "Linux|x64|asan")
654linux_try_job("linux_asan")
655linux_builder("Linux MSan", "Linux|x64|msan")
656linux_try_job("linux_msan")
657linux_builder("Linux Tsan v2", "Linux|x64|tsan")
658linux_try_job("linux_tsan2")
659linux_builder("Linux UBSan", "Linux|x64|ubsan")
660linux_try_job("linux_ubsan")
661linux_builder("Linux UBSan vptr", "Linux|x64|ubsan")
662linux_try_job("linux_ubsan_vptr")
663linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer")
664linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer")
665linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs")
666linux_try_job("linux_more_configs", recipe = "more_configs")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100667linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Mirko Bonadei40de50f2019-11-07 11:23:47 +0100668linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100669
670mac_builder("Mac64 Debug", "Mac|x64|dbg")
671mac_try_job("mac_dbg", cq = None)
672mac_try_job("mac_compile_dbg")
673mac_builder("Mac64 Release", "Mac|x64|rel")
674mac_try_job("mac_rel")
675mac_try_job("mac_compile_rel", cq = None)
676mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100677mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100678mac_builder("Mac Asan", "Mac|x64|asan")
679mac_try_job("mac_asan")
Oleh Prypin7d1cabe2019-03-14 15:10:30 +0100680mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100681
682win_builder("Win32 Debug", "Win MSVC|x86|dbg")
683win_try_job("win_x86_msvc_dbg")
684win_try_job("win_compile_x86_msvc_dbg", cq = None)
Oleh Prypin63041b82019-03-19 22:56:01 +0000685win_builder("Win32 Release", "Win MSVC|x86|rel")
686win_try_job("win_x86_msvc_rel")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100687win_try_job("win_compile_x86_msvc_rel", cq = None)
688win_builder("Win64 Debug", "Win MSVC|x64|dbg")
689win_try_job("win_x64_msvc_dbg")
690win_try_job("win_compile_x64_msvc_dbg", cq = None)
691win_builder("Win64 Release", "Win MSVC|x64|rel")
692win_try_job("win_x64_msvc_rel")
693win_try_job("win_compile_x64_msvc_rel", cq = None)
694win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg")
695win_try_job("win_x86_clang_dbg", cq = None)
696win_try_job("win_compile_x86_clang_dbg")
697win_builder("Win32 Release (Clang)", "Win Clang|x86|rel")
698win_try_job("win_x86_clang_rel")
699win_try_job("win_compile_x86_clang_rel", cq = None)
700win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|")
Mirko Bonadei12643772020-03-27 13:16:35 +0100701win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"])
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100702win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg")
703win_try_job("win_x64_clang_dbg", cq = None)
704win_try_job("win_x64_clang_dbg_win8", cq = None)
705win_try_job("win_x64_clang_dbg_win10", cq = None)
706win_try_job("win_compile_x64_clang_dbg")
707win_builder("Win64 Release (Clang)", "Win Clang|x64|rel")
708win_try_job("win_x64_clang_rel", cq = None)
709win_try_job("win_compile_x64_clang_rel")
Mirko Bonadeiafbe33d2019-05-31 09:27:54 +0200710win_builder("Win64 ASan", "Win Clang|x64|asan")
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100711win_try_job("win_asan")
712win_builder("Win64 UWP", ci_cat = None, fyi_cat = "")
713win_try_job("win_x64_uwp", cq = None, try_cat = None, fyi_cat = "")
714win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs")
715win_try_job("win_x86_more_configs", recipe = "more_configs")
Patrik Höglund39534612019-12-09 14:46:41 +0100716win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False)
Patrik Höglundfe350452019-12-10 11:33:53 +0100717win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100718
719linux_try_job(
720 "presubmit",
721 recipe = "run_presubmit",
722 properties = {"repo_name": "webrtc", "runhooks": True},
723 priority = 28,
724 cq = {"disable_reuse": True},
725)
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100726
727cron_builder(
728 "Auto-roll - WebRTC DEPS",
729 recipe = "auto_roll_webrtc_deps",
Oleh Prypindc68a722019-06-25 10:43:13 +0200730 schedule = "0 */2 * * *", # Every 2 hours.
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100731)
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200732
733lkgr_config = {
734 "project": "webrtc",
735 "source_url": WEBRTC_GIT,
736 "status_url": "https://webrtc-status.appspot.com",
737 "allowed_lag": 300, # hours
738 "allowed_gap": 12, # commits behind
739 "error_recipients": "webrtc-troopers-robots@google.com",
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200740 "buckets": {
741 "webrtc/ci": {
742 # bucket alias: luci.webrtc.ci
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200743 "builders": sorted(lkgr_builders),
744 },
Michael Achenbach09dd7dc2019-07-26 15:26:11 +0200745 "chromium/webrtc.fyi": {
746 # bucket alias: luci.chromium.webrtc.fyi
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200747 "builders": [
748 "WebRTC Chromium FYI Android Builder (dbg)",
749 "WebRTC Chromium FYI Android Builder ARM64 (dbg)",
750 "WebRTC Chromium FYI Android Builder",
Mirko Bonadei04fe32f2020-05-01 00:45:58 +0200751 "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200752 "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)",
753 "WebRTC Chromium FYI Linux Builder (dbg)",
754 "WebRTC Chromium FYI Linux Builder",
755 "WebRTC Chromium FYI Linux Tester",
756 "WebRTC Chromium FYI Mac Builder (dbg)",
757 "WebRTC Chromium FYI Mac Builder",
758 "WebRTC Chromium FYI Mac Tester",
759 "WebRTC Chromium FYI Win Builder (dbg)",
760 "WebRTC Chromium FYI Win Builder",
761 "WebRTC Chromium FYI Win10 Tester",
762 "WebRTC Chromium FYI Win7 Tester",
763 "WebRTC Chromium FYI Win8 Tester",
764 "WebRTC Chromium FYI ios-device",
Mirko Bonadei37071f62020-02-15 10:42:49 +0100765 "WebRTC Chromium FYI ios-simulator",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200766 ],
767 },
768 },
769}
770
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100771cron_builder(
772 "WebRTC lkgr finder",
773 recipe = "lkgr_finder",
Oleh Prypin8f0dc312019-05-31 15:54:35 +0200774 properties = {
775 "project": "webrtc",
776 "repo": WEBRTC_GIT,
777 "ref": "refs/heads/lkgr",
778 "lkgr_status_gs_path": "chromium-webrtc/lkgr-status",
779 "config": lkgr_config,
780 },
Oleh Prypin1a0593f2019-03-11 09:43:28 +0100781 schedule = "*/10 * * * *", # Every 10 minutes.
782)