Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 1 | #!/usr/bin/env lucicfg |
| 2 | |
Vadim Shtayura | 50d6438 | 2022-02-10 12:57:37 -0800 | [diff] [blame] | 3 | lucicfg.check_version("1.30.9", "Please use newer `lucicfg` binary") |
Andrii Shyshkalov | 55dfdde | 2021-09-27 09:30:31 +0200 | [diff] [blame] | 4 | |
Vadim Shtayura | 50d6438 | 2022-02-10 12:57:37 -0800 | [diff] [blame] | 5 | # Use LUCI Scheduler BBv2 names and add Scheduler realms configs. |
| 6 | lucicfg.enable_experiment("crbug.com/1182002") |
| 7 | |
Rico Wind | cbe8bc8 | 2021-10-27 12:53:32 +0200 | [diff] [blame] | 8 | luci.builder.defaults.experiments.set({ |
Rico Wind | cbe8bc8 | 2021-10-27 12:53:32 +0200 | [diff] [blame] | 9 | "luci.recipes.use_python3": 100 |
| 10 | }) |
Andrii Shyshkalov | 55dfdde | 2021-09-27 09:30:31 +0200 | [diff] [blame] | 11 | |
| 12 | |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 13 | luci.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 Wind | 4fb5748 | 2021-09-27 18:28:27 +0200 | [diff] [blame] | 34 | acl.SCHEDULER_OWNER, |
| 35 | |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 36 | ], |
| 37 | groups = [ |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 38 | "project-r8-committers" |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 39 | ], |
| 40 | users = [ |
| 41 | "luci-scheduler@appspot.gserviceaccount.com" |
| 42 | ] |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 43 | ), |
Rico Wind | 7256e95 | 2021-09-27 19:45:52 +0200 | [diff] [blame] | 44 | acl.entry( |
| 45 | [ |
| 46 | acl.LOGDOG_WRITER, |
| 47 | ], |
| 48 | groups = [ |
| 49 | "luci-logdog-r8-writers" |
| 50 | ], |
| 51 | ), |
Andrii Shyshkalov | 55dfdde | 2021-09-27 09:30:31 +0200 | [diff] [blame] | 52 | ], |
| 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 Wind | 7256e95 | 2021-09-27 19:45:52 +0200 | [diff] [blame] | 65 | luci.logdog(gs_bucket = "logdog-r8-archive") |
| 66 | |
| 67 | |
Andrii Shyshkalov | 55dfdde | 2021-09-27 09:30:31 +0200 | [diff] [blame] | 68 | # Allow the given users to use LUCI `led` tool and "Debug" button |
| 69 | # inside the given bucket & pool security realms. |
| 70 | def 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 | ) |
| 85 | led_users( |
| 86 | pool_realm="pools/ci", |
| 87 | builder_realm="ci", |
| 88 | groups=[ |
| 89 | "mdb/r8-team", |
| 90 | "mdb/chrome-troopers", |
| 91 | ], |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 92 | ) |
| 93 | |
| 94 | luci.bucket(name = "ci") |
| 95 | |
| 96 | luci.milo() |
| 97 | |
| 98 | luci.notifier( |
| 99 | name = "r8-failures", |
| 100 | on_failure = True, |
| 101 | on_new_failure = True, |
| 102 | notify_blamelist = True |
| 103 | ) |
| 104 | |
| 105 | luci.gitiles_poller( |
| 106 | name = "main-gitiles-trigger", |
| 107 | bucket = "ci", |
| 108 | repo = "https://r8.googlesource.com/r8" |
| 109 | ) |
| 110 | |
| 111 | luci.gitiles_poller( |
Søren Gjesse | c00ff97 | 2023-11-20 16:03:55 +0100 | [diff] [blame] | 112 | 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 | |
| 119 | luci.gitiles_poller( |
Søren Gjesse | bc9edbb | 2023-03-07 10:35:01 +0100 | [diff] [blame] | 120 | 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 | |
| 127 | luci.gitiles_poller( |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 128 | name = "branch-gitiles-3.3-forward", |
| 129 | bucket = "ci", |
| 130 | repo = "https://r8.googlesource.com/r8", |
Rico Wind | 8709be0 | 2022-02-22 12:45:27 +0100 | [diff] [blame] | 131 | refs = ["refs/heads/([3]\\.[3-9]+(\\.[0-9]+)?|[4-9]\\.[0-9]+(\\.[0-9]+)?)"], |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 132 | path_regexps = ["src/main/java/com/android/tools/r8/Version.java"] |
| 133 | ) |
| 134 | |
| 135 | luci.gitiles_poller( |
| 136 | name = "branch-gitiles-3.2-forward", |
| 137 | bucket = "ci", |
| 138 | repo = "https://r8.googlesource.com/r8", |
Rico Wind | 8709be0 | 2022-02-22 12:45:27 +0100 | [diff] [blame] | 139 | refs = ["refs/heads/([3]\\.[2-9]+(\\.[0-9]+)?|[4-9]\\.[0-9]+(\\.[0-9]+)?)"], |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 140 | path_regexps = ["src/main/java/com/android/tools/r8/Version.java"] |
| 141 | ) |
| 142 | |
| 143 | luci.gitiles_poller( |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 144 | name = "branch-gitiles-trigger", |
| 145 | bucket = "ci", |
| 146 | repo = "https://r8.googlesource.com/r8", |
Rico Wind | c9c90e6 | 2022-02-09 12:07:47 +0100 | [diff] [blame] | 147 | refs = ["refs/heads/[0-9]+\\.[0-9]+(\\.[0-9]+)?"], |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 148 | path_regexps = ["src/main/java/com/android/tools/r8/Version.java"] |
| 149 | ) |
| 150 | |
| 151 | luci.console_view( |
| 152 | name = "main", |
| 153 | title = "R8 Main Console", |
| 154 | repo = "https://r8.googlesource.com/r8", |
Rico Wind | 49a6bfe | 2021-09-27 18:20:38 +0200 | [diff] [blame] | 155 | refs = ["refs/heads/.*"] |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 156 | ) |
| 157 | |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 158 | view_builders = [] |
| 159 | |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 160 | def builder_view(name, category, short_name): |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 161 | view_builders.append((name, category, short_name)) |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 162 | |
| 163 | luci.recipe( |
| 164 | name="rex", |
| 165 | cipd_package = "infra_internal/recipe_bundles/" + |
| 166 | "chrome-internal.googlesource.com/chrome/" + |
Rico Wind | 127c231 | 2021-12-09 07:31:56 +0100 | [diff] [blame] | 167 | "tools/build_limited/scripts/slave", |
| 168 | cipd_version = "refs/heads/master", |
| 169 | use_bbagent = True |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 170 | ) |
| 171 | |
| 172 | common_test_options = [ |
| 173 | "--tool=r8", |
| 174 | "--no_internal", |
| 175 | "--one_line_per_test", |
| 176 | "--archive_failures" |
| 177 | ] |
| 178 | |
Rico Wind | 093b16e | 2023-09-25 12:32:01 +0200 | [diff] [blame] | 179 | def 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 Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 185 | dimensions = { |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 186 | "cpu" : "x86-64", |
| 187 | "pool" : "luci.r8.ci" |
| 188 | } |
| 189 | if windows: |
Rico Wind | e641310 | 2021-09-28 10:54:23 +0200 | [diff] [blame] | 190 | dimensions["os"] = "Windows-10" |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 191 | else: |
Rico Wind | 3244aac | 2023-03-27 13:49:17 +0200 | [diff] [blame] | 192 | dimensions["os"] = "Ubuntu-20.04" |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 193 | if internal: |
| 194 | dimensions["internal"] = "true" |
Rico Wind | 093b16e | 2023-09-25 12:32:01 +0200 | [diff] [blame] | 195 | elif archive: |
| 196 | dimensions["archive"] = "true" |
| 197 | else: |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 198 | dimensions["normal"] = "true" |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 199 | return dimensions |
| 200 | |
Rico Wind | f340a0e | 2021-09-29 13:58:45 +0200 | [diff] [blame] | 201 | def r8_builder(name, priority=26, trigger=True, category=None, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 202 | triggering_policy=None, release_trigger=None, |
| 203 | max_concurrent_invocations=1, **kwargs): |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 204 | release = name.endswith("release") |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 205 | 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 Wind | f340a0e | 2021-09-29 13:58:45 +0200 | [diff] [blame] | 211 | triggering_policy = triggering_policy or scheduler.policy( |
| 212 | kind = scheduler.GREEDY_BATCHING_KIND, |
Rico Wind | d2c333f | 2021-12-20 18:06:18 +0100 | [diff] [blame] | 213 | max_batch_size = 1 if release else None, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 214 | max_concurrent_invocations = max_concurrent_invocations) |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 215 | |
| 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 Wind | 978650b | 2021-08-10 09:46:12 +0200 | [diff] [blame] | 223 | notifies = ["r8-failures"] if trigger else None, |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 224 | priority = priority, |
| 225 | triggered_by = triggered, |
Rico Wind | f340a0e | 2021-09-29 13:58:45 +0200 | [diff] [blame] | 226 | triggering_policy = triggering_policy, |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 227 | executable = "rex", |
| 228 | **kwargs |
| 229 | ) |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 230 | category = category if category else "R8" |
| 231 | category = "Release|" + category if release else category |
Rico Wind | ea3a412 | 2021-09-28 09:28:10 +0200 | [diff] [blame] | 232 | builder_view(name, category, name.split("-")[-1].replace("_release", "")) |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 233 | |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 234 | def r8_tester(name, |
| 235 | test_options, |
Rico Wind | 5aa510c | 2021-07-09 11:10:40 +0200 | [diff] [blame] | 236 | dimensions = None, |
| 237 | execution_timeout = time.hour * 6, |
Rico Wind | 2839ad5 | 2021-09-28 08:57:57 +0200 | [diff] [blame] | 238 | expiration_timeout = time.hour * 35, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 239 | max_concurrent_invocations = 1, |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 240 | category=None, |
| 241 | release_trigger=None): |
Rico Wind | 093b16e | 2023-09-25 12:32:01 +0200 | [diff] [blame] | 242 | dimensions = dimensions if dimensions else get_dimensions() |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 243 | for name in [name, name + "_release"]: |
| 244 | r8_builder( |
| 245 | name = name, |
Rico Wind | 2839ad5 | 2021-09-28 08:57:57 +0200 | [diff] [blame] | 246 | category = category, |
Rico Wind | 978650b | 2021-08-10 09:46:12 +0200 | [diff] [blame] | 247 | execution_timeout = execution_timeout, |
| 248 | expiration_timeout = expiration_timeout, |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 249 | dimensions = dimensions, |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 250 | release_trigger=release_trigger, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 251 | max_concurrent_invocations = max_concurrent_invocations, |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 252 | properties = { |
| 253 | "test_options" : test_options, |
| 254 | "builder_group" : "internal.client.r8" |
Rico Wind | 5aa510c | 2021-07-09 11:10:40 +0200 | [diff] [blame] | 255 | } |
Rico Wind | 18d5b6f | 2021-07-09 09:56:57 +0200 | [diff] [blame] | 256 | ) |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 257 | |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 258 | def r8_tester_with_default(name, |
| 259 | test_options, |
| 260 | dimensions=None, |
| 261 | category=None, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 262 | release_trigger=None, |
| 263 | max_concurrent_invocations = 1): |
Rico Wind | 2839ad5 | 2021-09-28 08:57:57 +0200 | [diff] [blame] | 264 | r8_tester(name, test_options + common_test_options, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 265 | dimensions = dimensions, category = category, release_trigger=release_trigger, |
| 266 | max_concurrent_invocations = max_concurrent_invocations) |
Rico Wind | f57799f | 2021-07-08 15:45:45 +0200 | [diff] [blame] | 267 | |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 268 | def archivers(): |
Søren Gjesse | c56e69f | 2022-08-22 09:45:05 +0200 | [diff] [blame] | 269 | 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 Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 275 | desugar = "desugar" in name |
| 276 | properties = { |
Rico Wind | d0ad7c0 | 2021-09-28 13:59:38 +0200 | [diff] [blame] | 277 | "test_wrapper" : "tools/archive_desugar_jdk_libs.py" if desugar else "tools/archive.py", |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 278 | "builder_group" : "internal.client.r8" |
| 279 | } |
Rico Wind | 4173fe5 | 2022-06-24 09:26:15 +0200 | [diff] [blame] | 280 | if desugar: |
Søren Gjesse | c56e69f | 2022-08-22 09:45:05 +0200 | [diff] [blame] | 281 | 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 Wind | 4173fe5 | 2022-06-24 09:26:15 +0200 | [diff] [blame] | 287 | |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 288 | r8_builder( |
| 289 | name, |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 290 | category = "library_desugar" if desugar else "archive", |
Rico Wind | 093b16e | 2023-09-25 12:32:01 +0200 | [diff] [blame] | 291 | dimensions = get_dimensions(archive=True), |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 292 | triggering_policy = scheduler.policy( |
| 293 | kind = scheduler.GREEDY_BATCHING_KIND, |
| 294 | max_batch_size = 1, |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 295 | max_concurrent_invocations = 1 |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 296 | ), |
| 297 | priority = 25, |
| 298 | trigger = not desugar, |
| 299 | properties = properties, |
Rico Wind | a6091bc | 2023-09-15 12:17:52 +0200 | [diff] [blame] | 300 | execution_timeout = time.hour * 1, |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 301 | expiration_timeout = time.hour * 35, |
| 302 | ) |
| 303 | archivers() |
| 304 | |
Ian Zerny | 31c34fb | 2023-06-14 10:58:50 +0200 | [diff] [blame] | 305 | r8_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 Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 323 | r8_tester_with_default("linux-dex_default", |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 324 | ["--runtimes=dex-default", "--command_cache_dir=/tmp/ccache"], |
| 325 | max_concurrent_invocations = 2) |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 326 | r8_tester_with_default("linux-none", |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 327 | ["--runtimes=none", "--command_cache_dir=/tmp/ccache"], |
| 328 | max_concurrent_invocations = 2) |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 329 | r8_tester_with_default("linux-jdk8", |
| 330 | ["--runtimes=jdk8", "--command_cache_dir=/tmp/ccache"]) |
| 331 | r8_tester_with_default("linux-jdk9", |
| 332 | ["--runtimes=jdk9", "--command_cache_dir=/tmp/ccache"]) |
| 333 | r8_tester_with_default("linux-jdk11", |
| 334 | ["--runtimes=jdk11", "--command_cache_dir=/tmp/ccache"]) |
| 335 | r8_tester_with_default("linux-jdk17", |
| 336 | ["--runtimes=jdk17", "--command_cache_dir=/tmp/ccache"], |
| 337 | release_trigger=["branch-gitiles-3.3-forward"]) |
Søren Gjesse | c00ff97 | 2023-11-20 16:03:55 +0100 | [diff] [blame] | 338 | r8_tester_with_default("linux-jdk21", |
| 339 | ["--runtimes=jdk21", "--command_cache_dir=/tmp/ccache"], |
| 340 | release_trigger=["branch-gitiles-8.3-forward"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 341 | |
| 342 | r8_tester_with_default("linux-android-4.0.4", |
Rico Wind | 61eb647 | 2023-08-17 13:21:49 +0200 | [diff] [blame] | 343 | ["--dex_vm=4.0.4", "--all_tests", "--command_cache_dir=/tmp/ccache"], |
| 344 | max_concurrent_invocations = 2) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 345 | r8_tester_with_default("linux-android-4.4.4", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 346 | ["--dex_vm=4.4.4", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 347 | r8_tester_with_default("linux-android-5.1.1", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 348 | ["--dex_vm=5.1.1", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 349 | r8_tester_with_default("linux-android-6.0.1", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 350 | ["--dex_vm=6.0.1", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 351 | r8_tester_with_default("linux-android-7.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 352 | ["--dex_vm=7.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 353 | r8_tester_with_default("linux-android-8.1.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 354 | ["--dex_vm=8.1.0", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 355 | r8_tester_with_default("linux-android-9.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 356 | ["--dex_vm=9.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 357 | r8_tester_with_default("linux-android-10.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 358 | ["--dex_vm=10.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"]) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 359 | r8_tester_with_default("linux-android-12.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 360 | ["--dex_vm=12.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"], |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 361 | release_trigger=["branch-gitiles-3.2-forward"]) |
Søren Gjesse | 61fb43d | 2022-02-09 09:39:22 +0100 | [diff] [blame] | 362 | r8_tester_with_default("linux-android-13.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 363 | ["--dex_vm=13.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"], |
Rico Wind | 49fc651 | 2022-02-09 11:45:15 +0100 | [diff] [blame] | 364 | release_trigger=["branch-gitiles-3.3-forward"]) |
Søren Gjesse | bc9edbb | 2023-03-07 10:35:01 +0100 | [diff] [blame] | 365 | r8_tester_with_default("linux-android-14.0.0", |
Rico Wind | fd93710 | 2023-08-09 12:33:58 +0200 | [diff] [blame] | 366 | ["--dex_vm=14.0.0", "--all_tests", "--command_cache_dir=/tmp/ccache"], |
Søren Gjesse | bc9edbb | 2023-03-07 10:35:01 +0100 | [diff] [blame] | 367 | release_trigger=["branch-gitiles-8.1-forward"]) |
| 368 | |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 369 | |
Rico Wind | e641310 | 2021-09-28 10:54:23 +0200 | [diff] [blame] | 370 | r8_tester_with_default("windows", ["--all_tests"], |
Rico Wind | cf42981 | 2023-08-17 14:40:08 +0200 | [diff] [blame] | 371 | dimensions=get_dimensions(windows=True), |
| 372 | max_concurrent_invocations = 2) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 373 | |
| 374 | def 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 Wind | f3e38b7 | 2022-03-29 11:13:54 +0200 | [diff] [blame] | 381 | max_concurrent_invocations = 1, |
Rico Wind | 11ee884 | 2022-04-05 08:38:06 +0200 | [diff] [blame] | 382 | max_batch_size = 1 if "release" in name else 20 |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 383 | ), |
| 384 | priority = 25, |
| 385 | properties = { |
Rico Wind | c851b41 | 2021-09-28 14:10:40 +0200 | [diff] [blame] | 386 | "test_options" : ["--bot"], |
| 387 | "test_wrapper" : "tools/internal_test.py", |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 388 | "builder_group" : "internal.client.r8" |
| 389 | }, |
| 390 | execution_timeout = time.hour * 12, |
| 391 | expiration_timeout = time.hour * 35, |
| 392 | ) |
| 393 | internal() |
Rico Wind | 978650b | 2021-08-10 09:46:12 +0200 | [diff] [blame] | 394 | |
Rico Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 395 | def app_dump(): |
| 396 | for release in ["", "_release"]: |
| 397 | properties = { |
| 398 | "builder_group" : "internal.client.r8", |
Christoffer Quist Adamsen | 608ee59 | 2023-08-24 11:01:22 +0200 | [diff] [blame] | 399 | "test_options" : ["--bot", "--workers", "4"], |
Rico Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 400 | "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 | ) |
| 410 | app_dump() |
| 411 | |
| 412 | def desugared_library(): |
Rico Wind | 06ab38b | 2023-08-03 12:49:50 +0200 | [diff] [blame] | 413 | 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 Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 435 | desugared_library() |
Rico Wind | 978650b | 2021-08-10 09:46:12 +0200 | [diff] [blame] | 436 | |
Rico Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 437 | r8_builder( |
Rico Wind | e641310 | 2021-09-28 10:54:23 +0200 | [diff] [blame] | 438 | "linux-kotlin_dev", |
Rico Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 439 | 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-Jespersen | dcb967e | 2021-12-02 11:18:39 +0100 | [diff] [blame] | 444 | "test_options" : ["--runtimes=dex-default:jdk11", "--kotlin-compiler-dev", "--one_line_per_test", "--archive_failures", "--no-internal", "*kotlin*", "*debug*"] |
Rico Wind | daea344 | 2021-09-23 12:47:16 +0200 | [diff] [blame] | 445 | } |
| 446 | ) |
Rico Wind | 347f860 | 2021-09-28 06:37:02 +0200 | [diff] [blame] | 447 | |
Morten Krogh-Jespersen | 199b06b | 2021-11-26 13:30:29 +0100 | [diff] [blame] | 448 | r8_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-Jespersen | dcb967e | 2021-12-02 11:18:39 +0100 | [diff] [blame] | 455 | "test_options" : ["--runtimes=dex-default:jdk11", "--kotlin-compiler-old", "--one_line_per_test", "--archive_failures", "--no-internal", "*kotlin*", "*debug*"] |
Morten Krogh-Jespersen | 199b06b | 2021-11-26 13:30:29 +0100 | [diff] [blame] | 456 | } |
| 457 | ) |
| 458 | |
Søren Gjesse | ceb85a8 | 2023-04-26 09:58:03 +0200 | [diff] [blame] | 459 | r8_builder( |
| 460 | "smali", |
Søren Gjesse | dab0e8f | 2023-04-26 11:10:40 +0200 | [diff] [blame] | 461 | category = "aux", |
| 462 | trigger = False, |
Rico Wind | 093b16e | 2023-09-25 12:32:01 +0200 | [diff] [blame] | 463 | dimensions = get_dimensions(), |
Søren Gjesse | ceb85a8 | 2023-04-26 09:58:03 +0200 | [diff] [blame] | 464 | 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 Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 477 | order_of_categories = [ |
| 478 | "archive", |
| 479 | "R8", |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 480 | "library_desugar", |
| 481 | "Release|archive", |
| 482 | "Release|R8", |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 483 | ] |
| 484 | |
Søren Gjesse | dab0e8f | 2023-04-26 11:10:40 +0200 | [diff] [blame] | 485 | categories_with_no_console = [ |
| 486 | "aux", |
| 487 | ] |
| 488 | |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 489 | def add_view_entries(): |
| 490 | # Ensure that all categories are ordered |
| 491 | for v in view_builders: |
Søren Gjesse | dab0e8f | 2023-04-26 11:10:40 +0200 | [diff] [blame] | 492 | if v[1] in categories_with_no_console: |
| 493 | continue |
Rico Wind | 96a4bc3 | 2021-09-28 13:28:08 +0200 | [diff] [blame] | 494 | 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 Shtayura | 50d6438 | 2022-02-10 12:57:37 -0800 | [diff] [blame] | 504 | add_view_entries() |