blob: 35e29c7ea3029832ce33629414f8a89c68fcaeaf [file] [log] [blame]
Rico Windf57799f2021-07-08 15:45:45 +02001#!/usr/bin/env lucicfg
2
Vadim Shtayura50d64382022-02-10 12:57:37 -08003lucicfg.check_version("1.30.9", "Please use newer `lucicfg` binary")
Andrii Shyshkalov55dfdde2021-09-27 09:30:31 +02004
Vadim Shtayura50d64382022-02-10 12:57:37 -08005# Use LUCI Scheduler BBv2 names and add Scheduler realms configs.
6lucicfg.enable_experiment("crbug.com/1182002")
7
Rico Windcbe8bc82021-10-27 12:53:32 +02008luci.builder.defaults.experiments.set({
Rico Windcbe8bc82021-10-27 12:53:32 +02009 "luci.recipes.use_python3": 100
10})
Andrii Shyshkalov55dfdde2021-09-27 09:30:31 +020011
12
Rico Windf57799f2021-07-08 15:45:45 +020013luci.project(
14 name = "r8",
15 buildbucket = "cr-buildbucket.appspot.com",
16 logdog = "luci-logdog.appspot.com",
17 milo = "luci-milo.appspot.com",
18 notify = "luci-notify.appspot.com",
19 scheduler = "luci-scheduler.appspot.com",
20 swarming = "chrome-swarming.appspot.com",
21 acls = [
22 acl.entry(
23 [
24 acl.BUILDBUCKET_READER,
25 acl.LOGDOG_READER,
26 acl.PROJECT_CONFIGS_READER,
27 acl.SCHEDULER_READER,
28 ],
29 groups = ["all"],
30 ),
31 acl.entry(
32 [
33 acl.BUILDBUCKET_TRIGGERER,
Rico Wind4fb57482021-09-27 18:28:27 +020034 acl.SCHEDULER_OWNER,
35
Rico Windf57799f2021-07-08 15:45:45 +020036 ],
37 groups = [
Rico Windf57799f2021-07-08 15:45:45 +020038 "project-r8-committers"
Rico Wind18d5b6f2021-07-09 09:56:57 +020039 ],
40 users = [
41 "luci-scheduler@appspot.gserviceaccount.com"
42 ]
Rico Windf57799f2021-07-08 15:45:45 +020043 ),
Rico Wind7256e952021-09-27 19:45:52 +020044 acl.entry(
45 [
46 acl.LOGDOG_WRITER,
47 ],
48 groups = [
49 "luci-logdog-r8-writers"
50 ],
51 ),
Andrii Shyshkalov55dfdde2021-09-27 09:30:31 +020052 ],
53 bindings = [
54 luci.binding(
55 roles = "role/swarming.poolOwner",
56 groups = "mdb/r8-team",
57 ),
58 luci.binding(
59 roles = "role/swarming.poolViewer",
60 groups = "googlers",
61 ),
62 ],
63)
64
Rico Wind7256e952021-09-27 19:45:52 +020065luci.logdog(gs_bucket = "logdog-r8-archive")
66
67
Andrii Shyshkalov55dfdde2021-09-27 09:30:31 +020068# Allow the given users to use LUCI `led` tool and "Debug" button
69# inside the given bucket & pool security realms.
70def led_users(*, pool_realm, builder_realm, groups):
71 luci.realm(
72 name = pool_realm,
73 bindings = [
74 luci.binding(
75 roles = "role/swarming.poolUser",
76 groups = groups,
77 ),
78 ],
79 )
80 luci.binding(
81 realm = builder_realm,
82 roles = "role/swarming.taskTriggerer",
83 groups = groups,
84 )
85led_users(
86 pool_realm="pools/ci",
87 builder_realm="ci",
88 groups=[
89 "mdb/r8-team",
90 "mdb/chrome-troopers",
91 ],
Rico Windf57799f2021-07-08 15:45:45 +020092)
93
94luci.bucket(name = "ci")
95
96luci.milo()
97
98luci.notifier(
99 name = "r8-failures",
100 on_failure = True,
101 on_new_failure = True,
102 notify_blamelist = True
103)
104
105luci.gitiles_poller(
106 name = "main-gitiles-trigger",
107 bucket = "ci",
108 repo = "https://r8.googlesource.com/r8"
109)
110
111luci.gitiles_poller(
Søren Gjessec00ff972023-11-20 16:03:55 +0100112 name = "branch-gitiles-8.3-forward",
113 bucket = "ci",
114 repo = "https://r8.googlesource.com/r8",
115 refs = ["refs/heads/([8]\\.[3-9]+(\\.[0-9]+)?|[9]\\.[0-9]+(\\.[0-9]+)?)"],
116 path_regexps = ["src/main/java/com/android/tools/r8/Version.java"]
117)
118
119luci.gitiles_poller(
Søren Gjessebc9edbb2023-03-07 10:35:01 +0100120 name = "branch-gitiles-8.1-forward",
121 bucket = "ci",
122 repo = "https://r8.googlesource.com/r8",
123 refs = ["refs/heads/([8]\\.[1-9]+(\\.[0-9]+)?|[9]\\.[0-9]+(\\.[0-9]+)?)"],
124 path_regexps = ["src/main/java/com/android/tools/r8/Version.java"]
125)
126
127luci.gitiles_poller(
Rico Wind49fc6512022-02-09 11:45:15 +0100128 name = "branch-gitiles-3.3-forward",
129 bucket = "ci",
130 repo = "https://r8.googlesource.com/r8",
Rico Wind8709be02022-02-22 12:45:27 +0100131 refs = ["refs/heads/([3]\\.[3-9]+(\\.[0-9]+)?|[4-9]\\.[0-9]+(\\.[0-9]+)?)"],
Rico Wind49fc6512022-02-09 11:45:15 +0100132 path_regexps = ["src/main/java/com/android/tools/r8/Version.java"]
133)
134
135luci.gitiles_poller(
136 name = "branch-gitiles-3.2-forward",
137 bucket = "ci",
138 repo = "https://r8.googlesource.com/r8",
Rico Wind8709be02022-02-22 12:45:27 +0100139 refs = ["refs/heads/([3]\\.[2-9]+(\\.[0-9]+)?|[4-9]\\.[0-9]+(\\.[0-9]+)?)"],
Rico Wind49fc6512022-02-09 11:45:15 +0100140 path_regexps = ["src/main/java/com/android/tools/r8/Version.java"]
141)
142
143luci.gitiles_poller(
Rico Windf57799f2021-07-08 15:45:45 +0200144 name = "branch-gitiles-trigger",
145 bucket = "ci",
146 repo = "https://r8.googlesource.com/r8",
Rico Windc9c90e62022-02-09 12:07:47 +0100147 refs = ["refs/heads/[0-9]+\\.[0-9]+(\\.[0-9]+)?"],
Rico Windf57799f2021-07-08 15:45:45 +0200148 path_regexps = ["src/main/java/com/android/tools/r8/Version.java"]
149)
150
151luci.console_view(
152 name = "main",
153 title = "R8 Main Console",
154 repo = "https://r8.googlesource.com/r8",
Rico Wind49a6bfe2021-09-27 18:20:38 +0200155 refs = ["refs/heads/.*"]
Rico Windf57799f2021-07-08 15:45:45 +0200156)
157
Rico Wind96a4bc32021-09-28 13:28:08 +0200158view_builders = []
159
Rico Windf57799f2021-07-08 15:45:45 +0200160def builder_view(name, category, short_name):
Rico Wind96a4bc32021-09-28 13:28:08 +0200161 view_builders.append((name, category, short_name))
Rico Windf57799f2021-07-08 15:45:45 +0200162
163luci.recipe(
164 name="rex",
165 cipd_package = "infra_internal/recipe_bundles/" +
166 "chrome-internal.googlesource.com/chrome/" +
Rico Wind127c2312021-12-09 07:31:56 +0100167 "tools/build_limited/scripts/slave",
168 cipd_version = "refs/heads/master",
169 use_bbagent = True
Rico Windf57799f2021-07-08 15:45:45 +0200170)
171
172common_test_options = [
173 "--tool=r8",
174 "--no_internal",
175 "--one_line_per_test",
176 "--archive_failures"
177]
178
Rico Wind093b16e2023-09-25 12:32:01 +0200179def get_dimensions(windows=False, internal=False, archive=False):
180 # We use the following setup:
181 # windows -> always windows machine
182 # internal -> always internal, single small, machine
183 # archie -> archive or normal machines (normal machines set archive)
184 # all_other -> normal linux machines
Rico Windf57799f2021-07-08 15:45:45 +0200185 dimensions = {
Rico Windf57799f2021-07-08 15:45:45 +0200186 "cpu" : "x86-64",
187 "pool" : "luci.r8.ci"
188 }
189 if windows:
Rico Winde6413102021-09-28 10:54:23 +0200190 dimensions["os"] = "Windows-10"
Rico Windf57799f2021-07-08 15:45:45 +0200191 else:
Rico Wind3244aac2023-03-27 13:49:17 +0200192 dimensions["os"] = "Ubuntu-20.04"
Rico Windf57799f2021-07-08 15:45:45 +0200193 if internal:
194 dimensions["internal"] = "true"
Rico Wind093b16e2023-09-25 12:32:01 +0200195 elif archive:
196 dimensions["archive"] = "true"
197 else:
Rico Wind18d5b6f2021-07-09 09:56:57 +0200198 dimensions["normal"] = "true"
Rico Windf57799f2021-07-08 15:45:45 +0200199 return dimensions
200
Rico Windf340a0e2021-09-29 13:58:45 +0200201def r8_builder(name, priority=26, trigger=True, category=None,
Rico Wind61eb6472023-08-17 13:21:49 +0200202 triggering_policy=None, release_trigger=None,
203 max_concurrent_invocations=1, **kwargs):
Rico Wind18d5b6f2021-07-09 09:56:57 +0200204 release = name.endswith("release")
Rico Wind49fc6512022-02-09 11:45:15 +0100205 triggered = None
206 if trigger:
207 if release:
208 triggered = release_trigger if release_trigger else ["branch-gitiles-trigger"]
209 else:
210 triggered = ["main-gitiles-trigger"]
Rico Windf340a0e2021-09-29 13:58:45 +0200211 triggering_policy = triggering_policy or scheduler.policy(
212 kind = scheduler.GREEDY_BATCHING_KIND,
Rico Windd2c333f2021-12-20 18:06:18 +0100213 max_batch_size = 1 if release else None,
Rico Wind61eb6472023-08-17 13:21:49 +0200214 max_concurrent_invocations = max_concurrent_invocations)
Rico Wind18d5b6f2021-07-09 09:56:57 +0200215
216 luci.builder(
217 name = name,
218 bucket = "ci",
219 service_account = "r8-ci-builder@chops-service-accounts." +
220 "iam.gserviceaccount.com",
221 build_numbers = True,
222 swarming_tags = ["vpython:native-python-wrapper"],
Rico Wind978650b2021-08-10 09:46:12 +0200223 notifies = ["r8-failures"] if trigger else None,
Rico Wind18d5b6f2021-07-09 09:56:57 +0200224 priority = priority,
225 triggered_by = triggered,
Rico Windf340a0e2021-09-29 13:58:45 +0200226 triggering_policy = triggering_policy,
Rico Wind18d5b6f2021-07-09 09:56:57 +0200227 executable = "rex",
228 **kwargs
229 )
Rico Wind96a4bc32021-09-28 13:28:08 +0200230 category = category if category else "R8"
231 category = "Release|" + category if release else category
Rico Windea3a4122021-09-28 09:28:10 +0200232 builder_view(name, category, name.split("-")[-1].replace("_release", ""))
Rico Wind18d5b6f2021-07-09 09:56:57 +0200233
Rico Windf57799f2021-07-08 15:45:45 +0200234def r8_tester(name,
235 test_options,
Rico Wind5aa510c2021-07-09 11:10:40 +0200236 dimensions = None,
237 execution_timeout = time.hour * 6,
Rico Wind2839ad52021-09-28 08:57:57 +0200238 expiration_timeout = time.hour * 35,
Rico Wind61eb6472023-08-17 13:21:49 +0200239 max_concurrent_invocations = 1,
Rico Wind49fc6512022-02-09 11:45:15 +0100240 category=None,
241 release_trigger=None):
Rico Wind093b16e2023-09-25 12:32:01 +0200242 dimensions = dimensions if dimensions else get_dimensions()
Rico Wind18d5b6f2021-07-09 09:56:57 +0200243 for name in [name, name + "_release"]:
244 r8_builder(
245 name = name,
Rico Wind2839ad52021-09-28 08:57:57 +0200246 category = category,
Rico Wind978650b2021-08-10 09:46:12 +0200247 execution_timeout = execution_timeout,
248 expiration_timeout = expiration_timeout,
Rico Wind18d5b6f2021-07-09 09:56:57 +0200249 dimensions = dimensions,
Rico Wind49fc6512022-02-09 11:45:15 +0100250 release_trigger=release_trigger,
Rico Wind61eb6472023-08-17 13:21:49 +0200251 max_concurrent_invocations = max_concurrent_invocations,
Rico Wind18d5b6f2021-07-09 09:56:57 +0200252 properties = {
253 "test_options" : test_options,
254 "builder_group" : "internal.client.r8"
Rico Wind5aa510c2021-07-09 11:10:40 +0200255 }
Rico Wind18d5b6f2021-07-09 09:56:57 +0200256 )
Rico Windf57799f2021-07-08 15:45:45 +0200257
Rico Wind49fc6512022-02-09 11:45:15 +0100258def r8_tester_with_default(name,
259 test_options,
260 dimensions=None,
261 category=None,
Rico Wind61eb6472023-08-17 13:21:49 +0200262 release_trigger=None,
263 max_concurrent_invocations = 1):
Rico Wind2839ad52021-09-28 08:57:57 +0200264 r8_tester(name, test_options + common_test_options,
Rico Wind61eb6472023-08-17 13:21:49 +0200265 dimensions = dimensions, category = category, release_trigger=release_trigger,
266 max_concurrent_invocations = max_concurrent_invocations)
Rico Windf57799f2021-07-08 15:45:45 +0200267
Rico Wind347f8602021-09-28 06:37:02 +0200268def archivers():
Søren Gjessec56e69f2022-08-22 09:45:05 +0200269 for name in [
270 "archive",
271 "archive_release",
272 "lib_desugar-archive-jdk11",
273 "lib_desugar-archive-jdk11-legacy",
274 "lib_desugar-archive-jdk8"]:
Rico Wind347f8602021-09-28 06:37:02 +0200275 desugar = "desugar" in name
276 properties = {
Rico Windd0ad7c02021-09-28 13:59:38 +0200277 "test_wrapper" : "tools/archive_desugar_jdk_libs.py" if desugar else "tools/archive.py",
Rico Wind347f8602021-09-28 06:37:02 +0200278 "builder_group" : "internal.client.r8"
279 }
Rico Wind4173fe52022-06-24 09:26:15 +0200280 if desugar:
Søren Gjessec56e69f2022-08-22 09:45:05 +0200281 if name.endswith("jdk11"):
282 properties["test_options"] = ["--variant=jdk11_minimal", "--variant=jdk11", "--variant=jdk11_nio"]
283 elif name.endswith("jdk11-legacy"):
284 properties["test_options"] = ["--variant=jdk11_legacy"]
285 else:
286 properties["test_options"] = ["--variant=jdk8"]
Rico Wind4173fe52022-06-24 09:26:15 +0200287
Rico Wind347f8602021-09-28 06:37:02 +0200288 r8_builder(
289 name,
Rico Wind96a4bc32021-09-28 13:28:08 +0200290 category = "library_desugar" if desugar else "archive",
Rico Wind093b16e2023-09-25 12:32:01 +0200291 dimensions = get_dimensions(archive=True),
Rico Wind347f8602021-09-28 06:37:02 +0200292 triggering_policy = scheduler.policy(
293 kind = scheduler.GREEDY_BATCHING_KIND,
294 max_batch_size = 1,
Rico Wind61eb6472023-08-17 13:21:49 +0200295 max_concurrent_invocations = 1
Rico Wind347f8602021-09-28 06:37:02 +0200296 ),
297 priority = 25,
298 trigger = not desugar,
299 properties = properties,
Rico Winda6091bc2023-09-15 12:17:52 +0200300 execution_timeout = time.hour * 1,
Rico Wind347f8602021-09-28 06:37:02 +0200301 expiration_timeout = time.hour * 35,
302 )
303archivers()
304
Ian Zerny31c34fb2023-06-14 10:58:50 +0200305r8_builder(
306 "check",
307 category = "archive",
308 dimensions = get_dimensions(),
309 triggering_policy = scheduler.policy(
310 kind = scheduler.GREEDY_BATCHING_KIND,
311 max_batch_size = 1,
312 max_concurrent_invocations = 1
313 ),
314 priority = 25,
315 properties = {
316 "test_wrapper" : "tools/check-cherry-picks.py",
317 "builder_group" : "internal.client.r8"
318 },
319 execution_timeout = time.minute * 30,
320 expiration_timeout = time.hour * 35,
321)
322
Rico Windfd937102023-08-09 12:33:58 +0200323r8_tester_with_default("linux-dex_default",
Rico Wind61eb6472023-08-17 13:21:49 +0200324 ["--runtimes=dex-default", "--command_cache_dir=/tmp/ccache"],
325 max_concurrent_invocations = 2)
Rico Windfd937102023-08-09 12:33:58 +0200326r8_tester_with_default("linux-none",
Rico Wind61eb6472023-08-17 13:21:49 +0200327 ["--runtimes=none", "--command_cache_dir=/tmp/ccache"],
328 max_concurrent_invocations = 2)
Rico Windfd937102023-08-09 12:33:58 +0200329r8_tester_with_default("linux-jdk8",
330 ["--runtimes=jdk8", "--command_cache_dir=/tmp/ccache"])
331r8_tester_with_default("linux-jdk9",
332 ["--runtimes=jdk9", "--command_cache_dir=/tmp/ccache"])
333r8_tester_with_default("linux-jdk11",
334 ["--runtimes=jdk11", "--command_cache_dir=/tmp/ccache"])
335r8_tester_with_default("linux-jdk17",
336 ["--runtimes=jdk17", "--command_cache_dir=/tmp/ccache"],
337 release_trigger=["branch-gitiles-3.3-forward"])
Søren Gjessec00ff972023-11-20 16:03:55 +0100338r8_tester_with_default("linux-jdk21",
339 ["--runtimes=jdk21", "--command_cache_dir=/tmp/ccache"],
340 release_trigger=["branch-gitiles-8.3-forward"])
Rico Wind347f8602021-09-28 06:37:02 +0200341
342r8_tester_with_default("linux-android-4.0.4",
Rico Wind61eb6472023-08-17 13:21:49 +0200343 ["--dex_vm=4.0.4", "--all_tests", "--command_cache_dir=/tmp/ccache"],
344 max_concurrent_invocations = 2)
Rico Wind347f8602021-09-28 06:37:02 +0200345r8_tester_with_default("linux-android-4.4.4",
Rico Windfd937102023-08-09 12:33:58 +0200346 ["--dex_vm=4.4.4", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200347r8_tester_with_default("linux-android-5.1.1",
Rico Windfd937102023-08-09 12:33:58 +0200348 ["--dex_vm=5.1.1", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200349r8_tester_with_default("linux-android-6.0.1",
Rico Windfd937102023-08-09 12:33:58 +0200350 ["--dex_vm=6.0.1", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200351r8_tester_with_default("linux-android-7.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200352 ["--dex_vm=7.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200353r8_tester_with_default("linux-android-8.1.0",
Rico Windfd937102023-08-09 12:33:58 +0200354 ["--dex_vm=8.1.0", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200355r8_tester_with_default("linux-android-9.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200356 ["--dex_vm=9.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200357r8_tester_with_default("linux-android-10.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200358 ["--dex_vm=10.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"])
Rico Wind347f8602021-09-28 06:37:02 +0200359r8_tester_with_default("linux-android-12.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200360 ["--dex_vm=12.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"],
Rico Wind49fc6512022-02-09 11:45:15 +0100361 release_trigger=["branch-gitiles-3.2-forward"])
Søren Gjesse61fb43d2022-02-09 09:39:22 +0100362r8_tester_with_default("linux-android-13.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200363 ["--dex_vm=13.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"],
Rico Wind49fc6512022-02-09 11:45:15 +0100364 release_trigger=["branch-gitiles-3.3-forward"])
Søren Gjessebc9edbb2023-03-07 10:35:01 +0100365r8_tester_with_default("linux-android-14.0.0",
Rico Windfd937102023-08-09 12:33:58 +0200366 ["--dex_vm=14.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"],
Søren Gjessebc9edbb2023-03-07 10:35:01 +0100367 release_trigger=["branch-gitiles-8.1-forward"])
368
Rico Wind347f8602021-09-28 06:37:02 +0200369
Rico Winde6413102021-09-28 10:54:23 +0200370r8_tester_with_default("windows", ["--all_tests"],
Rico Windcf429812023-08-17 14:40:08 +0200371 dimensions=get_dimensions(windows=True),
372 max_concurrent_invocations = 2)
Rico Wind347f8602021-09-28 06:37:02 +0200373
374def internal():
375 for name in ["linux-internal", "linux-internal_release"]:
376 r8_builder(
377 name,
378 dimensions = get_dimensions(internal=True),
379 triggering_policy = scheduler.policy(
380 kind = scheduler.GREEDY_BATCHING_KIND,
Rico Windf3e38b72022-03-29 11:13:54 +0200381 max_concurrent_invocations = 1,
Rico Wind11ee8842022-04-05 08:38:06 +0200382 max_batch_size = 1 if "release" in name else 20
Rico Wind347f8602021-09-28 06:37:02 +0200383 ),
384 priority = 25,
385 properties = {
Rico Windc851b412021-09-28 14:10:40 +0200386 "test_options" : ["--bot"],
387 "test_wrapper" : "tools/internal_test.py",
Rico Wind347f8602021-09-28 06:37:02 +0200388 "builder_group" : "internal.client.r8"
389 },
390 execution_timeout = time.hour * 12,
391 expiration_timeout = time.hour * 35,
392 )
393internal()
Rico Wind978650b2021-08-10 09:46:12 +0200394
Rico Winddaea3442021-09-23 12:47:16 +0200395def app_dump():
396 for release in ["", "_release"]:
397 properties = {
398 "builder_group" : "internal.client.r8",
Christoffer Quist Adamsen608ee592023-08-24 11:01:22 +0200399 "test_options" : ["--bot", "--workers", "4"],
Rico Winddaea3442021-09-23 12:47:16 +0200400 "test_wrapper" : "tools/run_on_app_dump.py"
401 }
402 name = "linux-run-on-app-dump" + release
403 r8_builder(
404 name,
405 dimensions = get_dimensions(),
406 execution_timeout = time.hour * 12,
407 expiration_timeout = time.hour * 35,
408 properties = properties,
409 )
410app_dump()
411
412def desugared_library():
Rico Wind06ab38b2023-08-03 12:49:50 +0200413 test_options = [
414 "--one_line_per_test",
415 "--archive_failures",
416 "--no_internal",
417 "--no_arttests",
418 "--desugared-library",
419 "HEAD",
420 "--desugared-library-configuration",
421 "jdk11"
422 ]
423 properties = {
424 "builder_group" : "internal.client.r8",
425 "test_options" : test_options,
426 }
427 r8_builder(
428 "desugared_library-jdk11_head",
429 category = "library_desugar",
430 dimensions = get_dimensions(),
431 execution_timeout = time.hour * 12,
432 expiration_timeout = time.hour * 35,
433 properties = properties,
434 )
Rico Winddaea3442021-09-23 12:47:16 +0200435desugared_library()
Rico Wind978650b2021-08-10 09:46:12 +0200436
Rico Winddaea3442021-09-23 12:47:16 +0200437r8_builder(
Rico Winde6413102021-09-28 10:54:23 +0200438 "linux-kotlin_dev",
Rico Winddaea3442021-09-23 12:47:16 +0200439 dimensions = get_dimensions(),
440 execution_timeout = time.hour * 12,
441 expiration_timeout = time.hour * 35,
442 properties = {
443 "builder_group" : "internal.client.r8",
Morten Krogh-Jespersendcb967e2021-12-02 11:18:39 +0100444 "test_options" : ["--runtimes=dex-default:jdk11", "--kotlin-compiler-dev", "--one_line_per_test", "--archive_failures", "--no-internal", "*kotlin*", "*debug*"]
Rico Winddaea3442021-09-23 12:47:16 +0200445 }
446)
Rico Wind347f8602021-09-28 06:37:02 +0200447
Morten Krogh-Jespersen199b06b2021-11-26 13:30:29 +0100448r8_builder(
449 "linux-kotlin_old",
450 dimensions = get_dimensions(),
451 execution_timeout = time.hour * 12,
452 expiration_timeout = time.hour * 35,
453 properties = {
454 "builder_group" : "internal.client.r8",
Morten Krogh-Jespersendcb967e2021-12-02 11:18:39 +0100455 "test_options" : ["--runtimes=dex-default:jdk11", "--kotlin-compiler-old", "--one_line_per_test", "--archive_failures", "--no-internal", "*kotlin*", "*debug*"]
Morten Krogh-Jespersen199b06b2021-11-26 13:30:29 +0100456 }
457)
458
Søren Gjesseceb85a82023-04-26 09:58:03 +0200459r8_builder(
460 "smali",
Søren Gjessedab0e8f2023-04-26 11:10:40 +0200461 category = "aux",
462 trigger = False,
Rico Wind093b16e2023-09-25 12:32:01 +0200463 dimensions = get_dimensions(),
Søren Gjesseceb85a82023-04-26 09:58:03 +0200464 triggering_policy = scheduler.policy(
465 kind = scheduler.GREEDY_BATCHING_KIND,
466 max_concurrent_invocations = 1,
467 max_batch_size = 1,
468 ),
469 properties = {
470 "test_wrapper" : "tools/archive_smali.py",
471 "builder_group" : "internal.client.smali"
472 },
473 execution_timeout = time.hour * 12,
474 expiration_timeout = time.hour * 35,
475)
476
Rico Wind96a4bc32021-09-28 13:28:08 +0200477order_of_categories = [
478 "archive",
479 "R8",
Rico Wind96a4bc32021-09-28 13:28:08 +0200480 "library_desugar",
481 "Release|archive",
482 "Release|R8",
Rico Wind96a4bc32021-09-28 13:28:08 +0200483]
484
Søren Gjessedab0e8f2023-04-26 11:10:40 +0200485categories_with_no_console = [
486 "aux",
487]
488
Rico Wind96a4bc32021-09-28 13:28:08 +0200489def add_view_entries():
490 # Ensure that all categories are ordered
491 for v in view_builders:
Søren Gjessedab0e8f2023-04-26 11:10:40 +0200492 if v[1] in categories_with_no_console:
493 continue
Rico Wind96a4bc32021-09-28 13:28:08 +0200494 if not v[1] in order_of_categories:
495 fail()
496 for category in order_of_categories:
497 for v in [x for x in view_builders if x[1] == category]:
498 luci.console_view_entry(
499 console_view = "main",
500 builder = v[0],
501 category = v[1],
502 short_name = v[2]
503 )
Vadim Shtayura50d64382022-02-10 12:57:37 -0800504add_view_entries()