Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 1 | #!/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 | |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 9 | """LUCI project configuration for WebRTC CQ and CI.""" |
| 10 | |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 11 | lucicfg.check_version("1.23.0") |
Mirko Bonadei | 9189d9c | 2020-06-09 21:54:18 +0200 | [diff] [blame] | 12 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 13 | WEBRTC_GIT = "https://webrtc.googlesource.com/src" |
| 14 | WEBRTC_GERRIT = "https://webrtc-review.googlesource.com/src" |
Mirko Bonadei | f4b78bf | 2021-04-29 11:23:41 +0200 | [diff] [blame] | 15 | WEBRTC_TROOPER_EMAIL = "webrtc-troopers-robots@google.com" |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 16 | |
Mirko Bonadei | 32ca486 | 2020-03-11 10:39:45 +0100 | [diff] [blame] | 17 | GOMA_BACKEND_WEBRTC_RBE_PROD = { |
Mirko Bonadei | 1e90534 | 2020-03-04 09:39:42 +0100 | [diff] [blame] | 18 | "$build/goma": { |
| 19 | "server_host": "goma.chromium.org", |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 20 | "use_luci_auth": True, |
| 21 | }, |
Mirko Bonadei | 1e90534 | 2020-03-04 09:39:42 +0100 | [diff] [blame] | 22 | } |
| 23 | |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 24 | GOMA_BACKEND_WEBRTC_IOS_RBE_PROD = { |
| 25 | "$build/goma": { |
| 26 | "server_host": "goma.chromium.org", |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 27 | "use_luci_auth": True, |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 28 | }, |
Artem Titov | 1d47d31 | 2020-11-03 14:45:52 +0100 | [diff] [blame] | 29 | "$depot_tools/osx_sdk": {"sdk_version": "12a7209"}, |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 30 | } |
| 31 | |
Patrik Höglund | 3916a97 | 2019-12-04 13:19:38 +0100 | [diff] [blame] | 32 | GOMA_BACKEND_RBE_ATS_PROD = { |
| 33 | "$build/goma": { |
| 34 | "server_host": "goma.chromium.org", |
Mirko Bonadei | 2688eca | 2020-03-25 09:15:54 +0100 | [diff] [blame] | 35 | "use_luci_auth": True, |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 36 | "enable_ats": True, |
| 37 | }, |
Patrik Höglund | 3916a97 | 2019-12-04 13:19:38 +0100 | [diff] [blame] | 38 | } |
| 39 | |
Mirko Bonadei | 5aafd47 | 2021-04-21 10:42:00 +0200 | [diff] [blame] | 40 | # Disable ATS on CQ/try. |
| 41 | GOMA_BACKEND_RBE_NO_ATS_PROD = { |
| 42 | "$build/goma": { |
| 43 | "server_host": "goma.chromium.org", |
| 44 | "use_luci_auth": True, |
| 45 | "enable_ats": False, |
| 46 | }, |
| 47 | } |
| 48 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 49 | # Top-level configs: |
| 50 | |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 51 | # Enable LUCI Realms support. |
| 52 | lucicfg.enable_experiment("crbug.com/1085650") |
| 53 | |
Andrii Shyshkalov | 32515d4 | 2021-04-29 14:39:42 +0200 | [diff] [blame] | 54 | # Launch all builds in "realms-aware mode", crbug.com/1177975. |
| 55 | luci.builder.defaults.experiments.set({"luci.use_realms": 100}) |
Andrii Shyshkalov | 20b2187 | 2021-04-28 15:10:53 +0200 | [diff] [blame] | 56 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 57 | lucicfg.config( |
| 58 | config_dir = ".", |
| 59 | tracked_files = [ |
| 60 | "commit-queue.cfg", |
| 61 | "cr-buildbucket.cfg", |
| 62 | "luci-logdog.cfg", |
| 63 | "luci-milo.cfg", |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 64 | "luci-notify.cfg", |
Oleh Prypin | 705b6a6 | 2019-04-03 23:10:51 +0200 | [diff] [blame] | 65 | "luci-notify/**/*", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 66 | "luci-scheduler.cfg", |
| 67 | "project.cfg", |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 68 | "realms.cfg", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 69 | ], |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 70 | lint_checks = ["default"], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 71 | ) |
| 72 | |
| 73 | luci.project( |
| 74 | name = "webrtc", |
| 75 | buildbucket = "cr-buildbucket.appspot.com", |
| 76 | logdog = "luci-logdog.appspot.com", |
| 77 | milo = "luci-milo.appspot.com", |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 78 | notify = "luci-notify.appspot.com", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 79 | scheduler = "luci-scheduler.appspot.com", |
| 80 | swarming = "chromium-swarm.appspot.com", |
| 81 | acls = [ |
| 82 | acl.entry( |
| 83 | [acl.BUILDBUCKET_READER, acl.LOGDOG_READER, acl.PROJECT_CONFIGS_READER, acl.SCHEDULER_READER], |
| 84 | groups = ["all"], |
| 85 | ), |
| 86 | acl.entry(acl.LOGDOG_WRITER, groups = ["luci-logdog-chromium-writers"]), |
| 87 | acl.entry(acl.SCHEDULER_OWNER, groups = ["project-webrtc-admins"]), |
| 88 | ], |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 89 | bindings = [ |
| 90 | luci.binding( |
| 91 | roles = "role/swarming.poolOwner", |
| 92 | groups = "project-webrtc-admins", |
| 93 | ), |
| 94 | luci.binding( |
| 95 | roles = "role/swarming.poolViewer", |
| 96 | groups = "all", |
| 97 | ), |
Andrii Shyshkalov | 2961b64 | 2021-04-29 14:01:53 +0200 | [diff] [blame] | 98 | # Allow any WebRTC build to trigger a test ran under chromium-tester@ |
| 99 | # task service account. |
| 100 | luci.binding( |
| 101 | roles = "role/swarming.taskServiceAccount", |
| 102 | users = [ |
| 103 | "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", |
| 104 | ], |
| 105 | ), |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 106 | ], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 107 | ) |
| 108 | |
| 109 | luci.logdog( |
| 110 | gs_bucket = "chromium-luci-logdog", |
| 111 | ) |
| 112 | |
| 113 | luci.milo( |
| 114 | logo = "https://storage.googleapis.com/chrome-infra/webrtc-logo-vert-retro-255x305.png", |
| 115 | ) |
| 116 | |
Owen Rodley | a55c38e | 2020-06-15 11:16:10 +1000 | [diff] [blame] | 117 | luci.notify(tree_closing_enabled = True) |
| 118 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 119 | luci.cq( |
| 120 | status_host = "chromium-cq-status.appspot.com", |
| 121 | submit_max_burst = 1, |
| 122 | submit_burst_delay = 1 * time.minute, |
| 123 | ) |
| 124 | |
| 125 | luci.gitiles_poller( |
Christoffer Jansson | fa64689 | 2021-06-28 17:34:20 +0200 | [diff] [blame] | 126 | name = "webrtc-gitiles-trigger-main", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 127 | bucket = "ci", |
| 128 | repo = WEBRTC_GIT, |
Christoffer Jansson | fa64689 | 2021-06-28 17:34:20 +0200 | [diff] [blame] | 129 | refs = ["refs/heads/main"], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 130 | ) |
| 131 | |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 132 | # Swarming permissions: |
| 133 | |
Andrii Shyshkalov | c26aaad | 2021-04-27 16:47:26 +0200 | [diff] [blame] | 134 | luci.realm(name = "pools/cron", bindings = [ |
| 135 | # Unlike WebRTC's own builders, other projects need an explicit grant to use this pool. |
| 136 | luci.binding( |
| 137 | roles = "role/swarming.poolUser", |
| 138 | projects = "libyuv", |
| 139 | ), |
| 140 | ]) |
| 141 | |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 142 | luci.realm(name = "pools/ci") |
Andrii Shyshkalov | c26aaad | 2021-04-27 16:47:26 +0200 | [diff] [blame] | 143 | luci.realm(name = "pools/ci-tests", bindings = [ |
| 144 | # Allow task service accounts of .ci pool/bucket to trigger tasks here. |
| 145 | luci.binding( |
| 146 | roles = "role/swarming.poolUser", |
| 147 | groups = "project-webrtc-ci-task-accounts", |
| 148 | ), |
| 149 | # Allow tasks here to use .ci task service accounts. |
| 150 | luci.binding( |
| 151 | roles = "role/swarming.taskServiceAccount", |
| 152 | groups = "project-webrtc-ci-task-accounts", |
| 153 | ), |
| 154 | ]) |
| 155 | |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 156 | luci.realm(name = "pools/try") |
Andrii Shyshkalov | c26aaad | 2021-04-27 16:47:26 +0200 | [diff] [blame] | 157 | luci.realm(name = "pools/try-tests", bindings = [ |
| 158 | # Allow task service accounts of .try pool/bucket to trigger tasks here. |
| 159 | luci.binding( |
| 160 | roles = "role/swarming.poolUser", |
| 161 | groups = "project-webrtc-try-task-accounts", |
| 162 | ), |
| 163 | # Allow tasks here to use .try task service accounts. |
| 164 | luci.binding( |
| 165 | roles = "role/swarming.taskServiceAccount", |
| 166 | groups = "project-webrtc-try-task-accounts", |
| 167 | ), |
| 168 | ]) |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 169 | |
| 170 | # Allow admins to use LED & Swarming "Debug" feature on all WebRTC bots. |
| 171 | luci.binding( |
| 172 | realm = "@root", |
| 173 | roles = "role/swarming.poolUser", |
| 174 | groups = "project-webrtc-admins", |
| 175 | ) |
| 176 | luci.binding( |
| 177 | realm = "@root", |
| 178 | roles = "role/swarming.taskTriggerer", |
| 179 | groups = "project-webrtc-admins", |
| 180 | ) |
| 181 | |
Emil Lundmark | 0842a99 | 2021-08-26 15:38:28 +0200 | [diff] [blame^] | 182 | # Allow to use LED & Swarming "Debug" feature to a larger group but only on perf |
| 183 | # and try bots / builders. |
| 184 | luci.binding( |
| 185 | realm = "perf", |
| 186 | roles = "role/swarming.poolUser", |
| 187 | groups = "project-webrtc-led-users", |
| 188 | ) |
Andrii Shyshkalov | 0efa6da | 2021-04-26 20:40:33 +0200 | [diff] [blame] | 189 | luci.binding( |
| 190 | realm = "pools/try", |
| 191 | roles = "role/swarming.poolUser", |
| 192 | groups = "project-webrtc-led-users", |
| 193 | ) |
| 194 | luci.binding( |
| 195 | realm = "try", |
| 196 | roles = "role/swarming.taskTriggerer", |
| 197 | groups = "project-webrtc-led-users", |
| 198 | ) |
| 199 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 200 | # Bucket definitions: |
| 201 | |
| 202 | luci.bucket( |
| 203 | name = "try", |
| 204 | acls = [ |
| 205 | acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [ |
| 206 | "service-account-cq", |
| 207 | "project-webrtc-tryjob-access", |
| 208 | ]), |
| 209 | ], |
| 210 | ) |
| 211 | |
| 212 | luci.bucket( |
| 213 | name = "ci", |
| 214 | acls = [ |
Oleh Prypin | f35939d | 2019-05-03 20:42:38 +0200 | [diff] [blame] | 215 | acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [ |
| 216 | "project-webrtc-ci-schedulers", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 217 | ]), |
Jeremy Leconte | 2e25bb5 | 2020-07-16 09:38:56 +0200 | [diff] [blame] | 218 | acl.entry(acl.BUILDBUCKET_TRIGGERER, groups = [ |
| 219 | # Allow Pinpoint to trigger builds for bisection |
| 220 | "service-account-chromeperf", |
| 221 | ]), |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 222 | ], |
| 223 | ) |
| 224 | |
| 225 | luci.bucket( |
| 226 | name = "perf", |
| 227 | acls = [ |
| 228 | acl.entry(acl.BUILDBUCKET_TRIGGERER, users = [ |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 229 | "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com", |
| 230 | ]), |
| 231 | ], |
| 232 | ) |
| 233 | |
| 234 | luci.bucket( |
| 235 | name = "cron", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 236 | ) |
| 237 | |
| 238 | # Commit queue definitions: |
| 239 | |
| 240 | luci.cq_group( |
| 241 | name = "cq", |
| 242 | tree_status_host = "webrtc-status.appspot.com", |
Christoffer Jansson | 1746b25 | 2021-05-31 16:03:55 +0200 | [diff] [blame] | 243 | watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/master", "refs/heads/main"])], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 244 | acls = [ |
| 245 | acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]), |
| 246 | acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]), |
| 247 | ], |
| 248 | retry_config = cq.RETRY_ALL_FAILURES, |
Oleh Prypin | 5416f2d | 2019-08-02 09:43:15 +0200 | [diff] [blame] | 249 | cancel_stale_tryjobs = True, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 250 | ) |
| 251 | |
| 252 | luci.cq_group( |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 253 | name = "cq_branch", |
| 254 | watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/branch-heads/.+"])], |
| 255 | acls = [ |
| 256 | acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-committers"]), |
| 257 | acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]), |
| 258 | ], |
| 259 | retry_config = cq.RETRY_ALL_FAILURES, |
Oleh Prypin | 5416f2d | 2019-08-02 09:43:15 +0200 | [diff] [blame] | 260 | cancel_stale_tryjobs = True, |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 261 | ) |
| 262 | |
| 263 | luci.cq_group( |
| 264 | name = "cq_infra", |
| 265 | watch = [cq.refset(repo = WEBRTC_GERRIT, refs = ["refs/heads/infra/config"])], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 266 | acls = [ |
| 267 | acl.entry(acl.CQ_COMMITTER, groups = ["project-webrtc-admins"]), |
| 268 | acl.entry(acl.CQ_DRY_RUNNER, groups = ["project-webrtc-tryjob-access"]), |
| 269 | ], |
| 270 | retry_config = cq.RETRY_ALL_FAILURES, |
Oleh Prypin | 5416f2d | 2019-08-02 09:43:15 +0200 | [diff] [blame] | 271 | cancel_stale_tryjobs = True, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 272 | ) |
| 273 | |
| 274 | luci.cq_tryjob_verifier( |
| 275 | builder = "presubmit", |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 276 | cq_group = "cq_infra", |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 277 | ) |
| 278 | |
Oleh Prypin | e56cd9b | 2019-05-29 21:14:31 +0200 | [diff] [blame] | 279 | luci.cq_tryjob_verifier( |
| 280 | builder = "webrtc-internal:g3.webrtc-internal.try/internal_compile_lite", |
| 281 | owner_whitelist = ["project-webrtc-internal-tryjob-access"], |
| 282 | cq_group = "cq", |
| 283 | ) |
| 284 | |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 285 | # Notifier definitions: |
| 286 | |
| 287 | luci.notifier( |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 288 | name = "post_submit_failure_notifier", |
| 289 | on_new_status = ["FAILURE"], |
Mirko Bonadei | f4b78bf | 2021-04-29 11:23:41 +0200 | [diff] [blame] | 290 | notify_emails = [WEBRTC_TROOPER_EMAIL], |
Oleh Prypin | 705b6a6 | 2019-04-03 23:10:51 +0200 | [diff] [blame] | 291 | template = luci.notifier_template( |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 292 | name = "build_failure", |
| 293 | body = io.read_file("luci-notify/email-templates/build_failure.template"), |
Oleh Prypin | 705b6a6 | 2019-04-03 23:10:51 +0200 | [diff] [blame] | 294 | ), |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 295 | ) |
| 296 | |
| 297 | luci.notifier( |
| 298 | name = "cron_notifier", |
Jeremy Leconte | 67a904e | 2020-07-08 11:48:18 +0200 | [diff] [blame] | 299 | on_new_status = ["FAILURE", "INFRA_FAILURE"], |
Mirko Bonadei | f4b78bf | 2021-04-29 11:23:41 +0200 | [diff] [blame] | 300 | notify_emails = [WEBRTC_TROOPER_EMAIL], |
Oleh Prypin | 705b6a6 | 2019-04-03 23:10:51 +0200 | [diff] [blame] | 301 | template = luci.notifier_template( |
| 302 | name = "cron", |
| 303 | body = io.read_file("luci-notify/email-templates/cron.template"), |
| 304 | ), |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 305 | ) |
| 306 | |
Jeremy Leconte | 67a904e | 2020-07-08 11:48:18 +0200 | [diff] [blame] | 307 | luci.notifier( |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 308 | name = "infra_failure_notifier", |
Jeremy Leconte | 67a904e | 2020-07-08 11:48:18 +0200 | [diff] [blame] | 309 | on_new_status = ["INFRA_FAILURE"], |
Mirko Bonadei | f4b78bf | 2021-04-29 11:23:41 +0200 | [diff] [blame] | 310 | notify_emails = [WEBRTC_TROOPER_EMAIL], |
Jeremy Leconte | 67a904e | 2020-07-08 11:48:18 +0200 | [diff] [blame] | 311 | template = luci.notifier_template( |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 312 | name = "infra_failure", |
| 313 | body = io.read_file("luci-notify/email-templates/infra_failure.template"), |
Jeremy Leconte | 67a904e | 2020-07-08 11:48:18 +0200 | [diff] [blame] | 314 | ), |
| 315 | ) |
| 316 | |
Owen Rodley | 6b721ba | 2020-05-26 10:04:20 +1000 | [diff] [blame] | 317 | # Tree closer definitions: |
| 318 | |
| 319 | luci.tree_closer( |
| 320 | name = "webrtc_tree_closer", |
| 321 | tree_status_host = "webrtc-status.appspot.com", |
Owen Rodley | 6b721ba | 2020-05-26 10:04:20 +1000 | [diff] [blame] | 322 | # TODO: These step filters are copied verbatim from Gatekeeper, for testing |
| 323 | # that LUCI-Notify would take the exact same actions. Once we've switched |
| 324 | # over, this should be updated - several of these steps don't exist in |
| 325 | # WebRTC recipes. |
| 326 | failed_step_regexp = [ |
| 327 | "bot_update", |
| 328 | "compile", |
| 329 | "gclient runhooks", |
| 330 | "runhooks", |
| 331 | "update", |
| 332 | "extract build", |
| 333 | "cleanup_temp", |
| 334 | "taskkill", |
| 335 | "compile", |
| 336 | "gn", |
| 337 | ], |
| 338 | failed_step_regexp_exclude = ".*\\(experimental\\).*", |
| 339 | ) |
| 340 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 341 | # Recipe definitions: |
| 342 | |
| 343 | def recipe(recipe, pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"): |
| 344 | return luci.recipe( |
| 345 | name = recipe.split("/")[-1], |
| 346 | cipd_package = pkg, |
| 347 | cipd_version = "refs/heads/master", |
| 348 | recipe = recipe, |
| 349 | ) |
| 350 | |
| 351 | recipe("chromium_trybot") |
| 352 | recipe("run_presubmit") |
| 353 | recipe("webrtc/auto_roll_webrtc_deps") |
| 354 | recipe("webrtc/ios") |
| 355 | recipe("webrtc/ios_api_framework") |
| 356 | recipe("webrtc/libfuzzer") |
| 357 | recipe("webrtc/more_configs") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 358 | recipe("webrtc/standalone") |
Mirko Bonadei | 54bbd1c | 2020-12-14 15:54:46 +0100 | [diff] [blame] | 359 | recipe("webrtc/update_webrtc_binary_version") |
Jeff Yoon | f421c68 | 2020-12-17 00:16:22 -0800 | [diff] [blame] | 360 | recipe("lkgr_finder", pkg = "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 361 | |
| 362 | # Console definitions: |
| 363 | |
Josip Sokcevic | 5a906ed | 2021-06-28 08:55:46 -0700 | [diff] [blame] | 364 | luci.console_view(name = "ci", title = "Main", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"]) |
| 365 | luci.console_view(name = "perf", title = "Perf", repo = WEBRTC_GIT, header = "console-header.textpb", refs = ["refs/heads/master", "refs/heads/main"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 366 | luci.list_view(name = "cron", title = "Cron") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 367 | luci.list_view(name = "try", title = "Tryserver") |
| 368 | |
| 369 | def add_milo(builder, views): |
| 370 | """Add Milo console entries for the builder. |
| 371 | |
| 372 | Args: |
| 373 | builder: builder name (str). |
| 374 | views: dict where keys are names of consoles and values are either a |
| 375 | category for the console (str, pipe-separated) or True, which means |
| 376 | adding to a list view rather than a console. |
| 377 | """ |
| 378 | for view_name, category in views.items(): |
| 379 | if category == None: |
| 380 | continue |
| 381 | elif type(category) == "string": |
| 382 | category, _, short_name = category.rpartition("|") |
| 383 | luci.console_view_entry( |
| 384 | console_view = view_name, |
| 385 | builder = builder, |
| 386 | category = category or None, |
| 387 | short_name = short_name or None, |
| 388 | ) |
| 389 | elif category == True: |
| 390 | luci.list_view_entry( |
| 391 | list_view = view_name, |
| 392 | builder = builder, |
| 393 | ) |
| 394 | else: |
| 395 | fail("Unexpected value for category: %r" % category) |
| 396 | |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 397 | lkgr_builders = {} |
| 398 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 399 | # Builder-defining functions: |
| 400 | |
Artem Titarenko | f6588b7 | 2019-11-14 14:28:11 +0100 | [diff] [blame] | 401 | def webrtc_builder( |
| 402 | name, |
| 403 | recipe = "standalone", |
| 404 | dimensions = {}, |
Mirko Bonadei | 825f9c2 | 2020-07-01 11:52:39 +0200 | [diff] [blame] | 405 | properties = {}, |
Artem Titarenko | f6588b7 | 2019-11-14 14:28:11 +0100 | [diff] [blame] | 406 | priority = 30, |
| 407 | execution_timeout = 2 * time.hour, |
Mirko Bonadei | b7ef460 | 2020-07-01 13:28:26 +0200 | [diff] [blame] | 408 | goma_jobs = None, |
Artem Titarenko | f6588b7 | 2019-11-14 14:28:11 +0100 | [diff] [blame] | 409 | **kwargs): |
Mirko Bonadei | b7ef460 | 2020-07-01 13:28:26 +0200 | [diff] [blame] | 410 | """WebRTC specific wrapper around luci.builder. |
| 411 | |
| 412 | Args: |
| 413 | name: builder name (str). |
| 414 | recipe: string with the name of the recipe to run. |
| 415 | dimensions: dict of Swarming dimensions (strings) to search machines by. |
| 416 | properties: dict of properties to pass to the recipe (on top of the default ones). |
| 417 | priority: int [1-255] or None, indicating swarming task priority, lower is |
| 418 | more important. If None, defer the decision to Buildbucket service. |
| 419 | execution_timeout: int or None, how long to wait for a running build to finish before |
| 420 | forcefully aborting it and marking the build as timed out. If None, |
| 421 | defer the decision to Buildbucket service. |
| 422 | goma_jobs: int or None, number of jobs to be used by the builder. If None, defer the |
| 423 | decition to the goma module. |
| 424 | **kwargs: Pass on to webrtc_builder / luci.builder. |
| 425 | Returns: |
| 426 | A luci.builder. |
| 427 | """ |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 428 | dimensions = merge_dicts({"cpu": "x86-64"}, dimensions) |
| 429 | |
Mirko Bonadei | b7ef460 | 2020-07-01 13:28:26 +0200 | [diff] [blame] | 430 | if goma_jobs != None: |
| 431 | goma_additional_params = {"$build/goma": {"jobs": goma_jobs}} |
| 432 | properties = merge_dicts(properties, goma_additional_params) |
Ye Kuang | 8df2049 | 2020-10-15 14:54:17 +0900 | [diff] [blame] | 433 | properties = merge_dicts(properties, { |
| 434 | "$recipe_engine/isolated": { |
| 435 | "server": "https://isolateserver.appspot.com", |
| 436 | }, |
| 437 | }) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 438 | return luci.builder( |
| 439 | name = name, |
Oleh Prypin | 705b6a6 | 2019-04-03 23:10:51 +0200 | [diff] [blame] | 440 | executable = recipe, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 441 | dimensions = {k: v for k, v in dimensions.items() if v != None}, |
Mirko Bonadei | b7ef460 | 2020-07-01 13:28:26 +0200 | [diff] [blame] | 442 | properties = properties, |
Artem Titarenko | f6588b7 | 2019-11-14 14:28:11 +0100 | [diff] [blame] | 443 | execution_timeout = execution_timeout, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 444 | priority = priority, |
| 445 | build_numbers = True, |
| 446 | swarming_tags = ["vpython:native-python-wrapper"], |
| 447 | **kwargs |
| 448 | ) |
| 449 | |
| 450 | def ci_builder( |
| 451 | name, |
| 452 | ci_cat, |
| 453 | perf_cat = None, |
| 454 | fyi_cat = None, |
| 455 | properties = {}, |
| 456 | dimensions = {}, |
| 457 | prioritized = False, |
Oleh Prypin | f5432c5 | 2019-03-19 15:10:37 +0100 | [diff] [blame] | 458 | enabled = True, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 459 | **kwargs): |
Oleh Prypin | e567767 | 2019-04-25 12:21:35 +0200 | [diff] [blame] | 460 | """Add a post-submit builder. |
| 461 | |
| 462 | Args: |
| 463 | name: builder name (str). |
| 464 | ci_cat: the category + name for the /ci/ console, or None to omit from the console. |
| 465 | perf_cat: the category + name for the /perf/ console, or None to omit from the console. |
| 466 | fyi_cat: the category + name for the /fyi/ console, or None to omit from the console. |
| 467 | properties: dict of properties to pass to the recipe (on top of the default ones). |
| 468 | dimensions: dict of Swarming dimensions (strings) to search machines by. |
| 469 | prioritized: True to make this builder have a higher priority and never batch builds. |
| 470 | enabled: False to exclude this builder from consoles and failure notifications. |
| 471 | **kwargs: Pass on to webrtc_builder / luci.builder. |
| 472 | Returns: |
| 473 | A luci.builder. |
| 474 | |
| 475 | Notifications are also disabled if a builder is not on either of /ci/ or /perf/ consoles. |
| 476 | """ |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 477 | if prioritized: |
| 478 | kwargs["triggering_policy"] = scheduler.greedy_batching( |
| 479 | max_batch_size = 1, |
| 480 | max_concurrent_invocations = 3, |
| 481 | ) |
| 482 | kwargs["priority"] = 29 |
| 483 | |
Oleh Prypin | f5432c5 | 2019-03-19 15:10:37 +0100 | [diff] [blame] | 484 | if enabled: |
| 485 | add_milo(name, {"ci": ci_cat, "perf": perf_cat, "fyi": fyi_cat}) |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 486 | if ci_cat: |
| 487 | lkgr_builders[name] = True |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 488 | return webrtc_builder( |
| 489 | name = name, |
Garrett Beaty | 4a106ce | 2020-09-09 14:51:23 -0700 | [diff] [blame] | 490 | properties = merge_dicts({"builder_group": "client.webrtc"}, properties), |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 491 | dimensions = merge_dicts({"pool": "luci.webrtc.ci"}, dimensions), |
| 492 | bucket = "ci", |
| 493 | service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com", |
Christoffer Jansson | fa64689 | 2021-06-28 17:34:20 +0200 | [diff] [blame] | 494 | triggered_by = ["webrtc-gitiles-trigger-main"] if enabled else None, |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 495 | repo = WEBRTC_GIT, |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 496 | notifies = ["post_submit_failure_notifier", "webrtc_tree_closer", "infra_failure_notifier"] if enabled and (ci_cat or perf_cat) else None, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 497 | **kwargs |
| 498 | ) |
| 499 | |
| 500 | def try_builder( |
| 501 | name, |
| 502 | try_cat = True, |
| 503 | fyi_cat = None, |
| 504 | properties = {}, |
| 505 | dimensions = {}, |
| 506 | cq = {}, |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 507 | branch_cq = True, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 508 | **kwargs): |
Oleh Prypin | e567767 | 2019-04-25 12:21:35 +0200 | [diff] [blame] | 509 | """Add a pre-submit builder. |
| 510 | |
| 511 | Args: |
| 512 | name: builder name (str). |
| 513 | try_cat: boolean, whether to include this builder in the /try/ console. See also: `add_milo`. |
| 514 | fyi_cat: the category + name for the /fyi/ console, or None to omit from the console. |
| 515 | properties: dict of properties to pass to the recipe (on top of the default ones). |
| 516 | dimensions: dict of Swarming dimensions (strings) to search machines by. |
| 517 | cq: None to exclude this from all commit queues, or a dict of kwargs for cq_tryjob_verifier. |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 518 | branch_cq: False to exclude this builder just from the release-branch CQ. |
Oleh Prypin | e567767 | 2019-04-25 12:21:35 +0200 | [diff] [blame] | 519 | **kwargs: Pass on to webrtc_builder / luci.builder. |
| 520 | Returns: |
| 521 | A luci.builder. |
| 522 | """ |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 523 | add_milo(name, {"try": try_cat, "fyi": fyi_cat}) |
| 524 | if cq != None: |
| 525 | luci.cq_tryjob_verifier( |
| 526 | builder = name, |
| 527 | cq_group = "cq", |
| 528 | **cq |
| 529 | ) |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 530 | if branch_cq: |
| 531 | luci.cq_tryjob_verifier( |
| 532 | builder = name, |
| 533 | cq_group = "cq_branch", |
| 534 | **cq |
| 535 | ) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 536 | |
| 537 | return webrtc_builder( |
| 538 | name = name, |
Garrett Beaty | 4a106ce | 2020-09-09 14:51:23 -0700 | [diff] [blame] | 539 | properties = merge_dicts({"builder_group": "tryserver.webrtc"}, properties), |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 540 | dimensions = merge_dicts({"pool": "luci.webrtc.try"}, dimensions), |
| 541 | bucket = "try", |
| 542 | service_account = "webrtc-try-builder@chops-service-accounts.iam.gserviceaccount.com", |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 543 | notifies = ["infra_failure_notifier"], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 544 | **kwargs |
| 545 | ) |
| 546 | |
| 547 | def perf_builder( |
| 548 | name, |
| 549 | perf_cat, |
| 550 | recipe = "standalone", |
| 551 | properties = {}, |
| 552 | dimensions = {}, |
| 553 | **kwargs): |
| 554 | add_milo(name, {"perf": perf_cat}) |
| 555 | return webrtc_builder( |
| 556 | name = name, |
| 557 | recipe = recipe, |
Garrett Beaty | 4a106ce | 2020-09-09 14:51:23 -0700 | [diff] [blame] | 558 | properties = merge_dicts({"builder_group": "client.webrtc.perf"}, properties), |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 559 | dimensions = merge_dicts({"pool": "luci.webrtc.perf", "os": "Linux", "cpu": None}, dimensions), |
| 560 | bucket = "perf", |
| 561 | service_account = "webrtc-ci-builder@chops-service-accounts.iam.gserviceaccount.com", |
| 562 | # log_base of 1.7 means: |
| 563 | # when there are P pending builds, LUCI will batch the first B builds. |
| 564 | # P: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... |
| 565 | # B: 1 1 2 2 3 3 3 3 4 4 4 4 4 4 5 ... |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 566 | triggering_policy = scheduler.logarithmic_batching(log_base = 1.7), |
Artem Titarenko | f6588b7 | 2019-11-14 14:28:11 +0100 | [diff] [blame] | 567 | execution_timeout = 3 * time.hour, |
Mirko Bonadei | 875a27a | 2020-07-11 15:04:58 +0200 | [diff] [blame] | 568 | notifies = ["post_submit_failure_notifier", "infra_failure_notifier"], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 569 | **kwargs |
| 570 | ) |
| 571 | |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 572 | def android_perf_builder( |
| 573 | name, |
| 574 | perf_cat, |
| 575 | recipe = "standalone", |
| 576 | properties = {}, |
| 577 | dimensions = {}, |
| 578 | **kwargs): |
| 579 | return perf_builder( |
| 580 | name = name, |
| 581 | perf_cat = perf_cat, |
| 582 | recipe = recipe, |
| 583 | properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties), |
| 584 | dimensions = dimensions, |
| 585 | **kwargs |
| 586 | ) |
| 587 | |
| 588 | def linux_perf_builder( |
| 589 | name, |
| 590 | perf_cat, |
| 591 | recipe = "standalone", |
| 592 | properties = {}, |
| 593 | dimensions = {}, |
| 594 | **kwargs): |
| 595 | return perf_builder( |
| 596 | name = name, |
| 597 | perf_cat = perf_cat, |
| 598 | recipe = recipe, |
| 599 | properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties), |
| 600 | dimensions = dimensions, |
| 601 | **kwargs |
| 602 | ) |
| 603 | |
| 604 | def mac_perf_builder( |
| 605 | name, |
| 606 | perf_cat, |
| 607 | recipe = "standalone", |
| 608 | properties = {}, |
| 609 | dimensions = {}, |
| 610 | **kwargs): |
| 611 | return perf_builder( |
| 612 | name = name, |
| 613 | perf_cat = perf_cat, |
| 614 | recipe = recipe, |
| 615 | properties = merge_dicts(GOMA_BACKEND_WEBRTC_RBE_PROD, properties), |
| 616 | dimensions = dimensions, |
| 617 | **kwargs |
| 618 | ) |
| 619 | |
| 620 | def win_perf_builder( |
| 621 | name, |
| 622 | perf_cat, |
| 623 | recipe = "standalone", |
| 624 | properties = {}, |
| 625 | dimensions = {}, |
| 626 | **kwargs): |
| 627 | return perf_builder( |
| 628 | name = name, |
| 629 | perf_cat = perf_cat, |
| 630 | recipe = recipe, |
| 631 | properties = merge_dicts(GOMA_BACKEND_RBE_ATS_PROD, properties), |
| 632 | dimensions = dimensions, |
| 633 | **kwargs |
| 634 | ) |
| 635 | |
Mirko Bonadei | 54bbd1c | 2020-12-14 15:54:46 +0100 | [diff] [blame] | 636 | def cron_builder(name, dimensions = {}, service_account = None, **kwargs): |
| 637 | if service_account == None: |
| 638 | service_account = "chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com" |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 639 | add_milo(name, {"cron": True}) |
| 640 | return webrtc_builder( |
| 641 | name = name, |
| 642 | dimensions = merge_dicts({"pool": "luci.webrtc.cron", "os": "Linux"}, dimensions), |
| 643 | bucket = "cron", |
Mirko Bonadei | 54bbd1c | 2020-12-14 15:54:46 +0100 | [diff] [blame] | 644 | service_account = service_account, |
Oleh Prypin | 71d1742 | 2019-03-28 08:43:16 +0100 | [diff] [blame] | 645 | notifies = ["cron_notifier"], |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 646 | **kwargs |
| 647 | ) |
| 648 | |
| 649 | # Helpers: |
| 650 | |
| 651 | def merge_dicts(a, b): |
| 652 | """Return the result of merging two dicts. |
| 653 | |
| 654 | If matching values are both dicts or both lists, they will be merged (non-recursively). |
| 655 | |
| 656 | Args: |
| 657 | a: first dict. |
| 658 | b: second dict (takes priority). |
| 659 | Returns: |
| 660 | Merged dict. |
| 661 | """ |
| 662 | a = dict(a) |
| 663 | for k, bv in b.items(): |
| 664 | av = a.get(k) |
| 665 | if type(av) == "dict" and type(bv) == "dict": |
| 666 | a[k] = dict(av) |
| 667 | a[k].update(bv) |
| 668 | elif type(av) == "list" and type(bv) == "list": |
| 669 | a[k] = av + bv |
| 670 | else: |
| 671 | a[k] = bv |
| 672 | return a |
| 673 | |
| 674 | def normal_builder_factory(**common_kwargs): |
| 675 | def builder(*args, **kwargs): |
| 676 | return ci_builder(*args, **merge_dicts(common_kwargs, kwargs)) |
| 677 | |
| 678 | def try_job(*args, **kwargs): |
| 679 | return try_builder(*args, **merge_dicts(common_kwargs, kwargs)) |
| 680 | |
| 681 | return builder, try_job |
| 682 | |
| 683 | # Mixins: |
| 684 | |
| 685 | linux_builder, linux_try_job = normal_builder_factory( |
| 686 | dimensions = {"os": "Linux", "inside_docker": "0"}, |
Mirko Bonadei | 32ca486 | 2020-03-11 10:39:45 +0100 | [diff] [blame] | 687 | properties = GOMA_BACKEND_WEBRTC_RBE_PROD, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 688 | ) |
| 689 | |
| 690 | android_builder, android_try_job = normal_builder_factory( |
| 691 | dimensions = {"os": "Linux"}, |
Mirko Bonadei | 32ca486 | 2020-03-11 10:39:45 +0100 | [diff] [blame] | 692 | properties = GOMA_BACKEND_WEBRTC_RBE_PROD, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 693 | ) |
| 694 | |
Mirko Bonadei | 5aafd47 | 2021-04-21 10:42:00 +0200 | [diff] [blame] | 695 | def win_builder(*args, **kwargs): |
| 696 | return ci_builder( |
| 697 | *args, |
| 698 | **merge_dicts({ |
| 699 | "dimensions": {"os": "Windows"}, |
| 700 | "properties": GOMA_BACKEND_RBE_ATS_PROD, |
| 701 | }, kwargs) |
| 702 | ) |
| 703 | |
| 704 | def win_try_job(*args, **kwargs): |
| 705 | return try_builder( |
| 706 | *args, |
| 707 | **merge_dicts({ |
| 708 | "dimensions": {"os": "Windows"}, |
| 709 | "properties": GOMA_BACKEND_RBE_NO_ATS_PROD, |
| 710 | }, kwargs) |
| 711 | ) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 712 | |
| 713 | mac_builder, mac_try_job = normal_builder_factory( |
| 714 | dimensions = {"os": "Mac"}, |
Mirko Bonadei | 32ca486 | 2020-03-11 10:39:45 +0100 | [diff] [blame] | 715 | properties = GOMA_BACKEND_WEBRTC_RBE_PROD, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 716 | ) |
| 717 | |
| 718 | ios_builder, ios_try_job = normal_builder_factory( |
Mirko Bonadei | 8096c23 | 2020-08-26 21:44:42 +0200 | [diff] [blame] | 719 | dimensions = {"os": "Mac-10.15"}, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 720 | recipe = "ios", |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 721 | properties = GOMA_BACKEND_WEBRTC_IOS_RBE_PROD, |
| 722 | caches = [swarming.cache("osx_sdk")], |
| 723 | ) |
| 724 | |
| 725 | # Some iOS builders don't use goma because they build using |
| 726 | # `use_xcode_clang=true` which is not supported by goma. |
| 727 | # https://ci.chromium.org/p/webrtc/builders/ci/iOS%20API%20Framework%20Builder |
| 728 | # https://ci.chromium.org/p/webrtc/builders/try/ios_api_framework |
| 729 | ios_builder_no_goma, ios_try_job_no_goma = normal_builder_factory( |
Mirko Bonadei | 8096c23 | 2020-08-26 21:44:42 +0200 | [diff] [blame] | 730 | dimensions = {"os": "Mac-10.15"}, |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 731 | recipe = "ios", |
Artem Titov | 1d47d31 | 2020-11-03 14:45:52 +0100 | [diff] [blame] | 732 | properties = {"$depot_tools/osx_sdk": {"sdk_version": "12a7209"}}, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 733 | caches = [swarming.cache("osx_sdk")], |
| 734 | ) |
| 735 | |
| 736 | # Actual builder configuration: |
| 737 | |
| 738 | android_builder("Android32 (M Nexus5X)(dbg)", "Android|arm|dbg") |
| 739 | android_try_job("android_compile_arm_dbg", cq = None) |
| 740 | android_try_job("android_arm_dbg") |
| 741 | android_builder("Android32 (M Nexus5X)", "Android|arm|rel") |
| 742 | android_try_job("android_arm_rel") |
| 743 | android_builder("Android32 Builder arm", "Android|arm|size", perf_cat = "Android|arm|Builder|", prioritized = True) |
| 744 | android_try_job("android_compile_arm_rel") |
Mirko Bonadei | 86b4f2d | 2020-07-08 14:24:48 +0200 | [diff] [blame] | 745 | android_perf_builder("Perf Android32 (M Nexus5)", "Android|arm|Tester|M Nexus5", triggered_by = ["Android32 Builder arm"]) |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 746 | android_perf_builder("Perf Android32 (M AOSP Nexus6)", "Android|arm|Tester|M AOSP Nexus6", triggered_by = ["Android32 Builder arm"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 747 | android_try_job("android_compile_arm64_dbg", cq = None) |
| 748 | android_try_job("android_arm64_dbg", cq = None) |
| 749 | android_builder("Android64 (M Nexus5X)", "Android|arm64|rel") |
| 750 | android_try_job("android_arm64_rel") |
| 751 | android_builder("Android64 Builder arm64", "Android|arm64|size", perf_cat = "Android|arm64|Builder|", prioritized = True) |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 752 | android_perf_builder("Perf Android64 (M Nexus5X)", "Android|arm64|Tester|M Nexus5X", triggered_by = ["Android64 Builder arm64"]) |
| 753 | android_perf_builder("Perf Android64 (O Pixel2)", "Android|arm64|Tester|O Pixel2", triggered_by = ["Android64 Builder arm64"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 754 | android_try_job("android_compile_arm64_rel") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 755 | android_builder("Android64 Builder x64 (dbg)", "Android|x64|dbg") |
| 756 | android_try_job("android_compile_x64_dbg") |
| 757 | android_try_job("android_compile_x64_rel", cq = None) |
| 758 | android_builder("Android32 Builder x86 (dbg)", "Android|x86|dbg") |
| 759 | android_try_job("android_compile_x86_dbg") |
| 760 | android_builder("Android32 Builder x86", "Android|x86|rel") |
| 761 | android_try_job("android_compile_x86_rel") |
| 762 | android_builder("Android32 (more configs)", "Android|arm|more", recipe = "more_configs") |
| 763 | android_try_job("android_arm_more_configs", recipe = "more_configs") |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 764 | android_try_job("android_chromium_compile", recipe = "chromium_trybot", branch_cq = False) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 765 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 766 | ios_builder("iOS64 Debug", "iOS|arm64|dbg") |
| 767 | ios_try_job("ios_compile_arm64_dbg") |
| 768 | ios_builder("iOS64 Release", "iOS|arm64|rel") |
| 769 | ios_try_job("ios_compile_arm64_rel") |
Artem Titov | 1d47d31 | 2020-11-03 14:45:52 +0100 | [diff] [blame] | 770 | ios_builder("iOS64 Sim Debug (iOS 14.0)", "iOS|x64|14") |
Andrey Logvin | 81320ad | 2021-06-02 16:45:09 +0000 | [diff] [blame] | 771 | ios_try_job("ios_sim_x64_dbg_ios14") |
Artem Titov | 1d47d31 | 2020-11-03 14:45:52 +0100 | [diff] [blame] | 772 | ios_builder("iOS64 Sim Debug (iOS 13)", "iOS|x64|13") |
Andrey Logvin | 81320ad | 2021-06-02 16:45:09 +0000 | [diff] [blame] | 773 | ios_try_job("ios_sim_x64_dbg_ios13") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 774 | ios_builder("iOS64 Sim Debug (iOS 12)", "iOS|x64|12") |
Andrey Logvin | 81320ad | 2021-06-02 16:45:09 +0000 | [diff] [blame] | 775 | ios_try_job("ios_sim_x64_dbg_ios12") |
Mirko Bonadei | 84360ca | 2020-03-12 08:35:48 +0100 | [diff] [blame] | 776 | ios_builder_no_goma("iOS API Framework Builder", "iOS|fat|size", recipe = "ios_api_framework", prioritized = True) |
Jeremy Leconte | ea2016b | 2020-07-01 09:47:22 +0200 | [diff] [blame] | 777 | ios_try_job_no_goma("ios_api_framework", recipe = "ios_api_framework", cq = None) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 778 | |
| 779 | linux_builder("Linux32 Debug", "Linux|x86|dbg") |
| 780 | linux_try_job("linux_x86_dbg") |
| 781 | linux_builder("Linux32 Release", "Linux|x86|rel") |
| 782 | linux_try_job("linux_x86_rel") |
| 783 | linux_builder("Linux64 Debug", "Linux|x64|dbg") |
| 784 | linux_try_job("linux_dbg", cq = None) |
| 785 | linux_try_job("linux_compile_dbg") |
| 786 | linux_builder("Linux64 Release", "Linux|x64|rel") |
| 787 | linux_try_job("linux_rel") |
| 788 | linux_builder("Linux64 Builder", "Linux|x64|size", perf_cat = "Linux|x64|Builder|", prioritized = True) |
| 789 | linux_try_job("linux_compile_rel") |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 790 | linux_perf_builder("Perf Linux Trusty", "Linux|x64|Tester|Trusty", triggered_by = ["Linux64 Builder"]) |
Christoffer Jansson | 627cb05 | 2021-06-29 12:34:58 +0200 | [diff] [blame] | 791 | linux_perf_builder("Perf Linux Bionic", "Linux|x64|Tester|Bionic", triggered_by = ["Linux64 Builder"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 792 | linux_builder("Linux32 Debug (ARM)", "Linux|arm|dbg") |
| 793 | linux_try_job("linux_compile_arm_dbg") |
| 794 | linux_builder("Linux32 Release (ARM)", "Linux|arm|rel") |
| 795 | linux_try_job("linux_compile_arm_rel") |
| 796 | linux_builder("Linux64 Debug (ARM)", "Linux|arm64|dbg") |
| 797 | linux_try_job("linux_compile_arm64_dbg") |
| 798 | linux_builder("Linux64 Release (ARM)", "Linux|arm64|rel") |
| 799 | linux_try_job("linux_compile_arm64_rel") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 800 | linux_builder("Linux Asan", "Linux|x64|asan") |
| 801 | linux_try_job("linux_asan") |
| 802 | linux_builder("Linux MSan", "Linux|x64|msan") |
| 803 | linux_try_job("linux_msan") |
| 804 | linux_builder("Linux Tsan v2", "Linux|x64|tsan") |
| 805 | linux_try_job("linux_tsan2") |
| 806 | linux_builder("Linux UBSan", "Linux|x64|ubsan") |
| 807 | linux_try_job("linux_ubsan") |
| 808 | linux_builder("Linux UBSan vptr", "Linux|x64|ubsan") |
| 809 | linux_try_job("linux_ubsan_vptr") |
| 810 | linux_builder("Linux64 Release (Libfuzzer)", "Linux|x64|fuzz", recipe = "libfuzzer") |
| 811 | linux_try_job("linux_libfuzzer_rel", recipe = "libfuzzer") |
| 812 | linux_builder("Linux (more configs)", "Linux|x64|more", recipe = "more_configs") |
| 813 | linux_try_job("linux_more_configs", recipe = "more_configs") |
Oleh Prypin | 7d1cabe | 2019-03-14 15:10:30 +0100 | [diff] [blame] | 814 | linux_try_job("linux_chromium_compile", recipe = "chromium_trybot", branch_cq = False) |
Mirko Bonadei | 40de50f | 2019-11-07 11:23:47 +0100 | [diff] [blame] | 815 | linux_try_job("linux_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 816 | |
| 817 | mac_builder("Mac64 Debug", "Mac|x64|dbg") |
| 818 | mac_try_job("mac_dbg", cq = None) |
| 819 | mac_try_job("mac_compile_dbg") |
| 820 | mac_builder("Mac64 Release", "Mac|x64|rel") |
Andrey Logvin | a950122 | 2021-04-27 18:08:39 +0000 | [diff] [blame] | 821 | mac_try_job("mac_rel") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 822 | mac_try_job("mac_compile_rel", cq = None) |
| 823 | mac_builder("Mac64 Builder", ci_cat = None, perf_cat = "Mac|x64|Builder|") |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 824 | mac_perf_builder("Perf Mac 10.11", "Mac|x64|Tester|10.11", triggered_by = ["Mac64 Builder"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 825 | mac_builder("Mac Asan", "Mac|x64|asan") |
Andrey Logvin | a950122 | 2021-04-27 18:08:39 +0000 | [diff] [blame] | 826 | mac_try_job("mac_asan") |
Mirko Bonadei | eaafe70 | 2021-07-02 12:06:35 +0000 | [diff] [blame] | 827 | mac_try_job("mac_chromium_compile", recipe = "chromium_trybot", dimensions = {"cores": "8"}, branch_cq = False) |
Christoffer Jansson | b21c950 | 2021-06-09 16:15:39 +0200 | [diff] [blame] | 828 | mac_builder("MacARM64 M1 Release", "Mac|arm64M1|rel", dimensions = {"cpu": "arm64-64-Apple_M1"}) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 829 | |
| 830 | win_builder("Win32 Debug", "Win MSVC|x86|dbg") |
| 831 | win_try_job("win_x86_msvc_dbg") |
| 832 | win_try_job("win_compile_x86_msvc_dbg", cq = None) |
Oleh Prypin | 63041b8 | 2019-03-19 22:56:01 +0000 | [diff] [blame] | 833 | win_builder("Win32 Release", "Win MSVC|x86|rel") |
| 834 | win_try_job("win_x86_msvc_rel") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 835 | win_try_job("win_compile_x86_msvc_rel", cq = None) |
| 836 | win_builder("Win64 Debug", "Win MSVC|x64|dbg") |
| 837 | win_try_job("win_x64_msvc_dbg") |
| 838 | win_try_job("win_compile_x64_msvc_dbg", cq = None) |
| 839 | win_builder("Win64 Release", "Win MSVC|x64|rel") |
| 840 | win_try_job("win_x64_msvc_rel") |
| 841 | win_try_job("win_compile_x64_msvc_rel", cq = None) |
| 842 | win_builder("Win32 Debug (Clang)", "Win Clang|x86|dbg") |
| 843 | win_try_job("win_x86_clang_dbg", cq = None) |
| 844 | win_try_job("win_compile_x86_clang_dbg") |
| 845 | win_builder("Win32 Release (Clang)", "Win Clang|x86|rel") |
| 846 | win_try_job("win_x86_clang_rel") |
| 847 | win_try_job("win_compile_x86_clang_rel", cq = None) |
| 848 | win_builder("Win32 Builder (Clang)", ci_cat = None, perf_cat = "Win|x86|Builder|") |
Mirko Bonadei | 1264377 | 2020-03-27 13:16:35 +0100 | [diff] [blame] | 849 | win_perf_builder("Perf Win7", "Win|x86|Tester|7", triggered_by = ["Win32 Builder (Clang)"]) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 850 | win_builder("Win64 Debug (Clang)", "Win Clang|x64|dbg") |
| 851 | win_try_job("win_x64_clang_dbg", cq = None) |
| 852 | win_try_job("win_x64_clang_dbg_win8", cq = None) |
| 853 | win_try_job("win_x64_clang_dbg_win10", cq = None) |
| 854 | win_try_job("win_compile_x64_clang_dbg") |
| 855 | win_builder("Win64 Release (Clang)", "Win Clang|x64|rel") |
| 856 | win_try_job("win_x64_clang_rel", cq = None) |
| 857 | win_try_job("win_compile_x64_clang_rel") |
Mirko Bonadei | afbe33d | 2019-05-31 09:27:54 +0200 | [diff] [blame] | 858 | win_builder("Win64 ASan", "Win Clang|x64|asan") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 859 | win_try_job("win_asan") |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 860 | win_builder("Win (more configs)", "Win Clang|x86|more", recipe = "more_configs") |
| 861 | win_try_job("win_x86_more_configs", recipe = "more_configs") |
Mirko Bonadei | 825f9c2 | 2020-07-01 11:52:39 +0200 | [diff] [blame] | 862 | win_try_job("win_chromium_compile", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150) |
| 863 | win_try_job("win_chromium_compile_dbg", recipe = "chromium_trybot", branch_cq = False, goma_jobs = 150) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 864 | |
| 865 | linux_try_job( |
| 866 | "presubmit", |
| 867 | recipe = "run_presubmit", |
| 868 | properties = {"repo_name": "webrtc", "runhooks": True}, |
| 869 | priority = 28, |
| 870 | cq = {"disable_reuse": True}, |
| 871 | ) |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 872 | |
| 873 | cron_builder( |
| 874 | "Auto-roll - WebRTC DEPS", |
| 875 | recipe = "auto_roll_webrtc_deps", |
Oleh Prypin | dc68a72 | 2019-06-25 10:43:13 +0200 | [diff] [blame] | 876 | schedule = "0 */2 * * *", # Every 2 hours. |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 877 | ) |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 878 | |
Mirko Bonadei | 54bbd1c | 2020-12-14 15:54:46 +0100 | [diff] [blame] | 879 | cron_builder( |
| 880 | "WebRTC version update", |
| 881 | recipe = "update_webrtc_binary_version", |
| 882 | schedule = "0 4 * * *", # Every day at 4am. |
| 883 | service_account = "webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com", |
| 884 | ) |
| 885 | |
Mirko Bonadei | c8ce5ea | 2021-07-12 10:54:14 +0200 | [diff] [blame] | 886 | # Add names of builders to remove from LKGR finder to this list. This is |
| 887 | # useful when a failure can be safely ignored while fixing it without |
| 888 | # blocking the LKGR finder on it. |
Mirko Bonadei | ab3ff26 | 2020-12-18 10:17:43 +0100 | [diff] [blame] | 889 | skipped_lkgr_bots = [ |
Mirko Bonadei | ab3ff26 | 2020-12-18 10:17:43 +0100 | [diff] [blame] | 890 | ] |
| 891 | |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 892 | lkgr_config = { |
| 893 | "project": "webrtc", |
| 894 | "source_url": WEBRTC_GIT, |
| 895 | "status_url": "https://webrtc-status.appspot.com", |
| 896 | "allowed_lag": 300, # hours |
| 897 | "allowed_gap": 12, # commits behind |
Mirko Bonadei | f4b78bf | 2021-04-29 11:23:41 +0200 | [diff] [blame] | 898 | "error_recipients": WEBRTC_TROOPER_EMAIL, |
Michael Achenbach | 09dd7dc | 2019-07-26 15:26:11 +0200 | [diff] [blame] | 899 | "buckets": { |
| 900 | "webrtc/ci": { |
| 901 | # bucket alias: luci.webrtc.ci |
Mirko Bonadei | ab3ff26 | 2020-12-18 10:17:43 +0100 | [diff] [blame] | 902 | "builders": [ |
| 903 | b |
| 904 | for b in sorted(lkgr_builders) |
| 905 | if b not in skipped_lkgr_bots |
| 906 | ], |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 907 | }, |
Michael Achenbach | 09dd7dc | 2019-07-26 15:26:11 +0200 | [diff] [blame] | 908 | "chromium/webrtc.fyi": { |
| 909 | # bucket alias: luci.chromium.webrtc.fyi |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 910 | "builders": [ |
| 911 | "WebRTC Chromium FYI Android Builder (dbg)", |
| 912 | "WebRTC Chromium FYI Android Builder ARM64 (dbg)", |
| 913 | "WebRTC Chromium FYI Android Builder", |
Mirko Bonadei | 04fe32f | 2020-05-01 00:45:58 +0200 | [diff] [blame] | 914 | "WebRTC Chromium FYI Android Tests (dbg) (L Nexus5)", |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 915 | "WebRTC Chromium FYI Android Tests (dbg) (M Nexus5X)", |
| 916 | "WebRTC Chromium FYI Linux Builder (dbg)", |
| 917 | "WebRTC Chromium FYI Linux Builder", |
| 918 | "WebRTC Chromium FYI Linux Tester", |
| 919 | "WebRTC Chromium FYI Mac Builder (dbg)", |
| 920 | "WebRTC Chromium FYI Mac Builder", |
| 921 | "WebRTC Chromium FYI Mac Tester", |
| 922 | "WebRTC Chromium FYI Win Builder (dbg)", |
| 923 | "WebRTC Chromium FYI Win Builder", |
| 924 | "WebRTC Chromium FYI Win10 Tester", |
Christoffer Jansson | 0a8266f | 2021-06-29 11:34:11 +0200 | [diff] [blame] | 925 | "WebRTC Chromium FYI Win7 Tester", |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 926 | "WebRTC Chromium FYI Win8 Tester", |
Mirko Bonadei | 2f05cfe | 2020-11-25 10:41:58 +0100 | [diff] [blame] | 927 | "WebRTC Chromium FYI ios-device", |
Björn Terelius | c20ed6b | 2021-06-21 14:31:35 +0200 | [diff] [blame] | 928 | "WebRTC Chromium FYI ios-simulator", |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 929 | ], |
| 930 | }, |
| 931 | }, |
| 932 | } |
| 933 | |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 934 | cron_builder( |
| 935 | "WebRTC lkgr finder", |
| 936 | recipe = "lkgr_finder", |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 937 | properties = { |
| 938 | "project": "webrtc", |
| 939 | "repo": WEBRTC_GIT, |
| 940 | "ref": "refs/heads/lkgr", |
Christoffer Jansson | e9fcc7b | 2021-06-29 13:02:15 +0200 | [diff] [blame] | 941 | "src_ref": "refs/heads/main", |
Oleh Prypin | 8f0dc31 | 2019-05-31 15:54:35 +0200 | [diff] [blame] | 942 | "lkgr_status_gs_path": "chromium-webrtc/lkgr-status", |
| 943 | "config": lkgr_config, |
| 944 | }, |
Oleh Prypin | 1a0593f | 2019-03-11 09:43:28 +0100 | [diff] [blame] | 945 | schedule = "*/10 * * * *", # Every 10 minutes. |
| 946 | ) |