Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1 | // Copyright 2015 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Package dashboard contains shared configuration and logic used by various |
| 6 | // pieces of the Go continuous build system. |
| 7 | package dashboard |
| 8 | |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 9 | import ( |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 10 | "fmt" |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 11 | "os" |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 12 | "sort" |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 13 | "strconv" |
| 14 | "strings" |
Brad Fitzpatrick | 34b995b | 2019-02-14 02:18:06 +0000 | [diff] [blame] | 15 | "time" |
Evan Brown | a731151 | 2016-02-14 15:59:59 -0800 | [diff] [blame] | 16 | |
| 17 | "golang.org/x/build/buildenv" |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 18 | "golang.org/x/build/maintner/maintnerd/maintapi/version" |
Dmitri Shuralyov | ad59fb1 | 2019-01-11 16:44:01 -0500 | [diff] [blame] | 19 | "golang.org/x/build/types" |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 20 | ) |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 21 | |
Brad Fitzpatrick | aab8504 | 2019-10-16 06:02:29 +0000 | [diff] [blame] | 22 | // slowBotAliases maps short names from TRY= comments to which builder to run. |
| 23 | // |
| 24 | // TODO: we'll likely expand this, or move it, or change the matching |
| 25 | // syntax entirely. This is a first draft. |
| 26 | var slowBotAliases = map[string]string{ |
| 27 | // Known missing builders: |
Alexander Rakoczy | 76eb641 | 2021-06-29 11:40:03 -0400 | [diff] [blame] | 28 | "ios-amd64": "", // There is no builder for the iOS Simulator. See issues 42100 and 42177. |
Brad Fitzpatrick | aab8504 | 2019-10-16 06:02:29 +0000 | [diff] [blame] | 29 | |
Lynn Boger | 0364c52 | 2021-03-15 09:39:52 -0500 | [diff] [blame] | 30 | "386": "linux-386", |
| 31 | "aix": "aix-ppc64", |
| 32 | "amd64": "linux-amd64", |
| 33 | "android": "android-amd64-emu", |
| 34 | "android-386": "android-386-emu", |
| 35 | "android-amd64": "android-amd64-emu", |
| 36 | "android-arm": "android-arm-corellium", |
| 37 | "android-arm64": "android-arm64-corellium", |
Carlos Amedee | c1822c7 | 2021-03-19 13:54:17 -0400 | [diff] [blame] | 38 | "arm": "linux-arm-aws", |
Carlos Amedee | 34b0d64 | 2021-03-19 14:53:06 -0400 | [diff] [blame] | 39 | "arm64": "linux-arm64-aws", |
Lynn Boger | 0364c52 | 2021-03-15 09:39:52 -0500 | [diff] [blame] | 40 | "darwin": "darwin-amd64-10_14", |
| 41 | "darwin-amd64": "darwin-amd64-10_14", |
| 42 | "darwin-arm64": "darwin-arm64-11_0-toothrot", |
| 43 | "ios-arm64": "ios-arm64-corellium", |
| 44 | "dragonfly": "dragonfly-amd64", |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 45 | "freebsd": "freebsd-amd64-12_2", |
| 46 | "freebsd-386": "freebsd-386-12_2", |
| 47 | "freebsd-amd64": "freebsd-amd64-12_2", |
Lynn Boger | 0364c52 | 2021-03-15 09:39:52 -0500 | [diff] [blame] | 48 | "freebsd-arm": "freebsd-arm-paulzhol", |
| 49 | "freebsd-arm64": "freebsd-arm64-dmgk", |
| 50 | "illumos": "illumos-amd64", |
| 51 | "ios": "ios-arm64-corellium", |
| 52 | "js": "js-wasm", |
| 53 | "linux": "linux-amd64", |
Carlos Amedee | c1822c7 | 2021-03-19 13:54:17 -0400 | [diff] [blame] | 54 | "linux-arm": "linux-arm-aws", |
Carlos Amedee | 34b0d64 | 2021-03-19 14:53:06 -0400 | [diff] [blame] | 55 | "linux-arm64": "linux-arm64-aws", |
Xiaodong Liu | 5eaa6e0 | 2021-09-02 15:51:28 +0800 | [diff] [blame^] | 56 | "linux-loong64": "linux-loong64-3a5000", |
Lynn Boger | 0364c52 | 2021-03-15 09:39:52 -0500 | [diff] [blame] | 57 | "linux-mips": "linux-mips-rtrk", |
| 58 | "linux-mips64": "linux-mips64-rtrk", |
| 59 | "linux-mips64le": "linux-mips64le-mengzhuo", |
| 60 | "linux-mipsle": "linux-mipsle-rtrk", |
| 61 | "linux-ppc64": "linux-ppc64-buildlet", |
| 62 | "linux-ppc64le": "linux-ppc64le-buildlet", |
| 63 | "linux-ppc64le-power9": "linux-ppc64le-power9osu", |
| 64 | "linux-riscv64": "linux-riscv64-jsing", |
| 65 | "linux-s390x": "linux-s390x-ibm", |
| 66 | "longtest": "linux-amd64-longtest", |
| 67 | "mac": "darwin-amd64-10_14", |
| 68 | "macos": "darwin-amd64-10_14", |
| 69 | "mips": "linux-mips-rtrk", |
| 70 | "mips64": "linux-mips64-rtrk", |
| 71 | "mips64le": "linux-mips64le-mengzhuo", |
| 72 | "mipsle": "linux-mipsle-rtrk", |
| 73 | "netbsd": "netbsd-amd64-9_0", |
| 74 | "netbsd-386": "netbsd-386-9_0", |
| 75 | "netbsd-amd64": "netbsd-amd64-9_0", |
| 76 | "netbsd-arm": "netbsd-arm-bsiegert", |
| 77 | "netbsd-arm64": "netbsd-arm64-bsiegert", |
| 78 | "nocgo": "linux-amd64-nocgo", |
| 79 | "openbsd": "openbsd-amd64-68", |
| 80 | "openbsd-386": "openbsd-386-68", |
| 81 | "openbsd-amd64": "openbsd-amd64-68", |
| 82 | "openbsd-arm": "openbsd-arm-jsing", |
| 83 | "openbsd-arm64": "openbsd-arm64-jsing", |
| 84 | "openbsd-mips64": "openbsd-mips64-jsing", |
| 85 | "plan9": "plan9-arm", |
| 86 | "plan9-386": "plan9-386-0intro", |
David du Colombier | 9d71121 | 2021-04-05 20:42:05 +0200 | [diff] [blame] | 87 | "plan9-amd64": "plan9-amd64-0intro", |
Lynn Boger | 0364c52 | 2021-03-15 09:39:52 -0500 | [diff] [blame] | 88 | "ppc64": "linux-ppc64-buildlet", |
| 89 | "ppc64le": "linux-ppc64le-buildlet", |
| 90 | "ppc64lep9": "linux-ppc64le-power9osu", |
| 91 | "riscv64": "linux-riscv64-jsing", |
| 92 | "s390x": "linux-s390x-ibm", |
| 93 | "solaris": "solaris-amd64-oraclerel", |
| 94 | "solaris-amd64": "solaris-amd64-oraclerel", |
| 95 | "wasm": "js-wasm", |
| 96 | "windows": "windows-amd64-2016", |
| 97 | "windows-386": "windows-386-2008", |
| 98 | "windows-amd64": "windows-amd64-2016", |
| 99 | "windows-arm": "windows-arm-zx2c4", |
Alexander Rakoczy | 76eb641 | 2021-06-29 11:40:03 -0400 | [diff] [blame] | 100 | "windows-arm64": "windows-arm64-10", |
Brad Fitzpatrick | aab8504 | 2019-10-16 06:02:29 +0000 | [diff] [blame] | 101 | } |
| 102 | |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 103 | // Builders are the different build configurations. |
| 104 | // The keys are like "darwin-amd64" or "linux-386-387". |
| 105 | // This map should not be modified by other packages. |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 106 | // Initialization happens below, via calls to addBuilder. |
Brad Fitzpatrick | 5eb896e | 2018-10-26 17:52:25 +0000 | [diff] [blame] | 107 | var Builders = map[string]*BuildConfig{} |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 108 | |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 109 | // Hosts contains the names and configs of all the types of |
| 110 | // buildlets. They can be VMs, containers, or dedicated machines. |
| 111 | var Hosts = map[string]*HostConfig{ |
Carlos Amedee | 4386493 | 2021-08-16 15:35:39 -0400 | [diff] [blame] | 112 | "host-linux-bullseye": &HostConfig{ |
| 113 | Notes: "Debian Bullseye", |
| 114 | ContainerImage: "linux-x86-bullseye:latest", |
| 115 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 116 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 117 | SSHUsername: "root", |
| 118 | }, |
Carlos Amedee | 81f4b09 | 2020-11-02 15:11:10 -0500 | [diff] [blame] | 119 | "host-linux-buster": &HostConfig{ |
| 120 | Notes: "Debian Buster", |
| 121 | ContainerImage: "linux-x86-buster:latest", |
| 122 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 123 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 124 | SSHUsername: "root", |
| 125 | }, |
Brad Fitzpatrick | ade2862 | 2018-05-14 17:22:45 +0000 | [diff] [blame] | 126 | "host-linux-jessie": &HostConfig{ |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 127 | Notes: "Debian Jessie, our standard Linux container image.", |
Brad Fitzpatrick | ade2862 | 2018-05-14 17:22:45 +0000 | [diff] [blame] | 128 | ContainerImage: "linux-x86-jessie:latest", |
| 129 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 130 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 131 | SSHUsername: "root", |
| 132 | }, |
| 133 | "host-linux-stretch": &HostConfig{ |
| 134 | Notes: "Debian Stretch", |
| 135 | ContainerImage: "linux-x86-stretch:latest", |
Brad Fitzpatrick | 61ce0be | 2019-03-14 16:06:57 +0000 | [diff] [blame] | 136 | machineType: "n1-standard-4", // 4 vCPUs, 15 GB mem |
| 137 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 138 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 139 | SSHUsername: "root", |
| 140 | }, |
| 141 | "host-linux-stretch-morecpu": &HostConfig{ |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 142 | Notes: "Debian Stretch, but on n1-highcpu-16", |
Brad Fitzpatrick | 61ce0be | 2019-03-14 16:06:57 +0000 | [diff] [blame] | 143 | ContainerImage: "linux-x86-stretch:latest", |
Dmitri Shuralyov | 3235619 | 2019-08-30 14:27:13 -0400 | [diff] [blame] | 144 | machineType: "n1-highcpu-16", // 16 vCPUs, 14.4 GB mem |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 145 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 146 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 147 | SSHUsername: "root", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 148 | }, |
Brad Fitzpatrick | 0261b66 | 2019-02-15 22:05:42 +0000 | [diff] [blame] | 149 | "host-linux-stretch-vmx": &HostConfig{ |
| 150 | Notes: "Debian Stretch w/ Nested Virtualization (VMX CPU bit) enabled, for testing", |
| 151 | ContainerImage: "linux-x86-stretch:latest", |
| 152 | NestedVirt: true, |
| 153 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 154 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 155 | SSHUsername: "root", |
| 156 | }, |
Brad Fitzpatrick | 46ecb43 | 2016-09-23 20:44:43 +0000 | [diff] [blame] | 157 | "host-linux-armhf-cross": &HostConfig{ |
Brad Fitzpatrick | 4ef0deb | 2019-10-19 04:02:04 +0000 | [diff] [blame] | 158 | Notes: "Debian with armhf cross-compiler, built from env/crosscompile/linux-armhf", |
| 159 | ContainerImage: "linux-armhf-cross:latest", |
Brad Fitzpatrick | 46ecb43 | 2016-09-23 20:44:43 +0000 | [diff] [blame] | 160 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 161 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 162 | }, |
Jeff Wendling | 02f25ac | 2017-03-23 09:46:39 -0600 | [diff] [blame] | 163 | "host-linux-armel-cross": &HostConfig{ |
Brad Fitzpatrick | 4ef0deb | 2019-10-19 04:02:04 +0000 | [diff] [blame] | 164 | Notes: "Debian with armel cross-compiler, from env/crosscompile/linux-armel", |
| 165 | ContainerImage: "linux-armel-cross:latest", |
Jeff Wendling | 02f25ac | 2017-03-23 09:46:39 -0600 | [diff] [blame] | 166 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 167 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 168 | }, |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 169 | "host-linux-amd64-localdev": &HostConfig{ |
| 170 | IsReverse: true, |
| 171 | ExpectNum: 0, |
| 172 | Notes: "for localhost development of buildlets/gomote/coordinator only", |
| 173 | SSHUsername: os.Getenv("USER"), |
| 174 | }, |
Brad Fitzpatrick | 4b011fe | 2018-05-11 05:54:32 +0000 | [diff] [blame] | 175 | "host-js-wasm": &HostConfig{ |
| 176 | Notes: "Container with node.js for testing js/wasm.", |
| 177 | ContainerImage: "js-wasm:latest", |
| 178 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 179 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 180 | SSHUsername: "root", |
Brad Fitzpatrick | 4b011fe | 2018-05-11 05:54:32 +0000 | [diff] [blame] | 181 | }, |
Brad Fitzpatrick | 76cf968 | 2019-12-04 21:27:28 +0000 | [diff] [blame] | 182 | "host-s390x-cross": &HostConfig{ |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 183 | Notes: "Container with s390x cross-compiler.", |
Brad Fitzpatrick | 4ef0deb | 2019-10-19 04:02:04 +0000 | [diff] [blame] | 184 | ContainerImage: "linux-s390x-cross:latest", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 185 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 186 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 187 | }, |
Jess Frazelle | 5c1740d | 2016-12-02 11:14:12 -0800 | [diff] [blame] | 188 | "host-linux-x86-alpine": &HostConfig{ |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 189 | Notes: "Alpine container", |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 190 | ContainerImage: "linux-x86-alpine:latest", |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 191 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.linux-amd64-static", |
Jess Frazelle | 5c1740d | 2016-12-02 11:14:12 -0800 | [diff] [blame] | 192 | env: []string{"GOROOT_BOOTSTRAP=/usr/lib/go"}, |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 193 | SSHUsername: "root", |
Jess Frazelle | 5c1740d | 2016-12-02 11:14:12 -0800 | [diff] [blame] | 194 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 195 | "host-linux-clang": &HostConfig{ |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 196 | Notes: "Container with clang.", |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 197 | ContainerImage: "linux-x86-clang:latest", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 198 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 199 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 200 | SSHUsername: "root", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 201 | }, |
| 202 | "host-linux-sid": &HostConfig{ |
Brad Fitzpatrick | 171a17d | 2017-04-12 01:54:09 +0000 | [diff] [blame] | 203 | Notes: "Debian sid, updated occasionally.", |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 204 | ContainerImage: "linux-x86-sid:latest", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 205 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 206 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 207 | SSHUsername: "root", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 208 | }, |
Brad Fitzpatrick | 07bb129 | 2019-05-08 16:25:38 +0000 | [diff] [blame] | 209 | "host-linux-fedora": &HostConfig{ |
| 210 | Notes: "Fedora 30", |
| 211 | ContainerImage: "linux-x86-fedora:latest", |
| 212 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 213 | env: []string{"GOROOT_BOOTSTRAP=/goboot"}, |
Brad Fitzpatrick | c7f36d0 | 2019-11-15 20:31:23 +0000 | [diff] [blame] | 214 | SSHUsername: "root", |
Brad Fitzpatrick | 07bb129 | 2019-05-08 16:25:38 +0000 | [diff] [blame] | 215 | }, |
Joel Sing | 8ea6a2c | 2020-09-28 04:25:41 +1000 | [diff] [blame] | 216 | "host-linux-riscv64-joelsing": &HostConfig{ |
| 217 | Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.", |
| 218 | IsReverse: true, |
| 219 | ExpectNum: 1, |
| 220 | OwnerGithub: "4a6f656c", |
| 221 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, |
| 222 | }, |
Meng Zhuo | 7fa5d57 | 2021-08-27 12:26:14 +0800 | [diff] [blame] | 223 | "host-linux-riscv64-unmatched": &HostConfig{ |
| 224 | Notes: "SiFive HiFive Unmatched RISC-V board. 16 GB RAM, 4 cores.", |
| 225 | IsReverse: true, |
| 226 | ExpectNum: 1, |
| 227 | OwnerGithub: "mengzhuo", |
| 228 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, |
| 229 | }, |
Brad Fitzpatrick | 773364d | 2019-11-12 06:19:21 +0000 | [diff] [blame] | 230 | "host-linux-riscv64-unleashed": &HostConfig{ |
| 231 | Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.", |
| 232 | IsReverse: true, |
| 233 | ExpectNum: 1, // for now. Joel's board might join the party later. |
| 234 | OwnerGithub: "bradfitz", // at home |
| 235 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, |
| 236 | }, |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 237 | "host-openbsd-amd64-64": &HostConfig{ |
Brad Fitzpatrick | d3ddf67 | 2019-01-30 05:01:54 +0000 | [diff] [blame] | 238 | VMImage: "openbsd-amd64-64-190129a", |
Brad Fitzpatrick | e9fe3dc | 2019-01-30 17:13:07 +0000 | [diff] [blame] | 239 | MinCPUPlatform: "Intel Skylake", // for better TSC? Maybe? see Issue 29223. builds faster at least. |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 240 | machineType: "n1-highcpu-4", |
Brad Fitzpatrick | 336cc41 | 2019-11-15 17:46:02 +0000 | [diff] [blame] | 241 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-amd64", |
Bryan C. Mills | 888c71d | 2019-03-06 14:45:35 -0500 | [diff] [blame] | 242 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-amd64-go1_12.tar.gz", |
Dmitri Shuralyov | 31ed75f | 2018-10-26 13:05:59 -0400 | [diff] [blame] | 243 | Notes: "OpenBSD 6.4 with hw.smt=1; GCE VM is built from script in build/env/openbsd-amd64", |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 244 | SSHUsername: "gopher", |
| 245 | }, |
| 246 | "host-openbsd-386-64": &HostConfig{ |
Dmitri Shuralyov | 24469dd | 2018-10-19 15:50:28 -0400 | [diff] [blame] | 247 | VMImage: "openbsd-386-64", |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 248 | machineType: "n1-highcpu-4", |
Brad Fitzpatrick | 336cc41 | 2019-11-15 17:46:02 +0000 | [diff] [blame] | 249 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-386", |
Bryan C. Mills | 888c71d | 2019-03-06 14:45:35 -0500 | [diff] [blame] | 250 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-386-go1_12.tar.gz", |
Dmitri Shuralyov | 24469dd | 2018-10-19 15:50:28 -0400 | [diff] [blame] | 251 | Notes: "OpenBSD 6.4; GCE VM is built from script in build/env/openbsd-386", |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 252 | SSHUsername: "gopher", |
| 253 | }, |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 254 | "host-openbsd-amd64-68": &HostConfig{ |
Dmitri Shuralyov | c7c6787 | 2020-12-17 23:53:39 -0500 | [diff] [blame] | 255 | VMImage: "openbsd-amd64-68-v3", // v3 adds 009_exit syspatch; see golang.org/cl/278732. |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 256 | machineType: "n1-highcpu-4", |
| 257 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-amd64", |
| 258 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-amd64-go1_12.tar.gz", |
Dmitri Shuralyov | fc1f3f8 | 2020-12-10 16:17:58 -0500 | [diff] [blame] | 259 | Notes: "OpenBSD 6.8 (with 009_exit syspatch); GCE VM is built from script in build/env/openbsd-amd64", |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 260 | SSHUsername: "gopher", |
| 261 | }, |
| 262 | "host-openbsd-386-68": &HostConfig{ |
Dmitri Shuralyov | c7c6787 | 2020-12-17 23:53:39 -0500 | [diff] [blame] | 263 | VMImage: "openbsd-386-68-v3", // v3 adds 009_exit syspatch; see golang.org/cl/278732. |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 264 | machineType: "n1-highcpu-4", |
| 265 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-386", |
| 266 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-386-go1_12.tar.gz", |
Dmitri Shuralyov | fc1f3f8 | 2020-12-10 16:17:58 -0500 | [diff] [blame] | 267 | Notes: "OpenBSD 6.8 (with 009_exit syspatch); GCE VM is built from script in build/env/openbsd-386", |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 268 | SSHUsername: "gopher", |
| 269 | }, |
Joel Sing | 23861f9 | 2019-08-31 03:09:05 +1000 | [diff] [blame] | 270 | "host-openbsd-arm-joelsing": &HostConfig{ |
| 271 | IsReverse: true, |
| 272 | ExpectNum: 1, |
| 273 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, |
| 274 | OwnerGithub: "4a6f656c", |
| 275 | }, |
Joel Sing | b91348e | 2020-08-21 04:42:01 +1000 | [diff] [blame] | 276 | "host-openbsd-arm64-joelsing": &HostConfig{ |
| 277 | IsReverse: true, |
| 278 | ExpectNum: 1, |
| 279 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, |
| 280 | OwnerGithub: "4a6f656c", |
| 281 | }, |
Joel Sing | 18a54c6 | 2020-08-24 02:02:40 +1000 | [diff] [blame] | 282 | "host-openbsd-mips64-joelsing": &HostConfig{ |
| 283 | IsReverse: true, |
| 284 | ExpectNum: 1, |
| 285 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, |
| 286 | OwnerGithub: "4a6f656c", |
| 287 | }, |
Brad Fitzpatrick | 05d9e9b | 2018-09-27 23:43:25 +0000 | [diff] [blame] | 288 | "host-freebsd-11_2": &HostConfig{ |
| 289 | VMImage: "freebsd-amd64-112", |
| 290 | Notes: "FreeBSD 11.2; GCE VM is built from script in build/env/freebsd-amd64", |
| 291 | machineType: "n1-highcpu-4", |
| 292 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64", |
| 293 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz", |
| 294 | SSHUsername: "gopher", |
| 295 | }, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 296 | "host-freebsd-11_4": &HostConfig{ |
| 297 | VMImage: "freebsd-amd64-114", |
| 298 | Notes: "FreeBSD 11.4; GCE VM is built from script in build/env/freebsd-amd64", |
| 299 | machineType: "n1-highcpu-4", |
| 300 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64", |
| 301 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz", |
| 302 | SSHUsername: "gopher", |
| 303 | }, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 304 | "host-freebsd-12_2": &HostConfig{ |
| 305 | VMImage: "freebsd-amd64-122", |
| 306 | Notes: "FreeBSD 12.2; GCE VM is built from script in build/env/freebsd-amd64", |
| 307 | machineType: "n1-highcpu-4", |
| 308 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64", |
| 309 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz", |
| 310 | SSHUsername: "gopher", |
| 311 | }, |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 312 | "host-freebsd-12_2-big": &HostConfig{ |
| 313 | VMImage: "freebsd-amd64-122", |
| 314 | Notes: "Same as host-freebsd-12_2, but on n1-highcpu-16", |
Dmitri Shuralyov | 43ea694 | 2021-02-19 12:17:28 -0500 | [diff] [blame] | 315 | machineType: "n1-highcpu-16", // 16 vCPUs, 14.4 GB mem |
| 316 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64", |
| 317 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz", |
| 318 | SSHUsername: "gopher", |
| 319 | }, |
Dmitri Shuralyov | 219acbf | 2020-04-02 08:55:30 -0400 | [diff] [blame] | 320 | "host-netbsd-amd64-9_0": &HostConfig{ |
| 321 | VMImage: "netbsd-amd64-9-0-2019q4", |
| 322 | Notes: "NetBSD 9.0; GCE VM is built from script in build/env/netbsd-amd64", |
| 323 | machineType: "n1-highcpu-4", |
| 324 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.netbsd-amd64", |
| 325 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-netbsd-amd64-2da6b33.tar.gz", |
| 326 | SSHUsername: "root", |
| 327 | }, |
| 328 | "host-netbsd-386-9_0": &HostConfig{ |
| 329 | VMImage: "netbsd-i386-9-0-2019q4", |
| 330 | Notes: "NetBSD 9.0; GCE VM is built from script in build/env/netbsd-386", |
| 331 | machineType: "n1-highcpu-4", |
| 332 | buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.netbsd-386", |
| 333 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-netbsd-386-0b3b511.tar.gz", |
| 334 | SSHUsername: "root", |
| 335 | }, |
Benny Siegert | ebee6e9 | 2019-03-19 14:28:04 +0100 | [diff] [blame] | 336 | "host-netbsd-arm-bsiegert": &HostConfig{ |
| 337 | IsReverse: true, |
| 338 | ExpectNum: 1, |
| 339 | env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go112"}, |
| 340 | OwnerGithub: "bsiegert", |
| 341 | }, |
Benny Siegert | 7c9f64d | 2020-08-18 20:42:30 +0200 | [diff] [blame] | 342 | "host-netbsd-arm64-bsiegert": &HostConfig{ |
| 343 | IsReverse: true, |
| 344 | ExpectNum: 1, |
| 345 | env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go114"}, |
| 346 | OwnerGithub: "bsiegert", |
| 347 | }, |
Brad Fitzpatrick | 0babffa | 2019-11-05 18:55:17 +0000 | [diff] [blame] | 348 | "host-dragonfly-amd64-master": &HostConfig{ |
| 349 | IsReverse: true, |
| 350 | ExpectNum: 1, |
| 351 | Notes: "DragonFly BSD master, run by DragonFly team", |
| 352 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, |
Antonio Huete Jimenez | c34742b | 2020-05-05 19:18:12 +0000 | [diff] [blame] | 353 | SSHUsername: "root", |
Brad Fitzpatrick | 0babffa | 2019-11-05 18:55:17 +0000 | [diff] [blame] | 354 | OwnerGithub: "tuxillo", |
Brad Fitzpatrick | e47c447 | 2017-08-05 22:56:18 +0000 | [diff] [blame] | 355 | }, |
| 356 | "host-freebsd-arm-paulzhol": &HostConfig{ |
Brad Fitzpatrick | 6d1cfea | 2019-11-06 20:34:49 +0000 | [diff] [blame] | 357 | IsReverse: true, |
| 358 | ExpectNum: 1, |
| 359 | Notes: "Cubiboard2 1Gb RAM dual-core Cortex-A7 (Allwinner A20), FreeBSD 11.1-RELEASE", |
| 360 | env: []string{"GOROOT_BOOTSTRAP=/usr/home/paulzhol/go1.4"}, |
| 361 | OwnerGithub: "paulzhol", |
Brad Fitzpatrick | e47c447 | 2017-08-05 22:56:18 +0000 | [diff] [blame] | 362 | }, |
Dmitri Goutnik | 39f3d49 | 2019-10-03 07:56:19 -0500 | [diff] [blame] | 363 | "host-freebsd-arm64-dmgk": &HostConfig{ |
| 364 | IsReverse: true, |
| 365 | ExpectNum: 1, |
| 366 | Notes: "AWS EC2 a1.large 2 vCPU 4GiB RAM, FreeBSD 12.1-STABLE", |
| 367 | env: []string{"GOROOT_BOOTSTRAP=/usr/home/builder/gobootstrap"}, |
| 368 | OwnerGithub: "dmgk", |
| 369 | }, |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 370 | "host-plan9-arm-0intro": &HostConfig{ |
| 371 | IsReverse: true, |
| 372 | ExpectNum: 1, |
| 373 | Notes: "Raspberry Pi 3 Model B, Plan 9 from Bell Labs", |
| 374 | OwnerGithub: "0intro", |
| 375 | }, |
| 376 | "host-plan9-amd64-0intro": &HostConfig{ |
| 377 | IsReverse: true, |
| 378 | ExpectNum: 1, |
David du Colombier | 9d71121 | 2021-04-05 20:42:05 +0200 | [diff] [blame] | 379 | Notes: "QEMU VM, Plan 9 from Bell Labs, 9k kernel", |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 380 | OwnerGithub: "0intro", |
| 381 | }, |
David du Colombier | 7373b40 | 2019-05-09 18:52:40 +0200 | [diff] [blame] | 382 | "host-plan9-386-0intro": &HostConfig{ |
| 383 | IsReverse: true, |
| 384 | ExpectNum: 1, |
David du Colombier | 9d71121 | 2021-04-05 20:42:05 +0200 | [diff] [blame] | 385 | Notes: "QEMU VM, Plan 9 from Bell Labs", |
David du Colombier | 7373b40 | 2019-05-09 18:52:40 +0200 | [diff] [blame] | 386 | OwnerGithub: "0intro", |
| 387 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 388 | "host-plan9-386-gce": &HostConfig{ |
Brad Fitzpatrick | a865ae3 | 2019-01-18 22:19:58 +0000 | [diff] [blame] | 389 | VMImage: "plan9-386-v7", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 390 | Notes: "Plan 9 from 0intro; GCE VM is built from script in build/env/plan9-386", |
| 391 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.plan9-386", |
| 392 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-plan9-386.tar.gz", |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 393 | |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 394 | // We *were* using n1-standard-1 because Plan 9 can only |
| 395 | // reliably use a single CPU. Using 2 or 4 and we see |
| 396 | // test failures. See: |
| 397 | // https://golang.org/issue/8393 |
| 398 | // https://golang.org/issue/9491 |
| 399 | // n1-standard-1 has 3.6 GB of memory which WAS (see below) |
| 400 | // overkill (userspace probably only sees 2GB anyway), |
| 401 | // but it's the cheapest option. And plenty to keep |
| 402 | // our ~250 MB of inputs+outputs in its ramfs. |
| 403 | // |
| 404 | // But the docs says "For the n1 series of machine |
| 405 | // types, a virtual CPU is implemented as a single |
| 406 | // hyperthread on a 2.6GHz Intel Sandy Bridge Xeon or |
| 407 | // Intel Ivy Bridge Xeon (or newer) processor. This |
| 408 | // means that the n1-standard-2 machine type will see |
| 409 | // a whole physical core." |
| 410 | // |
| 411 | // ... so we used n1-highcpu-2 (1.80 RAM, still |
| 412 | // plenty), just so we can get 1 whole core for the |
| 413 | // single-core Plan 9. It will see 2 virtual cores and |
| 414 | // only use 1, but we hope that 1 will be more powerful |
| 415 | // and we'll stop timing out on tests. |
| 416 | machineType: "n1-highcpu-4", |
Brad Fitzpatrick | 326c713 | 2019-01-18 16:14:12 +0000 | [diff] [blame] | 417 | env: []string{"GO_TEST_TIMEOUT_SCALE=3"}, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 418 | }, |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 419 | "host-windows-amd64-2008": &HostConfig{ |
Jeff Johnson | 114c42e | 2018-07-02 10:49:55 -0700 | [diff] [blame] | 420 | VMImage: "windows-amd64-server-2008r2-v7", |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 421 | machineType: "n1-highcpu-4", // 4 vCPUs, 3.6 GB mem |
| 422 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64", |
| 423 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz", |
| 424 | SSHUsername: "gopher", |
| 425 | }, |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 426 | "host-windows-amd64-2012": &HostConfig{ |
Jeff Johnson | 114c42e | 2018-07-02 10:49:55 -0700 | [diff] [blame] | 427 | VMImage: "windows-amd64-server-2012r2-v7", |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 428 | machineType: "n1-highcpu-4", // 4 vCPUs, 3.6 GB mem |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 429 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64", |
| 430 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz", |
Jeff Johnson | a328a79 | 2017-07-31 16:55:28 -0700 | [diff] [blame] | 431 | SSHUsername: "gopher", |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 432 | }, |
| 433 | "host-windows-amd64-2016": &HostConfig{ |
Jeff Johnson | 114c42e | 2018-07-02 10:49:55 -0700 | [diff] [blame] | 434 | VMImage: "windows-amd64-server-2016-v7", |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 435 | machineType: "n1-highcpu-4", // 4 vCPUs, 3.6 GB mem |
| 436 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64", |
| 437 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz", |
| 438 | SSHUsername: "gopher", |
| 439 | }, |
| 440 | "host-windows-amd64-2016-big": &HostConfig{ |
Dmitri Shuralyov | 05d2263 | 2020-01-06 23:55:13 -0500 | [diff] [blame] | 441 | Notes: "Same as host-windows-amd64-2016, but on n1-highcpu-16", |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 442 | VMImage: "windows-amd64-server-2016-v7", |
Dmitri Shuralyov | 05d2263 | 2020-01-06 23:55:13 -0500 | [diff] [blame] | 443 | machineType: "n1-highcpu-16", // 16 vCPUs, 14.4 GB mem |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 444 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-amd64", |
| 445 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-windows-amd64.tar.gz", |
Jeff Johnson | a328a79 | 2017-07-31 16:55:28 -0700 | [diff] [blame] | 446 | SSHUsername: "gopher", |
Brad Fitzpatrick | acd9ecf | 2017-04-21 19:35:28 +0000 | [diff] [blame] | 447 | }, |
Jason A. Donenfeld | 5d75ed7 | 2020-11-20 18:35:33 +0100 | [diff] [blame] | 448 | "host-windows-arm64-zx2c4": &HostConfig{ |
| 449 | IsReverse: true, |
| 450 | ExpectNum: 1, |
| 451 | OwnerGithub: "zx2c4", |
| 452 | env: []string{"GOROOT_BOOTSTRAP=C:\\Program Files (Arm)\\Go"}, |
| 453 | }, |
Alexander Rakoczy | 666c18f | 2021-06-15 16:42:51 -0400 | [diff] [blame] | 454 | "host-windows-arm64-mini": &HostConfig{ |
| 455 | Notes: "macOS hosting Windows 10 in qemu with HVM acceleration.", |
| 456 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-arm64", |
Alexander Rakoczy | 666c18f | 2021-06-15 16:42:51 -0400 | [diff] [blame] | 457 | goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-windows-arm64-f22ec5.tar.gz", |
| 458 | IsReverse: true, |
Alexander Rakoczy | 3a6c4f3 | 2021-08-25 15:50:51 -0400 | [diff] [blame] | 459 | ExpectNum: 7, |
Alexander Rakoczy | 666c18f | 2021-06-15 16:42:51 -0400 | [diff] [blame] | 460 | }, |
Brad Fitzpatrick | 409147c | 2017-01-18 22:45:12 +0000 | [diff] [blame] | 461 | "host-darwin-10_12": &HostConfig{ |
| 462 | IsReverse: true, |
Carlos Amedee | b7678aa | 2021-04-06 11:28:57 -0400 | [diff] [blame] | 463 | ExpectNum: 3, |
Brad Fitzpatrick | 409147c | 2017-01-18 22:45:12 +0000 | [diff] [blame] | 464 | Notes: "MacStadium OS X 10.12 VM under VMWare ESXi", |
| 465 | env: []string{ |
| 466 | "GOROOT_BOOTSTRAP=/Users/gopher/go1.4", |
| 467 | }, |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 468 | SSHUsername: "gopher", |
| 469 | HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate |
Brad Fitzpatrick | 409147c | 2017-01-18 22:45:12 +0000 | [diff] [blame] | 470 | }, |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 471 | "host-darwin-10_14": &HostConfig{ |
| 472 | IsReverse: true, |
Carlos Amedee | b7678aa | 2021-04-06 11:28:57 -0400 | [diff] [blame] | 473 | ExpectNum: 3, |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 474 | Notes: "MacStadium macOS Mojave (10.14) VM under VMWare ESXi", |
| 475 | env: []string{ |
| 476 | "GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1 |
| 477 | }, |
| 478 | SSHUsername: "gopher", |
| 479 | HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate |
| 480 | }, |
Carlos Amedee | d6dec9c | 2019-11-19 14:55:01 +0000 | [diff] [blame] | 481 | "host-darwin-10_15": &HostConfig{ |
| 482 | IsReverse: true, |
Carlos Amedee | b7678aa | 2021-04-06 11:28:57 -0400 | [diff] [blame] | 483 | ExpectNum: 5, |
Carlos Amedee | d6dec9c | 2019-11-19 14:55:01 +0000 | [diff] [blame] | 484 | Notes: "MacStadium macOS Catalina (10.15) VM under VMWare ESXi", |
| 485 | env: []string{ |
| 486 | "GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1 |
| 487 | }, |
| 488 | SSHUsername: "gopher", |
| 489 | HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate |
| 490 | }, |
Carlos Amedee | d576fd3 | 2021-01-29 15:47:13 -0500 | [diff] [blame] | 491 | "host-darwin-amd64-11_0": &HostConfig{ |
| 492 | IsReverse: true, |
Carlos Amedee | b7678aa | 2021-04-06 11:28:57 -0400 | [diff] [blame] | 493 | ExpectNum: 5, |
Carlos Amedee | d576fd3 | 2021-01-29 15:47:13 -0500 | [diff] [blame] | 494 | Notes: "MacStadium macOS Big Sur (11.0) VM under VMWare ESXi", |
| 495 | env: []string{ |
| 496 | "GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.13.4 |
| 497 | }, |
| 498 | SSHUsername: "gopher", |
| 499 | HermeticReverse: true, // we destroy the VM when done & let cmd/makemac recreate |
| 500 | }, |
Alexander Rakoczy | 9ad13ba | 2020-12-15 12:58:50 -0500 | [diff] [blame] | 501 | "host-darwin-arm64-11_0-toothrot": &HostConfig{ |
| 502 | IsReverse: true, |
| 503 | ExpectNum: 2, |
| 504 | Notes: "macOS Big Sur (11.0) ARM64 (M1). Mac mini", |
| 505 | env: []string{ |
| 506 | "GOROOT_BOOTSTRAP=/Users/gopher/goboot", |
| 507 | }, |
| 508 | SSHUsername: "gopher", |
| 509 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 510 | "host-linux-s390x": &HostConfig{ |
Brad Fitzpatrick | 6d1cfea | 2019-11-06 20:34:49 +0000 | [diff] [blame] | 511 | Notes: "run by IBM", |
Ruixin Bao | 97266ed | 2020-12-01 07:06:13 -0800 | [diff] [blame] | 512 | OwnerGithub: "ruixin-bao", |
Brad Fitzpatrick | 6d1cfea | 2019-11-06 20:34:49 +0000 | [diff] [blame] | 513 | IsReverse: true, |
| 514 | env: []string{"GOROOT_BOOTSTRAP=/var/buildlet/go-linux-s390x-bootstrap"}, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 515 | }, |
Brad Fitzpatrick | f8a3106 | 2016-10-06 20:30:58 +0000 | [diff] [blame] | 516 | "host-linux-ppc64-osu": &HostConfig{ |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 517 | Notes: "Debian jessie; run by Go team on osuosl.org", |
| 518 | IsReverse: true, |
| 519 | ExpectNum: 5, |
| 520 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"}, |
Brad Fitzpatrick | 4c6d3ea | 2019-10-10 17:44:44 +0000 | [diff] [blame] | 521 | SSHUsername: "root", |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 522 | HermeticReverse: false, // TODO: run in chroots with overlayfs? https://github.com/golang/go/issues/34830#issuecomment-543386764 |
Brad Fitzpatrick | f8a3106 | 2016-10-06 20:30:58 +0000 | [diff] [blame] | 523 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 524 | "host-linux-ppc64le-osu": &HostConfig{ |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 525 | Notes: "Debian Buster; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 526 | IsReverse: true, |
| 527 | ExpectNum: 5, |
| 528 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"}, |
Brad Fitzpatrick | 4c6d3ea | 2019-10-10 17:44:44 +0000 | [diff] [blame] | 529 | SSHUsername: "root", |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 530 | HermeticReverse: true, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 531 | }, |
Carlos Eduardo Seo | 202164e | 2019-02-25 17:05:12 -0300 | [diff] [blame] | 532 | "host-linux-ppc64le-power9-osu": &HostConfig{ |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 533 | Notes: "Debian Buster; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", |
Carlos Eduardo Seo | 202164e | 2019-02-25 17:05:12 -0300 | [diff] [blame] | 534 | IsReverse: true, |
Carlos Eduardo Seo | c373c47 | 2020-01-27 15:28:06 -0300 | [diff] [blame] | 535 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap", "GOPPC64=power9"}, |
Carlos Eduardo Seo | a07c53d | 2019-10-10 16:48:15 -0300 | [diff] [blame] | 536 | SSHUsername: "root", |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 537 | HermeticReverse: true, |
Carlos Eduardo Seo | 202164e | 2019-02-25 17:05:12 -0300 | [diff] [blame] | 538 | }, |
Brad Fitzpatrick | ad0e3fb | 2017-04-06 22:16:28 +0000 | [diff] [blame] | 539 | "host-linux-arm64-packet": &HostConfig{ |
Brad Fitzpatrick | b568f66 | 2019-10-15 04:44:49 +0000 | [diff] [blame] | 540 | Notes: "On 96 core packet.net host (Xenial) in Docker containers (Debian Buster); run by Go team. See x/build/env/linux-arm64/packet", |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 541 | IsReverse: true, |
| 542 | HermeticReverse: true, |
Alexander Rakoczy | f9092bb | 2019-12-16 17:14:27 -0500 | [diff] [blame] | 543 | ExpectNum: 8, |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 544 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"}, |
| 545 | SSHUsername: "root", |
Brad Fitzpatrick | ad0e3fb | 2017-04-06 22:16:28 +0000 | [diff] [blame] | 546 | }, |
Carlos Amedee | 372ecfe | 2020-05-04 13:13:17 -0400 | [diff] [blame] | 547 | "host-linux-arm64-aws": &HostConfig{ |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 548 | Notes: "Debian Buster, EC2 arm64 instance. See x/build/env/linux-arm64/aws", |
Carlos Amedee | 8c83150 | 2020-10-28 17:23:17 -0400 | [diff] [blame] | 549 | VMImage: "ami-03089323a1d38e652", |
Carlos Amedee | 5e227ac | 2020-05-19 17:26:14 -0400 | [diff] [blame] | 550 | ContainerImage: "gobuilder-arm64-aws:latest", |
| 551 | machineType: "m6g.xlarge", |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 552 | isEC2: true, |
Carlos Amedee | 372ecfe | 2020-05-04 13:13:17 -0400 | [diff] [blame] | 553 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"}, |
Carlos Amedee | d72655c | 2020-10-08 16:49:48 -0400 | [diff] [blame] | 554 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-arm64", |
| 555 | SSHUsername: "root", |
| 556 | }, |
| 557 | "host-linux-arm-aws": &HostConfig{ |
| 558 | Notes: "Debian Buster, EC2 arm instance. See x/build/env/linux-arm/aws", |
| 559 | VMImage: "ami-07409163bccd5ac4d", |
| 560 | ContainerImage: "gobuilder-arm-aws:latest", |
| 561 | machineType: "m6g.xlarge", |
| 562 | isEC2: true, |
| 563 | env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"}, |
| 564 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-arm", |
Carlos Amedee | 4e08f9c | 2020-09-28 15:42:57 -0400 | [diff] [blame] | 565 | SSHUsername: "root", |
Carlos Amedee | 372ecfe | 2020-05-04 13:13:17 -0400 | [diff] [blame] | 566 | }, |
Joshua M. Clulow | a022e90 | 2019-10-17 01:48:13 -0700 | [diff] [blame] | 567 | "host-illumos-amd64-jclulow": &HostConfig{ |
| 568 | Notes: "SmartOS base64@19.1.0 zone", |
| 569 | Owner: "josh@sysmgr.org", |
| 570 | OwnerGithub: "jclulow", |
| 571 | IsReverse: true, |
| 572 | ExpectNum: 1, |
| 573 | SSHUsername: "gobuild", |
| 574 | }, |
Shawn Walker-Salas | 22e055b | 2017-07-07 13:41:20 -0700 | [diff] [blame] | 575 | "host-solaris-oracle-amd64-oraclerel": &HostConfig{ |
| 576 | Notes: "Oracle Solaris amd64 Release System", |
Brad Fitzpatrick | bab2ff9 | 2019-11-06 16:59:20 +0000 | [diff] [blame] | 577 | Owner: "", |
| 578 | OwnerGithub: "rorth", // https://github.com/golang/go/issues/15581#issuecomment-550368581 |
Shawn Walker-Salas | 53a3d0e | 2017-06-27 10:11:15 -0700 | [diff] [blame] | 579 | IsReverse: true, |
| 580 | ExpectNum: 1, |
Shawn Walker-Salas | 821d1eb | 2017-07-31 13:58:19 -0700 | [diff] [blame] | 581 | env: []string{"GOROOT_BOOTSTRAP=/opt/golang/go-solaris-amd64-bootstrap"}, |
Shawn Walker-Salas | 53a3d0e | 2017-06-27 10:11:15 -0700 | [diff] [blame] | 582 | }, |
Xiaodong Liu | 5eaa6e0 | 2021-09-02 15:51:28 +0800 | [diff] [blame^] | 583 | "host-linux-loong64-3a5000": &HostConfig{ |
| 584 | Notes: "Loongson 3A5000 Box hosted by Loongson; loong64 is the short name of LoongArch 64 bit version", |
| 585 | OwnerGithub: "XiaodongLoong", |
| 586 | IsReverse: true, |
| 587 | ExpectNum: 5, |
| 588 | env: []string{ |
| 589 | "GOROOT_BOOTSTRAP=/usr/lib/go-1.15", |
| 590 | }, |
| 591 | }, |
Meng Zhuo | 8805279 | 2019-09-10 07:21:11 +0800 | [diff] [blame] | 592 | "host-linux-mipsle-mengzhuo": &HostConfig{ |
Meng Zhuo | bfc899a | 2021-08-31 10:55:47 +0800 | [diff] [blame] | 593 | Notes: "Loongson 3A Box hosted by Meng Zhuo; actually MIPS64le despite the name", |
Meng Zhuo | 8805279 | 2019-09-10 07:21:11 +0800 | [diff] [blame] | 594 | OwnerGithub: "mengzhuo", |
| 595 | IsReverse: true, |
| 596 | ExpectNum: 1, |
| 597 | env: []string{ |
| 598 | "GOROOT_BOOTSTRAP=/usr/lib/golang", |
| 599 | "GOMIPS64=hardfloat", |
| 600 | }, |
| 601 | }, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 602 | "host-linux-mips64le-rtrk": &HostConfig{ |
| 603 | Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", |
| 604 | OwnerGithub: "bogojevic", // and @milanknezevic. https://github.com/golang/go/issues/31217#issuecomment-547004892 |
| 605 | IsReverse: true, |
| 606 | ExpectNum: 1, |
| 607 | env: []string{ |
| 608 | "GOROOT_BOOTSTRAP=/usr/local/go-bootstrap", |
| 609 | }, |
| 610 | }, |
| 611 | "host-linux-mips64-rtrk": &HostConfig{ |
| 612 | Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", |
| 613 | OwnerGithub: "bogojevic", // and @milanknezevic. https://github.com/golang/go/issues/31217#issuecomment-547004892 |
| 614 | IsReverse: true, |
| 615 | ExpectNum: 1, |
| 616 | env: []string{ |
| 617 | "GOROOT_BOOTSTRAP=/usr/local/go-bootstrap", |
| 618 | }, |
| 619 | }, |
Elias Naur | 18919d6 | 2020-10-03 11:37:07 +0200 | [diff] [blame] | 620 | "host-ios-arm64-corellium-ios": &HostConfig{ |
Dmitri Shuralyov | 4986fa2 | 2020-08-19 13:15:55 -0400 | [diff] [blame] | 621 | Notes: "Virtual iOS devices hosted by Zenly on Corellium; see issues 31722 and 40523", |
Elias Naur | 6bebc8e | 2019-05-01 20:33:26 +0200 | [diff] [blame] | 622 | OwnerGithub: "znly", |
| 623 | IsReverse: true, |
Elias Naur | 3b7f115 | 2020-10-29 19:04:57 +0100 | [diff] [blame] | 624 | ExpectNum: 3, |
Elias Naur | 6bebc8e | 2019-05-01 20:33:26 +0200 | [diff] [blame] | 625 | env: []string{ |
Elias Naur | 18919d6 | 2020-10-03 11:37:07 +0200 | [diff] [blame] | 626 | "GOROOT_BOOTSTRAP=/var/mobile/go-ios-arm64-bootstrap", |
Elias Naur | 6bebc8e | 2019-05-01 20:33:26 +0200 | [diff] [blame] | 627 | }, |
| 628 | }, |
Elias Naur | 4d0f77a | 2019-05-01 22:28:43 +0200 | [diff] [blame] | 629 | "host-android-arm64-corellium-android": &HostConfig{ |
Dmitri Shuralyov | 4986fa2 | 2020-08-19 13:15:55 -0400 | [diff] [blame] | 630 | Notes: "Virtual Android devices hosted by Zenly on Corellium; see issues 31722 and 40523", |
Elias Naur | 4d0f77a | 2019-05-01 22:28:43 +0200 | [diff] [blame] | 631 | OwnerGithub: "znly", |
| 632 | IsReverse: true, |
Elias Naur | 3b7f115 | 2020-10-29 19:04:57 +0100 | [diff] [blame] | 633 | ExpectNum: 3, |
Elias Naur | 4d0f77a | 2019-05-01 22:28:43 +0200 | [diff] [blame] | 634 | env: []string{ |
| 635 | "GOROOT_BOOTSTRAP=/data/data/com.termux/files/home/go-android-arm64-bootstrap", |
| 636 | }, |
| 637 | }, |
Dmitri Shuralyov | c946330 | 2018-08-24 14:41:05 -0400 | [diff] [blame] | 638 | "host-aix-ppc64-osuosl": &HostConfig{ |
| 639 | Notes: "AIX 7.2 VM on OSU; run by Tony Reix", |
| 640 | OwnerGithub: "trex58", |
| 641 | IsReverse: true, |
| 642 | ExpectNum: 1, |
| 643 | env: []string{"GOROOT_BOOTSTRAP=/opt/freeware/lib/golang"}, |
| 644 | }, |
Brad Fitzpatrick | cfe14ab | 2019-02-25 20:35:29 +0000 | [diff] [blame] | 645 | "host-android-amd64-emu": &HostConfig{ |
| 646 | Notes: "Debian Buster w/ Android SDK + emulator (use nested virt)", |
Elias Naur | 974e90a | 2019-03-01 11:21:20 +0100 | [diff] [blame] | 647 | ContainerImage: "android-amd64-emu:bff27c0c9263", |
Brad Fitzpatrick | cfe14ab | 2019-02-25 20:35:29 +0000 | [diff] [blame] | 648 | KonletVMImage: "android-amd64-emu", |
| 649 | NestedVirt: true, |
| 650 | buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64", |
| 651 | env: []string{"GOROOT_BOOTSTRAP=/go1.4"}, |
| 652 | SSHUsername: "root", |
| 653 | }, |
Meng Zhuo | 2e05377 | 2020-11-25 00:44:38 +0800 | [diff] [blame] | 654 | "host-linux-amd64-wsl": &HostConfig{ |
| 655 | Notes: "Windows 10 WSL2 Ubuntu", |
| 656 | OwnerGithub: "mengzhuo", |
| 657 | IsReverse: true, |
Baokun Lee | a4cf489 | 2020-12-22 20:52:06 +0800 | [diff] [blame] | 658 | ExpectNum: 2, |
Meng Zhuo | 2e05377 | 2020-11-25 00:44:38 +0800 | [diff] [blame] | 659 | env: []string{"GOROOT_BOOTSTRAP=/usr/lib/go"}, |
| 660 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 661 | } |
| 662 | |
Brad Fitzpatrick | ad7af46 | 2019-10-19 02:49:53 +0000 | [diff] [blame] | 663 | // CrossCompileConfig describes how to cross-compile a build on a |
| 664 | // faster host. |
| 665 | type CrossCompileConfig struct { |
| 666 | // CompileHostType is the host type to use for compilation |
| 667 | CompileHostType string |
| 668 | |
| 669 | // CCForTarget is the CC_FOR_TARGET environment variable. |
| 670 | CCForTarget string |
| 671 | |
| 672 | // GOARM is any GOARM= environment variable. |
| 673 | GOARM string |
| 674 | |
| 675 | // AlwaysCrossCompile controls whether this builder always |
| 676 | // cross compiles. Otherwise it's only done for trybot runs. |
| 677 | AlwaysCrossCompile bool |
| 678 | } |
| 679 | |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 680 | func init() { |
| 681 | for key, c := range Hosts { |
| 682 | if key == "" { |
| 683 | panic("empty string key in Hosts") |
| 684 | } |
| 685 | if c.HostType == "" { |
| 686 | c.HostType = key |
| 687 | } |
| 688 | if c.HostType != key { |
| 689 | panic(fmt.Sprintf("HostType %q != key %q", c.HostType, key)) |
| 690 | } |
| 691 | nSet := 0 |
Alexander Rakoczy | 10d5d32 | 2021-05-25 21:47:41 -0400 | [diff] [blame] | 692 | if c.VMImage != "" { |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 693 | nSet++ |
| 694 | } |
Alexander Rakoczy | 10d5d32 | 2021-05-25 21:47:41 -0400 | [diff] [blame] | 695 | if c.ContainerImage != "" && !c.isEC2 { |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 696 | nSet++ |
| 697 | } |
| 698 | if c.IsReverse { |
| 699 | nSet++ |
| 700 | } |
| 701 | if nSet != 1 { |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 702 | panic(fmt.Sprintf("exactly one of VMImage, ContainerImage, IsReverse must be set for host %q; got %v", key, nSet)) |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 703 | } |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 704 | if c.buildletURLTmpl == "" && (c.VMImage != "" || c.ContainerImage != "") { |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 705 | panic(fmt.Sprintf("missing buildletURLTmpl for host type %q", key)) |
| 706 | } |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | // A HostConfig describes the available ways to obtain buildlets of |
Dmitri Shuralyov | baf8b21 | 2020-04-06 17:34:17 -0400 | [diff] [blame] | 711 | // different types. Some host configs can serve multiple |
Brad Fitzpatrick | ade2862 | 2018-05-14 17:22:45 +0000 | [diff] [blame] | 712 | // builders. For example, a host config of "host-linux-jessie" can |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 713 | // serve linux-amd64, linux-amd64-race, linux-386, linux-386-387, etc. |
| 714 | type HostConfig struct { |
| 715 | // HostType is the unique name of this host config. It is also |
| 716 | // the key in the Hosts map. |
| 717 | HostType string |
| 718 | |
| 719 | // buildletURLTmpl is the URL "template" ($BUCKET is auto-expanded) |
| 720 | // for the URL to the buildlet binary. |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 721 | // This field is required for VM and Container builders. It's not |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 722 | // needed for reverse buildlets because in that case, the buildlets |
| 723 | // are already running and their stage0 should know how to update it |
| 724 | // it automatically. |
| 725 | buildletURLTmpl string |
| 726 | |
Carlos Amedee | d77c6d0 | 2020-08-18 13:32:05 -0400 | [diff] [blame] | 727 | // Exactly 1 of these must be set (with the exception of EC2 instances). |
| 728 | // An EC2 instance may run a container inside a VM. In that case, a VMImage |
| 729 | // and ContainerImage will both be set. |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 730 | VMImage string // e.g. "openbsd-amd64-60" |
| 731 | ContainerImage string // e.g. "linux-buildlet-std:latest" (suffix after "gcr.io/<PROJ>/") |
| 732 | IsReverse bool // if true, only use the reverse buildlet pool |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 733 | |
| 734 | // GCE options, if VMImage != "" |
Brad Fitzpatrick | e9fe3dc | 2019-01-30 17:13:07 +0000 | [diff] [blame] | 735 | machineType string // optional GCE instance type |
| 736 | RegularDisk bool // if true, use spinning disk instead of SSD |
| 737 | MinCPUPlatform string // optional; https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 738 | |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 739 | // EC2 options |
| 740 | isEC2 bool // if true, the instance is configured to run on EC2 |
| 741 | |
Brad Fitzpatrick | 15521bc | 2017-02-24 17:50:49 +0000 | [diff] [blame] | 742 | // ReverseOptions: |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 743 | ExpectNum int // expected number of reverse buildlets of this type |
| 744 | HermeticReverse bool // whether reverse buildlet has fresh env per conn |
Brad Fitzpatrick | 15521bc | 2017-02-24 17:50:49 +0000 | [diff] [blame] | 745 | |
Brad Fitzpatrick | 0261b66 | 2019-02-15 22:05:42 +0000 | [diff] [blame] | 746 | // Container image options, if ContainerImage != "": |
Brad Fitzpatrick | 69dd6b2 | 2019-02-21 21:10:54 +0000 | [diff] [blame] | 747 | NestedVirt bool // container requires VMX nested virtualization |
| 748 | KonletVMImage string // optional VM image (containing konlet) to use instead of default |
Brad Fitzpatrick | 0261b66 | 2019-02-15 22:05:42 +0000 | [diff] [blame] | 749 | |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 750 | // Optional base env. GOROOT_BOOTSTRAP should go here if the buildlet |
| 751 | // has Go 1.4+ baked in somewhere. |
| 752 | env []string |
Andrew Gerrand | 8e28dc9 | 2016-03-22 09:05:52 +1100 | [diff] [blame] | 753 | |
| 754 | // These template URLs may contain $BUCKET which is expanded to the |
| 755 | // relevant Cloud Storage bucket as specified by the build environment. |
| 756 | goBootstrapURLTmpl string // optional URL to a built Go 1.4+ tar.gz |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 757 | |
Jess Frazelle | be06759 | 2017-04-13 19:38:46 +0000 | [diff] [blame] | 758 | Owner string // optional email of owner; "bradfitz@golang.org", empty means golang-dev |
| 759 | OwnerGithub string // optional GitHub username of owner |
| 760 | Notes string // notes for humans |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 761 | |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 762 | SSHUsername string // username to ssh as, empty means not supported |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 763 | } |
| 764 | |
| 765 | // A BuildConfig describes how to run a builder. |
| 766 | type BuildConfig struct { |
| 767 | // Name is the unique name of the builder, in the form of |
| 768 | // "GOOS-GOARCH" or "GOOS-GOARCH-suffix". For example, |
| 769 | // "darwin-386", "linux-386-387", "linux-amd64-race". Some |
| 770 | // suffixes are well-known and carry special meaning, such as |
| 771 | // "-race". |
| 772 | Name string |
| 773 | |
| 774 | // HostType is the required key into the Hosts map, describing |
| 775 | // the type of host this build will run on. |
Brad Fitzpatrick | ade2862 | 2018-05-14 17:22:45 +0000 | [diff] [blame] | 776 | // For example, "host-linux-jessie". |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 777 | HostType string |
| 778 | |
Dmitri Shuralyov | baf8b21 | 2020-04-06 17:34:17 -0400 | [diff] [blame] | 779 | // KnownIssue is a non-zero golang.org/issue/nnn number for a builder |
Dmitri Shuralyov | 3b519a6 | 2020-09-25 11:52:04 -0400 | [diff] [blame] | 780 | // that may fail due to a known issue, such as because it is a new |
| 781 | // builder still in development/testing, or because the feature |
Dmitri Shuralyov | baf8b21 | 2020-04-06 17:34:17 -0400 | [diff] [blame] | 782 | // or port that it's meant to test hasn't been added yet, etc. |
| 783 | // |
| 784 | // A non-zero value here means that failures on this builder should not |
| 785 | // be considered a serious regression and don't need investigation beyond |
| 786 | // what is already in scope of the listed issue. |
| 787 | KnownIssue int |
| 788 | |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 789 | Notes string // notes for humans |
| 790 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 791 | // tryBot optionally specifies a policy func for whether trybots are enabled. |
| 792 | // nil means off. Even if tryBot returns true, BuildConfig.BuildsRepo must also |
| 793 | // return true. See the implementation of BuildConfig.BuildsRepoTryBot. |
| 794 | // The proj is "go", "net", etc. The branch is proj's branch. |
| 795 | // The goBranch is the same as branch for proj "go", else it's the go branch |
| 796 | // ("master, "release-branch.go1.12", etc). |
| 797 | tryBot func(proj, branch, goBranch string) bool |
| 798 | tryOnly bool // only used for trybots, and not regular builds |
Brad Fitzpatrick | 1c6d916 | 2015-03-20 16:14:52 -0700 | [diff] [blame] | 799 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 800 | CompileOnly bool // if true, compile tests, but don't run them |
| 801 | FlakyNet bool // network tests are flaky (try anyway, but ignore some failures) |
| 802 | |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 803 | // buildsRepo optionally specifies whether this builder does |
| 804 | // builds (of any type) for the given repo ("go", "net", etc.) |
| 805 | // and its branch ("master", "release-branch.go1.12", "dev.link", etc.). |
| 806 | // goBranch is the branch of "go" to build against. If repo == "go", |
| 807 | // goBranch == branch. |
Dmitri Shuralyov | 77c96bb | 2020-03-19 10:34:11 -0400 | [diff] [blame] | 808 | // |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 809 | // If nil, a default set of repos as reported by buildRepoByDefault |
| 810 | // is built. See buildsRepoAtAll method for details. |
Dmitri Shuralyov | 77c96bb | 2020-03-19 10:34:11 -0400 | [diff] [blame] | 811 | // |
| 812 | // To implement a minor change to the default policy, create a |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 813 | // function that uses buildRepoByDefault. For example: |
Dmitri Shuralyov | 77c96bb | 2020-03-19 10:34:11 -0400 | [diff] [blame] | 814 | // |
| 815 | // buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 816 | // b := buildRepoByDefault(repo) |
Dmitri Shuralyov | 77c96bb | 2020-03-19 10:34:11 -0400 | [diff] [blame] | 817 | // // ... modify b from the default value as needed ... |
| 818 | // return b |
| 819 | // } |
| 820 | // |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 821 | buildsRepo func(repo, branch, goBranch string) bool |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 822 | |
Dmitri Shuralyov | ad59fb1 | 2019-01-11 16:44:01 -0500 | [diff] [blame] | 823 | // MinimumGoVersion optionally specifies the minimum Go version |
| 824 | // this builder is allowed to use. It can be useful for skipping |
| 825 | // builders that are too new and no longer support some supported |
| 826 | // Go versions. It doesn't need to be set for builders that support |
| 827 | // all supported Go versions. |
| 828 | // |
| 829 | // Note: This field currently has effect on trybot runs only. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 830 | // |
| 831 | // TODO: unexport this and make buildsRepoAtAll return false on too-old |
| 832 | // of repos. The callers in coordinator will need updating. |
Dmitri Shuralyov | ad59fb1 | 2019-01-11 16:44:01 -0500 | [diff] [blame] | 833 | MinimumGoVersion types.MajorMinor |
| 834 | |
Brad Fitzpatrick | b911fb9 | 2017-04-13 04:34:42 +0000 | [diff] [blame] | 835 | // SkipSnapshot, if true, means to not fetch a tarball |
| 836 | // snapshot of the world post-make.bash from the buildlet (and |
| 837 | // thus to not write it to Google Cloud Storage). This is |
| 838 | // incompatible with sharded tests, and should only be used |
| 839 | // for very slow builders or networks, unable to transfer |
| 840 | // the tarball in under ~5 minutes. |
| 841 | SkipSnapshot bool |
| 842 | |
Quentin Smith | 0d86378 | 2017-03-15 16:18:30 -0400 | [diff] [blame] | 843 | // RunBench causes the coordinator to run benchmarks on this buildlet type. |
| 844 | RunBench bool |
| 845 | |
Brad Fitzpatrick | e37005b | 2016-09-22 23:29:31 +0000 | [diff] [blame] | 846 | // StopAfterMake causes the build to stop after the make |
| 847 | // script completes, returning its result as the result of the |
| 848 | // whole build. It does not run or compile any of the tests, |
| 849 | // nor does it write a snapshot of the world to cloud |
| 850 | // storage. This option is only supported for builders whose |
| 851 | // BuildConfig.SplitMakeRun returns true. |
| 852 | StopAfterMake bool |
| 853 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 854 | // needsGoProxy is whether this builder should have GOPROXY set. |
| 855 | // Currently this is only for the longtest builder, which needs |
| 856 | // to run cmd/go tests fetching from the network. |
| 857 | needsGoProxy bool |
| 858 | |
Brad Fitzpatrick | bfca87f | 2017-04-21 23:41:12 +0000 | [diff] [blame] | 859 | // InstallRacePackages controls which packages to "go install |
| 860 | // -race <pkgs>" after running make.bash (or equivalent). If |
| 861 | // the builder ends in "-race", the default if non-nil is just |
| 862 | // "std". |
| 863 | InstallRacePackages []string |
| 864 | |
Brad Fitzpatrick | bd4de1f | 2017-05-19 21:23:14 +0000 | [diff] [blame] | 865 | // GoDeps is a list of of git sha1 commits that must be in the |
| 866 | // commit to be tested's history. If absent, this builder is |
| 867 | // not run for that commit. |
| 868 | GoDeps []string |
| 869 | |
Brad Fitzpatrick | ad7af46 | 2019-10-19 02:49:53 +0000 | [diff] [blame] | 870 | // CrossCompileConfig optionally specifies whether and how |
| 871 | // this build is cross compiled. |
| 872 | CrossCompileConfig *CrossCompileConfig |
| 873 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 874 | // distTestAdjust optionally specifies a function that can |
| 875 | // adjust the cmd/dist test policy for this builder. |
| 876 | // |
| 877 | // The BuildConfig.ShouldRunDistTest method implements the |
| 878 | // default cmd/dist test policy, and then calls distTestAdjust |
| 879 | // to adjust that decision further, if distTestAdjust is not nil. |
| 880 | // |
| 881 | // The initial value of the run parameter is what the default |
| 882 | // policy said. The returned value from distTestAdjust is what |
| 883 | // BuildConfig.ShouldRunDistTest reports to the caller. |
| 884 | // |
| 885 | // For example: |
| 886 | // |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 887 | // distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool { |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 888 | // // ... modify run from the initial value as needed ... |
| 889 | // return run |
| 890 | // } |
| 891 | // |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 892 | distTestAdjust func(run bool, distTest string, isNormalTry bool) bool |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 893 | |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 894 | // numTestHelpers is the number of _additional_ buildlets |
| 895 | // past the first one to help out with sharded tests. |
Dmitri Shuralyov | 788b5c2 | 2020-11-06 07:55:36 -0500 | [diff] [blame] | 896 | // For TryBots and SlowBots, the numTryHelpers value is used, |
| 897 | // unless it's zero, in which case numTestHelpers is used. |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 898 | numTestHelpers int |
Dmitri Shuralyov | 788b5c2 | 2020-11-06 07:55:36 -0500 | [diff] [blame] | 899 | numTryTestHelpers int // For TryBots/SlowBots. If 0, numTestHelpers is used. |
Brad Fitzpatrick | 79f3fc0 | 2015-05-27 21:51:25 -0700 | [diff] [blame] | 900 | |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 901 | env []string // extra environment ("key=value") pairs |
| 902 | allScriptArgs []string |
Brad Fitzpatrick | 34b995b | 2019-02-14 02:18:06 +0000 | [diff] [blame] | 903 | |
| 904 | testHostConf *HostConfig // override HostConfig for testing, at least for now |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 905 | } |
| 906 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 907 | // Env returns the environment variables this builder should run with. |
Andrew Gerrand | cae837b | 2015-08-04 12:19:02 +1000 | [diff] [blame] | 908 | func (c *BuildConfig) Env() []string { |
Brad Fitzpatrick | 00003f4 | 2016-05-06 18:55:26 +0000 | [diff] [blame] | 909 | env := []string{"GO_BUILDER_NAME=" + c.Name} |
| 910 | if c.FlakyNet { |
| 911 | env = append(env, "GO_BUILDER_FLAKY_NET=1") |
| 912 | } |
Dmitri Shuralyov | df328b1 | 2020-05-13 14:30:25 -0400 | [diff] [blame] | 913 | if c.IsLongTest() { |
| 914 | // Set a private hook in cmd/dist to run main Go repository tests |
| 915 | // without the default -short flag. See golang.org/issue/12508. |
| 916 | env = append(env, "GO_TEST_SHORT=0") |
| 917 | } |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 918 | env = append(env, c.HostConfig().env...) |
Brad Fitzpatrick | 00003f4 | 2016-05-06 18:55:26 +0000 | [diff] [blame] | 919 | return append(env, c.env...) |
Andrew Gerrand | cae837b | 2015-08-04 12:19:02 +1000 | [diff] [blame] | 920 | } |
Brad Fitzpatrick | 32d0520 | 2015-01-21 15:15:48 -0800 | [diff] [blame] | 921 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 922 | // ModulesEnv returns the extra module-specific environment variables |
| 923 | // to append to this builder as a function of the repo being built |
| 924 | // ("go", "oauth2", "net", etc). |
| 925 | func (c *BuildConfig) ModulesEnv(repo string) (env []string) { |
Carlos Amedee | 1e76199 | 2020-08-20 11:53:58 -0400 | [diff] [blame] | 926 | // EC2 and reverse builders should set the public module proxy |
| 927 | // address instead of the internal proxy. |
| 928 | if (c.HostConfig().isEC2 || c.IsReverse()) && repo != "go" { |
Brad Fitzpatrick | e12c9d2 | 2019-05-02 20:32:40 +0000 | [diff] [blame] | 929 | env = append(env, "GOPROXY=https://proxy.golang.org") |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 930 | } |
| 931 | switch repo { |
Brad Fitzpatrick | 1b471b8 | 2019-03-13 04:44:17 +0000 | [diff] [blame] | 932 | case "go": |
| 933 | if !c.OutboundNetworkAllowed() { |
| 934 | env = append(env, "GOPROXY=off") |
| 935 | } |
Bryan C. Mills | c753c21 | 2019-08-29 14:26:25 -0400 | [diff] [blame] | 936 | case "oauth2", "build", "perf", "website": |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 937 | env = append(env, "GO111MODULE=on") |
| 938 | } |
Dmitri Shuralyov | 01fd299 | 2019-09-09 16:48:08 -0400 | [diff] [blame] | 939 | return env |
| 940 | } |
| 941 | |
| 942 | // ShouldTestPackageInGOPATHMode is used to control whether the package |
| 943 | // with the specified import path should be tested in GOPATH mode. |
| 944 | // |
| 945 | // When running tests for all golang.org/* repositories in GOPATH mode, |
| 946 | // this method is called repeatedly with the full import path of each |
| 947 | // package that is found and is being considered for testing in GOPATH |
| 948 | // mode. It's not used and has no effect on import paths in the main |
| 949 | // "go" repository. It has no effect on tests done in module mode. |
| 950 | // |
| 951 | // When considering making changes here, keep the release policy in mind: |
| 952 | // |
| 953 | // https://golang.org/doc/devel/release.html#policy |
| 954 | // |
| 955 | func (*BuildConfig) ShouldTestPackageInGOPATHMode(importPath string) bool { |
| 956 | if importPath == "golang.org/x/tools/gopls" || |
| 957 | strings.HasPrefix(importPath, "golang.org/x/tools/gopls/") { |
| 958 | // Don't test golang.org/x/tools/gopls/... in GOPATH mode. |
| 959 | return false |
| 960 | } |
Dmitri Shuralyov | 9bc86d7 | 2019-09-17 20:44:48 -0400 | [diff] [blame] | 961 | if importPath == "golang.org/x/net/http2/h2demo" { |
| 962 | // Don't test golang.org/x/net/http2/h2demo in GOPATH mode. |
| 963 | // |
| 964 | // It was never tested before golang.org/issue/34361 because it |
| 965 | // had a +build h2demo constraint. But that build constraint is |
| 966 | // being removed, so explicitly skip testing it in GOPATH mode. |
| 967 | // |
| 968 | // The package is supported only in module mode now, since |
| 969 | // it requires third-party dependencies. |
| 970 | return false |
| 971 | } |
Dmitri Shuralyov | 01fd299 | 2019-09-09 16:48:08 -0400 | [diff] [blame] | 972 | // Test everything else in GOPATH mode as usual. |
| 973 | return true |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 974 | } |
| 975 | |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 976 | func (c *BuildConfig) IsReverse() bool { return c.HostConfig().IsReverse } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 977 | |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 978 | func (c *BuildConfig) IsContainer() bool { return c.HostConfig().IsContainer() } |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 979 | func (c *HostConfig) IsContainer() bool { return c.ContainerImage != "" } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 980 | |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 981 | func (c *BuildConfig) IsVM() bool { return c.HostConfig().IsVM() } |
Carlos Amedee | d77c6d0 | 2020-08-18 13:32:05 -0400 | [diff] [blame] | 982 | |
| 983 | // IsVM reports whether the instance running the job is ultimately a VM. Hosts where |
| 984 | // a VM is used only to initiate a container are considered a container, not a VM. |
| 985 | // EC2 instances may be configured to run in containers that are running |
| 986 | // on custom AMIs. |
| 987 | func (c *HostConfig) IsVM() bool { |
| 988 | if c.isEC2 { |
| 989 | return c.VMImage != "" && c.ContainerImage == "" |
| 990 | } |
| 991 | return c.VMImage != "" |
| 992 | } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 993 | |
Brad Fitzpatrick | f3c0193 | 2015-01-15 16:29:16 -0800 | [diff] [blame] | 994 | func (c *BuildConfig) GOOS() string { return c.Name[:strings.Index(c.Name, "-")] } |
| 995 | |
| 996 | func (c *BuildConfig) GOARCH() string { |
| 997 | arch := c.Name[strings.Index(c.Name, "-")+1:] |
| 998 | i := strings.Index(arch, "-") |
| 999 | if i == -1 { |
| 1000 | return arch |
| 1001 | } |
| 1002 | return arch[:i] |
| 1003 | } |
| 1004 | |
Brad Fitzpatrick | aab8504 | 2019-10-16 06:02:29 +0000 | [diff] [blame] | 1005 | // MatchesSlowBotTerm reports whether some provided term from a |
| 1006 | // TRY=... comment on a Run-TryBot+1 vote on Gerrit should match this |
| 1007 | // build config. |
| 1008 | func (c *BuildConfig) MatchesSlowBotTerm(term string) bool { |
| 1009 | return term != "" && (term == c.Name || slowBotAliases[term] == c.Name) |
| 1010 | } |
| 1011 | |
Brad Fitzpatrick | 79f3fc0 | 2015-05-27 21:51:25 -0700 | [diff] [blame] | 1012 | // FilePathJoin is mostly like filepath.Join (without the cleaning) except |
| 1013 | // it uses the path separator of c.GOOS instead of the host system's. |
| 1014 | func (c *BuildConfig) FilePathJoin(x ...string) string { |
| 1015 | if c.GOOS() == "windows" { |
| 1016 | return strings.Join(x, "\\") |
| 1017 | } |
| 1018 | return strings.Join(x, "/") |
| 1019 | } |
| 1020 | |
Brad Fitzpatrick | 34b995b | 2019-02-14 02:18:06 +0000 | [diff] [blame] | 1021 | // DistTestsExecTimeout returns how long the coordinator should wait |
| 1022 | // for a cmd/dist test execution to run the provided dist test names. |
| 1023 | func (c *BuildConfig) DistTestsExecTimeout(distTests []string) time.Duration { |
| 1024 | // TODO: consider using distTests? We never did before, but |
| 1025 | // now we have the TestStats in the coordinator. Pass in a |
| 1026 | // *buildstats.TestStats and use historical data times some |
| 1027 | // fudge factor? For now just use the old 20 minute limit |
| 1028 | // we've used since 2014, but scale it by the |
| 1029 | // GO_TEST_TIMEOUT_SCALE for the super slow builders which |
| 1030 | // struggle with, say, the cgo tests. (which should be broken |
| 1031 | // up into separate dist tests or shards, like the test/ dir |
| 1032 | // was) |
| 1033 | d := 20 * time.Minute |
| 1034 | d *= time.Duration(c.timeoutScale()) |
| 1035 | return d |
| 1036 | } |
| 1037 | |
| 1038 | // timeoutScale returns this builder's GO_TEST_TIMEOUT_SCALE value, or 1. |
| 1039 | func (c *BuildConfig) timeoutScale() int { |
| 1040 | const pfx = "GO_TEST_TIMEOUT_SCALE=" |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 1041 | for _, env := range [][]string{c.env, c.HostConfig().env} { |
Brad Fitzpatrick | 34b995b | 2019-02-14 02:18:06 +0000 | [diff] [blame] | 1042 | for _, kv := range env { |
| 1043 | if strings.HasPrefix(kv, pfx) { |
| 1044 | if n, err := strconv.Atoi(kv[len(pfx):]); err == nil && n > 0 { |
| 1045 | return n |
| 1046 | } |
| 1047 | } |
| 1048 | } |
| 1049 | } |
| 1050 | return 1 |
| 1051 | } |
| 1052 | |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 1053 | // HostConfig returns the host configuration of c. |
| 1054 | func (c *BuildConfig) HostConfig() *HostConfig { |
Brad Fitzpatrick | 34b995b | 2019-02-14 02:18:06 +0000 | [diff] [blame] | 1055 | if c.testHostConf != nil { |
| 1056 | return c.testHostConf |
| 1057 | } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1058 | if c, ok := Hosts[c.HostType]; ok { |
| 1059 | return c |
| 1060 | } |
| 1061 | panic(fmt.Sprintf("missing buildlet config for buildlet %q", c.Name)) |
Andrew Gerrand | 8e28dc9 | 2016-03-22 09:05:52 +1100 | [diff] [blame] | 1062 | } |
| 1063 | |
Dmitri Shuralyov | 1cfe6dc | 2019-03-26 13:45:16 -0400 | [diff] [blame] | 1064 | // GoBootstrapURL returns the URL of a built Go 1.4+ tar.gz for the |
| 1065 | // build configuration type c, or empty string if there isn't one. |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1066 | func (c *BuildConfig) GoBootstrapURL(e *buildenv.Environment) string { |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 1067 | return strings.Replace(c.HostConfig().goBootstrapURLTmpl, "$BUCKET", e.BuildletBucket, 1) |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1068 | } |
| 1069 | |
| 1070 | // BuildletBinaryURL returns the public URL of this builder's buildlet. |
| 1071 | func (c *HostConfig) BuildletBinaryURL(e *buildenv.Environment) string { |
Andrew Gerrand | 8e28dc9 | 2016-03-22 09:05:52 +1100 | [diff] [blame] | 1072 | tmpl := c.buildletURLTmpl |
Evan Brown | a731151 | 2016-02-14 15:59:59 -0800 | [diff] [blame] | 1073 | return strings.Replace(tmpl, "$BUCKET", e.BuildletBucket, 1) |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1074 | } |
| 1075 | |
Brad Fitzpatrick | a5383ff | 2015-06-17 08:22:14 -0700 | [diff] [blame] | 1076 | func (c *BuildConfig) IsRace() bool { |
| 1077 | return strings.HasSuffix(c.Name, "-race") |
| 1078 | } |
| 1079 | |
Dmitri Shuralyov | df328b1 | 2020-05-13 14:30:25 -0400 | [diff] [blame] | 1080 | // IsLongTest reports whether this is a longtest builder. |
| 1081 | // A longtest builder runs tests without the -short flag. |
| 1082 | // |
| 1083 | // A builder is considered to be a longtest builder |
| 1084 | // if and only if its name ends with "-longtest". |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1085 | func (c *BuildConfig) IsLongTest() bool { |
| 1086 | return strings.HasSuffix(c.Name, "-longtest") |
| 1087 | } |
| 1088 | |
Brad Fitzpatrick | 1b471b8 | 2019-03-13 04:44:17 +0000 | [diff] [blame] | 1089 | // OutboundNetworkAllowed reports whether this builder should be |
| 1090 | // allowed to make outbound network requests. This is only enforced |
| 1091 | // on some builders. (Currently most Linux ones) |
| 1092 | func (c *BuildConfig) OutboundNetworkAllowed() bool { |
Brad Fitzpatrick | 95bc93b | 2019-05-10 19:28:40 +0000 | [diff] [blame] | 1093 | return c.IsLongTest() |
Brad Fitzpatrick | 1b471b8 | 2019-03-13 04:44:17 +0000 | [diff] [blame] | 1094 | } |
| 1095 | |
Brad Fitzpatrick | bfca87f | 2017-04-21 23:41:12 +0000 | [diff] [blame] | 1096 | func (c *BuildConfig) GoInstallRacePackages() []string { |
| 1097 | if c.InstallRacePackages != nil { |
| 1098 | return append([]string(nil), c.InstallRacePackages...) |
| 1099 | } |
| 1100 | if c.IsRace() { |
| 1101 | return []string{"std"} |
| 1102 | } |
| 1103 | return nil |
| 1104 | } |
| 1105 | |
Brad Fitzpatrick | f8c2484 | 2015-01-16 09:54:03 -0800 | [diff] [blame] | 1106 | // AllScript returns the relative path to the operating system's script to |
| 1107 | // do the build and run its standard set of tests. |
| 1108 | // Example values are "src/all.bash", "src/all.bat", "src/all.rc". |
| 1109 | func (c *BuildConfig) AllScript() string { |
Brad Fitzpatrick | 18840f87 | 2017-04-12 21:37:13 +0000 | [diff] [blame] | 1110 | if c.Name == "" { |
| 1111 | panic("bogus BuildConfig") |
| 1112 | } |
Brad Fitzpatrick | a5383ff | 2015-06-17 08:22:14 -0700 | [diff] [blame] | 1113 | if c.IsRace() { |
Brad Fitzpatrick | 32d0520 | 2015-01-21 15:15:48 -0800 | [diff] [blame] | 1114 | if strings.HasPrefix(c.Name, "windows-") { |
| 1115 | return "src/race.bat" |
| 1116 | } |
| 1117 | return "src/race.bash" |
| 1118 | } |
Brad Fitzpatrick | f8c2484 | 2015-01-16 09:54:03 -0800 | [diff] [blame] | 1119 | if strings.HasPrefix(c.Name, "windows-") { |
| 1120 | return "src/all.bat" |
| 1121 | } |
| 1122 | if strings.HasPrefix(c.Name, "plan9-") { |
| 1123 | return "src/all.rc" |
| 1124 | } |
Brad Fitzpatrick | 8c6116a | 2016-05-05 00:42:49 +0000 | [diff] [blame] | 1125 | if strings.HasPrefix(c.Name, "misc-compile") { |
Brad Fitzpatrick | ab7ff8a | 2015-04-29 14:44:46 -0700 | [diff] [blame] | 1126 | return "src/buildall.bash" |
| 1127 | } |
Brad Fitzpatrick | f8c2484 | 2015-01-16 09:54:03 -0800 | [diff] [blame] | 1128 | return "src/all.bash" |
| 1129 | } |
| 1130 | |
Brad Fitzpatrick | 7d9b036 | 2015-05-27 11:51:27 -0700 | [diff] [blame] | 1131 | // SplitMakeRun reports whether the coordinator should first compile |
| 1132 | // (using c.MakeScript), then snapshot, then run the tests (ideally |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1133 | // sharded) using cmd/dist test. |
Brad Fitzpatrick | 7d9b036 | 2015-05-27 11:51:27 -0700 | [diff] [blame] | 1134 | // Eventually this function should always return true (and then be deleted) |
| 1135 | // but for now we've only set up the scripts and verified that the main |
| 1136 | // configurations work. |
| 1137 | func (c *BuildConfig) SplitMakeRun() bool { |
| 1138 | switch c.AllScript() { |
Brad Fitzpatrick | de72d46 | 2016-05-04 17:47:12 +0000 | [diff] [blame] | 1139 | case "src/all.bash", "src/all.bat", |
| 1140 | "src/race.bash", "src/race.bat", |
Dmitri Shuralyov | 0ff2193 | 2020-10-07 11:12:00 -0400 | [diff] [blame] | 1141 | "src/all.rc": |
Brad Fitzpatrick | 7d9b036 | 2015-05-27 11:51:27 -0700 | [diff] [blame] | 1142 | // These we've verified to work. |
| 1143 | return true |
| 1144 | } |
Elias Naur | 8057bc8 | 2020-10-03 11:22:43 +0200 | [diff] [blame] | 1145 | // TODO(bradfitz): buildall.bash should really just be N small container |
| 1146 | // jobs instead of a "buildall.bash". Then we can delete this whole method. |
Brad Fitzpatrick | 7d9b036 | 2015-05-27 11:51:27 -0700 | [diff] [blame] | 1147 | return false |
| 1148 | } |
| 1149 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1150 | func (c *BuildConfig) IsTryOnly() bool { return c.tryOnly } |
| 1151 | |
| 1152 | func (c *BuildConfig) NeedsGoProxy() bool { return c.needsGoProxy } |
| 1153 | |
Dmitri Shuralyov | 1cfe6dc | 2019-03-26 13:45:16 -0400 | [diff] [blame] | 1154 | // BuildsRepoPostSubmit reports whether the build configuration type c |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1155 | // should build the given repo ("go", "net", etc) and branch |
| 1156 | // ("master", "release-branch.go1.12") as a post-submit build |
| 1157 | // that shows up on https://build.golang.org/. |
| 1158 | func (c *BuildConfig) BuildsRepoPostSubmit(repo, branch, goBranch string) bool { |
| 1159 | if c.tryOnly { |
Andrew Gerrand | 234725b | 2015-06-04 16:45:17 -0700 | [diff] [blame] | 1160 | return false |
| 1161 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1162 | return c.buildsRepoAtAll(repo, branch, goBranch) |
Andrew Gerrand | 234725b | 2015-06-04 16:45:17 -0700 | [diff] [blame] | 1163 | } |
| 1164 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1165 | // BuildsRepoTryBot reports whether the build configuration type c |
| 1166 | // should build the given repo ("go", "net", etc) and branch |
| 1167 | // ("master", "release-branch.go1.12") as a trybot. |
| 1168 | func (c *BuildConfig) BuildsRepoTryBot(repo, branch, goBranch string) bool { |
| 1169 | return c.tryBot != nil && c.tryBot(repo, branch, goBranch) && c.buildsRepoAtAll(repo, branch, goBranch) |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1170 | } |
| 1171 | |
Brad Fitzpatrick | 32d155d | 2019-03-19 17:17:23 +0000 | [diff] [blame] | 1172 | // ShouldRunDistTest reports whether the named cmd/dist test should be |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1173 | // run for this build config. The isNormalTry parameter is whether this |
| 1174 | // is for a normal TryBot (non-SlowBot) run. |
Brad Fitzpatrick | 32d155d | 2019-03-19 17:17:23 +0000 | [diff] [blame] | 1175 | // |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1176 | // In general, this returns true. When in normal trybot mode, |
| 1177 | // some slow portable tests are only run on the fastest builder. |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1178 | // |
| 1179 | // Individual builders can adjust this policy to fit their needs. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1180 | func (c *BuildConfig) ShouldRunDistTest(distTest string, isNormalTry bool) bool { |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1181 | run := true |
| 1182 | |
| 1183 | // This section implements the default cmd/dist test policy. |
| 1184 | // Any changes here will affect test coverage on all builders. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1185 | if isNormalTry { |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1186 | slowPortableTest := distTest == "api" // Whether a test is slow and has the same behavior everywhere. |
| 1187 | fastestBuilder := c.Name == "linux-amd64" |
| 1188 | if slowPortableTest && !fastestBuilder { |
| 1189 | // Don't run the test on this builder. |
| 1190 | run = false |
| 1191 | } |
Brad Fitzpatrick | 32d155d | 2019-03-19 17:17:23 +0000 | [diff] [blame] | 1192 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1193 | |
| 1194 | // Let individual builders adjust the cmd/dist test policy. |
| 1195 | if c.distTestAdjust != nil { |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1196 | run = c.distTestAdjust(run, distTest, isNormalTry) |
Brad Fitzpatrick | 32d155d | 2019-03-19 17:17:23 +0000 | [diff] [blame] | 1197 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1198 | |
| 1199 | return run |
Brad Fitzpatrick | 32d155d | 2019-03-19 17:17:23 +0000 | [diff] [blame] | 1200 | } |
| 1201 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1202 | // buildsRepoAtAll reports whether we should do builds of the provided |
| 1203 | // repo ("go", "sys", "net", etc). This applies to both post-submit |
| 1204 | // and trybot builds. Use BuildsRepoPostSubmit for only post-submit |
| 1205 | // or BuildsRepoTryBot for trybots. |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1206 | // |
| 1207 | // The branch is the branch of repo ("master", |
| 1208 | // "release-branch.go1.12", etc); it is required. The goBranch is the |
| 1209 | // branch of Go itself. It's required if repo != "go". When repo == |
| 1210 | // "go", the goBranch defaults to the value of branch. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1211 | func (c *BuildConfig) buildsRepoAtAll(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1212 | if goBranch == "" { |
| 1213 | if repo == "go" { |
| 1214 | goBranch = branch |
| 1215 | } else { |
| 1216 | panic("missing goBranch") |
| 1217 | } |
| 1218 | } |
| 1219 | if branch == "" { |
| 1220 | panic("missing branch") |
| 1221 | } |
| 1222 | if repo == "" { |
| 1223 | panic("missing repo") |
| 1224 | } |
Brad Fitzpatrick | 77b8b6b | 2019-02-28 23:20:41 +0000 | [diff] [blame] | 1225 | // Don't build old branches. |
| 1226 | const minGo1x = 11 |
Tobias Klauser | b7b6693 | 2019-03-13 09:29:15 +0100 | [diff] [blame] | 1227 | for _, b := range []string{branch, goBranch} { |
| 1228 | if bmaj, bmin, ok := version.ParseReleaseBranch(b); ok { |
| 1229 | if bmaj != 1 || bmin < minGo1x { |
| 1230 | return false |
| 1231 | } |
| 1232 | bmm := types.MajorMinor{bmaj, bmin} |
| 1233 | if bmm.Less(c.MinimumGoVersion) { |
| 1234 | return false |
| 1235 | } |
Brad Fitzpatrick | 85a73d7 | 2019-04-03 04:45:29 +0000 | [diff] [blame] | 1236 | if repo == "exp" { |
| 1237 | // Don't test exp against release branches; it's experimental. |
| 1238 | return false |
| 1239 | } |
Tobias Klauser | b7b6693 | 2019-03-13 09:29:15 +0100 | [diff] [blame] | 1240 | } |
Dmitri Shuralyov | 56e5e74 | 2018-11-15 00:55:22 -0500 | [diff] [blame] | 1241 | } |
Brad Fitzpatrick | 77b8b6b | 2019-02-28 23:20:41 +0000 | [diff] [blame] | 1242 | |
Dmitri Shuralyov | ac5b419 | 2018-11-15 01:15:27 -0500 | [diff] [blame] | 1243 | // Build dev.boringcrypto branches only on linux/amd64 and windows/386 (see golang.org/issue/26791). |
| 1244 | if repo == "go" && (branch == "dev.boringcrypto" || strings.HasPrefix(branch, "dev.boringcrypto.")) { |
| 1245 | if c.Name != "linux-amd64" && c.Name != "windows-386-2008" { |
| 1246 | return false |
| 1247 | } |
| 1248 | } |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1249 | if repo != "go" && !c.SplitMakeRun() { |
| 1250 | return false |
| 1251 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1252 | if p := c.buildsRepo; p != nil { |
| 1253 | return p(repo, branch, goBranch) |
| 1254 | } |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1255 | return buildRepoByDefault(repo) |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1256 | } |
| 1257 | |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1258 | // buildRepoByDefault reports whether builders should do builds |
| 1259 | // for the given repo ("go", "net", etc.) by default. |
| 1260 | // |
| 1261 | // It's used directly by BuildConfig.buildsRepoAtAll method for |
| 1262 | // builders with a nil BuildConfig.buildsRepo value. |
| 1263 | // It's also used by many builders that provide a custom build |
| 1264 | // repo policy (a non-nil BuildConfig.buildsRepo value) as part |
| 1265 | // of making the decision of whether to build a given repo. |
| 1266 | // |
| 1267 | // As a result, it effectively implements the default build repo policy. |
| 1268 | // Any changes here will affect repo coverage of many builders. |
| 1269 | func buildRepoByDefault(repo string) bool { |
Brad Fitzpatrick | 83c6b6a | 2019-03-14 20:35:32 +0000 | [diff] [blame] | 1270 | switch repo { |
| 1271 | case "go": |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1272 | // Build the main Go repository by default. |
Brad Fitzpatrick | 83c6b6a | 2019-03-14 20:35:32 +0000 | [diff] [blame] | 1273 | return true |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 1274 | case "mobile", "exp", "build": |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1275 | // Don't build x/mobile, x/exp, x/build by default. |
| 1276 | // |
| 1277 | // Builders need to explicitly opt-in to build these repos. |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1278 | return false |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1279 | default: |
| 1280 | // Build all other golang.org/x repositories by default. |
| 1281 | return true |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1282 | } |
Dmitri Shuralyov | 56e5e74 | 2018-11-15 00:55:22 -0500 | [diff] [blame] | 1283 | } |
| 1284 | |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1285 | func defaultPlusExp(repo, branch, goBranch string) bool { |
| 1286 | if repo == "exp" { |
| 1287 | return true |
| 1288 | } |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1289 | return buildRepoByDefault(repo) |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1290 | } |
| 1291 | |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 1292 | func defaultPlusExpBuild(repo, branch, goBranch string) bool { |
| 1293 | if repo == "exp" || repo == "build" { |
| 1294 | return true |
| 1295 | } |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1296 | return buildRepoByDefault(repo) |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 1297 | } |
| 1298 | |
Andrew Gerrand | fb77488 | 2015-05-21 14:02:38 +1000 | [diff] [blame] | 1299 | // AllScriptArgs returns the set of arguments that should be passed to the |
David Crawshaw | e078c6f | 2015-04-29 08:54:19 -0400 | [diff] [blame] | 1300 | // all.bash-equivalent script. Usually empty. |
| 1301 | func (c *BuildConfig) AllScriptArgs() []string { |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 1302 | return append([]string(nil), c.allScriptArgs...) |
David Crawshaw | e078c6f | 2015-04-29 08:54:19 -0400 | [diff] [blame] | 1303 | } |
| 1304 | |
Andrew Gerrand | f83f3e4 | 2015-02-02 12:05:01 +0000 | [diff] [blame] | 1305 | // MakeScript returns the relative path to the operating system's script to |
| 1306 | // do the build. |
| 1307 | // Example values are "src/make.bash", "src/make.bat", "src/make.rc". |
| 1308 | func (c *BuildConfig) MakeScript() string { |
| 1309 | if strings.HasPrefix(c.Name, "windows-") { |
| 1310 | return "src/make.bat" |
| 1311 | } |
| 1312 | if strings.HasPrefix(c.Name, "plan9-") { |
| 1313 | return "src/make.rc" |
| 1314 | } |
| 1315 | return "src/make.bash" |
| 1316 | } |
| 1317 | |
Andrew Gerrand | fb77488 | 2015-05-21 14:02:38 +1000 | [diff] [blame] | 1318 | // MakeScriptArgs returns the set of arguments that should be passed to the |
| 1319 | // make.bash-equivalent script. Usually empty. |
| 1320 | func (c *BuildConfig) MakeScriptArgs() []string { |
| 1321 | return c.AllScriptArgs() |
| 1322 | } |
| 1323 | |
Andrew Gerrand | f83f3e4 | 2015-02-02 12:05:01 +0000 | [diff] [blame] | 1324 | // GorootFinal returns the default install location for |
| 1325 | // releases for this platform. |
| 1326 | func (c *BuildConfig) GorootFinal() string { |
| 1327 | if strings.HasPrefix(c.Name, "windows-") { |
| 1328 | return "c:\\go" |
| 1329 | } |
| 1330 | return "/usr/local/go" |
| 1331 | } |
| 1332 | |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1333 | // MachineType returns the GCE machine type to use for this builder. |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1334 | func (c *HostConfig) MachineType() string { |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1335 | if v := c.machineType; v != "" { |
| 1336 | return v |
| 1337 | } |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 1338 | if c.IsContainer() { |
| 1339 | // Set a higher default machine size for containers, |
| 1340 | // so their /workdir tmpfs can be larger. The COS |
| 1341 | // image has no swap, so we want to make sure the |
| 1342 | // /workdir fits completely in memory. |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 1343 | return "n1-standard-4" // 4 vCPUs, 15 GB mem |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 1344 | } |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1345 | return "n1-highcpu-2" |
| 1346 | } |
| 1347 | |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 1348 | // IsEC2 returns true if the machine type is an EC2 arm64 type. |
| 1349 | func (c *HostConfig) IsEC2() bool { |
| 1350 | return c.isEC2 |
| 1351 | } |
| 1352 | |
David Crawshaw | eef380f | 2015-04-30 20:03:01 -0400 | [diff] [blame] | 1353 | // ShortOwner returns a short human-readable owner. |
| 1354 | func (c BuildConfig) ShortOwner() string { |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 1355 | owner := c.HostConfig().Owner |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1356 | if owner == "" { |
David Crawshaw | eef380f | 2015-04-30 20:03:01 -0400 | [diff] [blame] | 1357 | return "go-dev" |
| 1358 | } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1359 | return strings.TrimSuffix(owner, "@golang.org") |
David Crawshaw | eef380f | 2015-04-30 20:03:01 -0400 | [diff] [blame] | 1360 | } |
| 1361 | |
Jess Frazelle | be06759 | 2017-04-13 19:38:46 +0000 | [diff] [blame] | 1362 | // OwnerGithub returns the Github handle of the owner. |
| 1363 | func (c BuildConfig) OwnerGithub() string { |
Brad Fitzpatrick | fb8c09a | 2019-10-30 03:59:13 +0000 | [diff] [blame] | 1364 | return c.HostConfig().OwnerGithub |
Jess Frazelle | be06759 | 2017-04-13 19:38:46 +0000 | [diff] [blame] | 1365 | } |
| 1366 | |
Brad Fitzpatrick | f787cec | 2016-09-23 00:06:28 +0000 | [diff] [blame] | 1367 | // PoolName returns a short summary of the builder's host type for the |
Kevin Burke | 315d0bd | 2017-04-03 07:51:28 -0700 | [diff] [blame] | 1368 | // https://farmer.golang.org/builders page. |
Brad Fitzpatrick | f787cec | 2016-09-23 00:06:28 +0000 | [diff] [blame] | 1369 | func (c *HostConfig) PoolName() string { |
| 1370 | switch { |
| 1371 | case c.IsReverse: |
| 1372 | return "Reverse (dedicated machine/VM)" |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 1373 | case c.IsEC2(): |
Carlos Amedee | 5e227ac | 2020-05-19 17:26:14 -0400 | [diff] [blame] | 1374 | return "EC2 VM Container" |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 1375 | case c.IsVM(): |
Brad Fitzpatrick | f787cec | 2016-09-23 00:06:28 +0000 | [diff] [blame] | 1376 | return "GCE VM" |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 1377 | case c.IsContainer(): |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 1378 | return "Container" |
Brad Fitzpatrick | f787cec | 2016-09-23 00:06:28 +0000 | [diff] [blame] | 1379 | } |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 1380 | panic("unknown builder type") |
| 1381 | } |
| 1382 | |
Brad Fitzpatrick | 69dd6b2 | 2019-02-21 21:10:54 +0000 | [diff] [blame] | 1383 | // ContainerVMImage returns the base VM name (not the fully qualified |
| 1384 | // URL resource name of the VM) that starts the konlet program that |
Brad Fitzpatrick | 6994fc2 | 2019-05-17 20:08:13 +0000 | [diff] [blame] | 1385 | // pulls & runs a container. |
| 1386 | // The empty string means that no particular VM image is required |
| 1387 | // and the caller can run this container in any host. |
| 1388 | // |
| 1389 | // This method is only applicable when c.IsContainer() is true. |
Brad Fitzpatrick | 69dd6b2 | 2019-02-21 21:10:54 +0000 | [diff] [blame] | 1390 | func (c *HostConfig) ContainerVMImage() string { |
| 1391 | if c.KonletVMImage != "" { |
| 1392 | return c.KonletVMImage |
| 1393 | } |
Brad Fitzpatrick | 6994fc2 | 2019-05-17 20:08:13 +0000 | [diff] [blame] | 1394 | if c.NestedVirt { |
| 1395 | return "debian-stretch-vmx" |
| 1396 | } |
Carlos Amedee | 5e227ac | 2020-05-19 17:26:14 -0400 | [diff] [blame] | 1397 | if c.isEC2 && c.ContainerImage != "" { |
| 1398 | return fmt.Sprintf("gcr.io/%s/%s", buildenv.Production.ProjectName, c.ContainerImage) |
| 1399 | } |
Brad Fitzpatrick | 6994fc2 | 2019-05-17 20:08:13 +0000 | [diff] [blame] | 1400 | return "" |
Brad Fitzpatrick | 69dd6b2 | 2019-02-21 21:10:54 +0000 | [diff] [blame] | 1401 | } |
| 1402 | |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 1403 | // IsHermetic reports whether this host config gets a fresh |
| 1404 | // environment (including /usr, /var, etc) for each execution. This is |
| 1405 | // true for VMs, GKE, and reverse buildlets running their containers |
| 1406 | // running in Docker, but false on some reverse buildlets. |
| 1407 | func (c *HostConfig) IsHermetic() bool { |
| 1408 | switch { |
| 1409 | case c.IsReverse: |
| 1410 | return c.HermeticReverse |
Carlos Amedee | 6c8dc32 | 2020-05-13 13:27:15 -0400 | [diff] [blame] | 1411 | case c.IsEC2(): |
| 1412 | return true |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 1413 | case c.IsVM(): |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 1414 | return true |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 1415 | case c.IsContainer(): |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 1416 | return true |
| 1417 | } |
| 1418 | panic("unknown builder type") |
Brad Fitzpatrick | f787cec | 2016-09-23 00:06:28 +0000 | [diff] [blame] | 1419 | } |
| 1420 | |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 1421 | // GCENumCPU reports the number of GCE CPUs this buildlet requires. |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1422 | func (c *HostConfig) GCENumCPU() int { |
Brad Fitzpatrick | 1b1e086 | 2015-06-04 18:25:50 -0700 | [diff] [blame] | 1423 | t := c.MachineType() |
| 1424 | n, _ := strconv.Atoi(t[strings.LastIndex(t, "-")+1:]) |
| 1425 | return n |
| 1426 | } |
| 1427 | |
Dmitri Shuralyov | 788b5c2 | 2020-11-06 07:55:36 -0500 | [diff] [blame] | 1428 | // NumTestHelpers reports how many additional buildlets |
| 1429 | // past the first one to help out with sharded tests. |
| 1430 | // |
| 1431 | // isTry specifies whether it's for a pre-submit test |
| 1432 | // run (a TryBot or SlowBot) where speed matters more. |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 1433 | func (c *BuildConfig) NumTestHelpers(isTry bool) int { |
| 1434 | if isTry && c.numTryTestHelpers != 0 { |
| 1435 | return c.numTryTestHelpers |
| 1436 | } |
| 1437 | return c.numTestHelpers |
| 1438 | } |
| 1439 | |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1440 | // defaultTrySet returns a trybot policy function that reports whether |
| 1441 | // a project should use trybots. All the default projects are included, |
| 1442 | // plus any given in extraProj. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1443 | func defaultTrySet(extraProj ...string) func(proj, branch, goBranch string) bool { |
| 1444 | return func(proj, branch, goBranch string) bool { |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1445 | if proj == "go" { |
| 1446 | return true |
| 1447 | } |
| 1448 | for _, p := range extraProj { |
| 1449 | if proj == p { |
| 1450 | return true |
| 1451 | } |
| 1452 | } |
| 1453 | switch proj { |
Brad Fitzpatrick | 83c6b6a | 2019-03-14 20:35:32 +0000 | [diff] [blame] | 1454 | case "grpc-review": |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1455 | return false |
| 1456 | } |
| 1457 | return true |
| 1458 | } |
| 1459 | } |
| 1460 | |
| 1461 | // explicitTrySet returns a trybot policy function that reports |
| 1462 | // whether a project should use trybots. Only the provided projects in |
| 1463 | // projs are enabled. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1464 | func explicitTrySet(projs ...string) func(proj, branch, goBranch string) bool { |
| 1465 | return func(proj, branch, goBranch string) bool { |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1466 | for _, p := range projs { |
| 1467 | if proj == p { |
| 1468 | return true |
| 1469 | } |
| 1470 | } |
| 1471 | return false |
| 1472 | } |
| 1473 | } |
| 1474 | |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1475 | func init() { |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 1476 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 05d9e9b | 2018-09-27 23:43:25 +0000 | [diff] [blame] | 1477 | Name: "freebsd-amd64-11_2", |
| 1478 | HostType: "host-freebsd-11_2", |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1479 | tryBot: explicitTrySet("sys"), |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1480 | distTestAdjust: fasterTrybots, |
Brad Fitzpatrick | 05d9e9b | 2018-09-27 23:43:25 +0000 | [diff] [blame] | 1481 | numTryTestHelpers: 4, |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1482 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1483 | // This builder is still used by Go 1.16 and 1.15, |
| 1484 | // so keep it around a bit longer. See golang.org/issue/45727. |
| 1485 | // Test relevant Go versions so that we're better informed. |
| 1486 | return atMostGo1(goBranch, 16) && buildRepoByDefault(repo) |
| 1487 | }, |
Brad Fitzpatrick | 05d9e9b | 2018-09-27 23:43:25 +0000 | [diff] [blame] | 1488 | }) |
| 1489 | addBuilder(BuildConfig{ |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1490 | Name: "freebsd-amd64-11_4", |
| 1491 | HostType: "host-freebsd-11_4", |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1492 | tryBot: explicitTrySet("sys"), |
| 1493 | distTestAdjust: fasterTrybots, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1494 | numTryTestHelpers: 4, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1495 | }) |
| 1496 | addBuilder(BuildConfig{ |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1497 | Name: "freebsd-amd64-12_2", |
| 1498 | HostType: "host-freebsd-12_2", |
| 1499 | tryBot: defaultTrySet("sys"), |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1500 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1501 | distTestAdjust: fasterTrybots, // If changing this policy, update TestShouldRunDistTest accordingly. |
Brad Fitzpatrick | 75ed377 | 2018-10-05 20:57:29 +0000 | [diff] [blame] | 1502 | numTryTestHelpers: 4, |
Brad Fitzpatrick | 75ed377 | 2018-10-05 20:57:29 +0000 | [diff] [blame] | 1503 | }) |
| 1504 | addBuilder(BuildConfig{ |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1505 | Name: "freebsd-386-12_2", |
| 1506 | HostType: "host-freebsd-12_2", |
| 1507 | env: []string{"GOARCH=386", "GOHOSTARCH=386"}, |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1508 | distTestAdjust: fasterTrybots, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1509 | numTryTestHelpers: 4, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1510 | }) |
| 1511 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1512 | Name: "freebsd-amd64-race", |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1513 | HostType: "host-freebsd-12_2-big", |
Brad Fitzpatrick | bed69d6 | 2017-02-27 16:05:25 +0000 | [diff] [blame] | 1514 | }) |
| 1515 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1516 | Name: "freebsd-386-11_2", |
| 1517 | HostType: "host-freebsd-11_2", |
| 1518 | distTestAdjust: noTestDirAndNoReboot, |
| 1519 | tryBot: explicitTrySet("sys"), |
| 1520 | env: []string{"GOARCH=386", "GOHOSTARCH=386"}, |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1521 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1522 | // This builder is still used by Go 1.16 and 1.15, |
| 1523 | // so keep it around a bit longer. See golang.org/issue/45727. |
| 1524 | // Test relevant Go versions so that we're better informed. |
| 1525 | return atMostGo1(goBranch, 16) && buildRepoByDefault(repo) |
| 1526 | }, |
Brad Fitzpatrick | 05d9e9b | 2018-09-27 23:43:25 +0000 | [diff] [blame] | 1527 | }) |
| 1528 | addBuilder(BuildConfig{ |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1529 | Name: "freebsd-386-11_4", |
| 1530 | HostType: "host-freebsd-11_4", |
| 1531 | distTestAdjust: noTestDirAndNoReboot, |
Carlos Amedee | 2ecf424 | 2021-04-23 11:33:51 -0400 | [diff] [blame] | 1532 | tryBot: explicitTrySet("sys"), |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1533 | env: []string{"GOARCH=386", "GOHOSTARCH=386"}, |
Carlos Amedee | 8050efc | 2021-04-20 13:43:05 -0400 | [diff] [blame] | 1534 | }) |
| 1535 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1536 | Name: "linux-386", |
Carlos Amedee | 23650a9 | 2021-08-18 17:45:09 -0400 | [diff] [blame] | 1537 | HostType: "host-linux-bullseye", |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1538 | distTestAdjust: fasterTrybots, |
| 1539 | tryBot: defaultTrySet(), |
Carlos Amedee | 23650a9 | 2021-08-18 17:45:09 -0400 | [diff] [blame] | 1540 | Notes: "Debian stable (currently Debian bullseye).", |
Brad Fitzpatrick | c889f4d | 2019-03-06 02:06:17 +0000 | [diff] [blame] | 1541 | env: []string{ |
| 1542 | "GOARCH=386", |
| 1543 | "GOHOSTARCH=386", |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1544 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | c889f4d | 2019-03-06 02:06:17 +0000 | [diff] [blame] | 1545 | }, |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 1546 | numTestHelpers: 1, |
| 1547 | numTryTestHelpers: 3, |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1548 | }) |
| 1549 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 0f5b1a7 | 2020-10-07 11:24:42 -0400 | [diff] [blame] | 1550 | Name: "linux-386-softfloat", |
| 1551 | Notes: "GO386=softfloat", |
| 1552 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1553 | // GO386=softfloat is added in Go 1.16 (golang.org/issue/41848). |
| 1554 | return atLeastGo1(goBranch, 16) && (repo == "go" || repo == "crypto") |
| 1555 | }, |
Dmitri Shuralyov | 0f5b1a7 | 2020-10-07 11:24:42 -0400 | [diff] [blame] | 1556 | GoDeps: []string{ |
| 1557 | "04b8a9fea57e37589d82410281f22ebde0027808", // CL 260017, "all: implement GO386=softfloat". |
| 1558 | }, |
| 1559 | HostType: "host-linux-stretch", |
| 1560 | env: []string{"GOARCH=386", "GOHOSTARCH=386", "GO386=softfloat"}, |
| 1561 | }) |
| 1562 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1563 | Name: "linux-amd64", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1564 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | d6a8c27 | 2019-04-05 05:26:05 +0000 | [diff] [blame] | 1565 | tryBot: defaultTrySet(), |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 1566 | buildsRepo: defaultPlusExpBuild, |
Brad Fitzpatrick | c889f4d | 2019-03-06 02:06:17 +0000 | [diff] [blame] | 1567 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1568 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | c889f4d | 2019-03-06 02:06:17 +0000 | [diff] [blame] | 1569 | }, |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 1570 | numTestHelpers: 1, |
| 1571 | numTryTestHelpers: 4, |
| 1572 | RunBench: true, |
Evan Brown | 08b68a9 | 2015-11-20 10:00:06 -0800 | [diff] [blame] | 1573 | }) |
Brad Fitzpatrick | 0261b66 | 2019-02-15 22:05:42 +0000 | [diff] [blame] | 1574 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 1575 | Name: "linux-amd64-vmx", |
| 1576 | HostType: "host-linux-stretch-vmx", |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 1577 | buildsRepo: disabledBuilder, |
Brad Fitzpatrick | 0261b66 | 2019-02-15 22:05:42 +0000 | [diff] [blame] | 1578 | }) |
Brad Fitzpatrick | 8713701 | 2017-11-18 03:31:35 +0000 | [diff] [blame] | 1579 | |
| 1580 | const testAlpine = false // Issue 22689 (hide all red builders), Issue 19938 (get Alpine passing) |
| 1581 | if testAlpine { |
| 1582 | addBuilder(BuildConfig{ |
| 1583 | Name: "linux-amd64-alpine", |
| 1584 | HostType: "host-linux-x86-alpine", |
| 1585 | }) |
| 1586 | } |
| 1587 | |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1588 | // addMiscCompileGo1 adds a misc-compile TryBot that |
| 1589 | // runs buildall.bash on the specified target(s), up to 3 max. |
| 1590 | // The targets are matched against the "go tool dist list" name, |
| 1591 | // but with hyphens instead of forward slashes ("linux-amd64", etc). |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 1592 | // If min is non-zero, it specifies the minimum Go 1.x version. |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1593 | addMiscCompileGo1 := func(min int, suffix string, targets ...string) { |
| 1594 | if len(targets) > 3 { |
| 1595 | // This limit will do until we have better visibility |
| 1596 | // into holistic TryBot completion times via metrics. |
| 1597 | panic("at most 3 targets may be specified to avoid making TryBots slow; see issues 32632 and 17104") |
| 1598 | } |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 1599 | var v types.MajorMinor |
| 1600 | var alsoNote string |
| 1601 | if min != 0 { |
| 1602 | v = types.MajorMinor{1, min} |
| 1603 | alsoNote = fmt.Sprintf(" Applies to Go 1.%d and newer.", min) |
| 1604 | } |
Brad Fitzpatrick | 8c6116a | 2016-05-05 00:42:49 +0000 | [diff] [blame] | 1605 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1606 | Name: "misc-compile" + suffix, |
| 1607 | HostType: "host-linux-jessie", |
| 1608 | tryBot: defaultTrySet(), |
| 1609 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1610 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1611 | }, |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 1612 | tryOnly: true, |
| 1613 | MinimumGoVersion: v, |
| 1614 | CompileOnly: true, |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1615 | Notes: "Runs buildall.bash to cross-compile & vet std+cmd packages for " + strings.Join(targets, " & ") + ", but doesn't run any tests." + alsoNote, |
Brad Fitzpatrick | 8c6116a | 2016-05-05 00:42:49 +0000 | [diff] [blame] | 1616 | allScriptArgs: []string{ |
| 1617 | // Filtering pattern to buildall.bash: |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1618 | "^(" + strings.Join(targets, "|") + ")$", |
Brad Fitzpatrick | 8c6116a | 2016-05-05 00:42:49 +0000 | [diff] [blame] | 1619 | }, |
| 1620 | }) |
| 1621 | } |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 1622 | // addMiscCompile adds a misc-compile TryBot |
| 1623 | // for all supported Go versions. |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1624 | addMiscCompile := func(suffix string, targets ...string) { addMiscCompileGo1(0, suffix, targets...) } |
Dmitri Shuralyov | 7830753 | 2020-11-02 12:41:26 -0500 | [diff] [blame] | 1625 | |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1626 | // Arrange so that no more than 3 ports are tested sequentially in each misc-compile |
| 1627 | // TryBot to avoid any individual misc-compile TryBot from becoming a bottleneck for |
| 1628 | // overall TryBot completion time (currently 10 minutes; see golang.org/issue/17104). |
| 1629 | // |
| 1630 | // The TestTryBotsCompileAllPorts test is used to detect any gaps in TryBot coverage |
| 1631 | // when new ports are added, and the misc-compile pairs below can be re-arranged. |
| 1632 | // |
| 1633 | // (In the past, we used flexible regexp patterns that matched all architectures |
| 1634 | // for a given GOOS value. However, over time as new architectures were added, |
| 1635 | // some misc-compile TryBot could become much slower than others.) |
| 1636 | // |
| 1637 | // See golang.org/issue/32632. |
Dmitri Shuralyov | f9ec3ca | 2021-04-27 15:33:27 -0400 | [diff] [blame] | 1638 | addMiscCompile("-mac-win", "darwin-amd64", "windows-arm", "windows-arm64") |
Dmitri Shuralyov | 646d48d | 2021-04-23 16:56:37 -0400 | [diff] [blame] | 1639 | addMiscCompileGo1(16, "-darwinarm64", "darwin-arm64") // darwin/arm64 (for Go 1.16 and newer) only. |
| 1640 | addMiscCompile("-mips", "linux-mips", "linux-mips64") |
| 1641 | addMiscCompile("-mipsle", "linux-mipsle", "linux-mips64le") |
| 1642 | addMiscCompile("-ppc", "linux-ppc64", "linux-ppc64le", "aix-ppc64") |
| 1643 | addMiscCompile("-freebsd", "freebsd-386", "freebsd-arm", "freebsd-arm64") |
| 1644 | addMiscCompile("-netbsd", "netbsd-386", "netbsd-amd64") |
| 1645 | addMiscCompile("-netbsd-arm", "netbsd-arm", "netbsd-arm64") |
| 1646 | addMiscCompile("-openbsd", "openbsd-386", "openbsd-mips64") |
| 1647 | addMiscCompile("-openbsd-arm", "openbsd-arm", "openbsd-arm64") |
| 1648 | addMiscCompile("-plan9", "plan9-386", "plan9-amd64", "plan9-arm") |
| 1649 | addMiscCompile("-other-1", "solaris-amd64", "illumos-amd64", "dragonfly-amd64") |
| 1650 | addMiscCompile("-other-2", "linux-riscv64", "linux-s390x", "linux-arm-arm5") // 'linux-arm-arm5' is linux/arm with GOARM=5. |
Dmitri Shuralyov | 55e1ef6 | 2020-09-28 11:04:35 -0400 | [diff] [blame] | 1651 | |
| 1652 | // TODO: Issue 25963, get the misc-compile trybots for Android/iOS. |
| 1653 | // Then consider subrepos too, so "mobile" can at least be included |
| 1654 | // as a misc-compile for ^android- and ^ios-. |
Brad Fitzpatrick | 8c6116a | 2016-05-05 00:42:49 +0000 | [diff] [blame] | 1655 | |
Brad Fitzpatrick | ab7ff8a | 2015-04-29 14:44:46 -0700 | [diff] [blame] | 1656 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1657 | Name: "linux-amd64-nocgo", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1658 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1659 | Notes: "cgo disabled", |
Brad Fitzpatrick | 83c6b6a | 2019-03-14 20:35:32 +0000 | [diff] [blame] | 1660 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1661 | switch repo { |
| 1662 | case "perf": |
| 1663 | // Requires sqlite, which requires cgo. |
| 1664 | return false |
| 1665 | case "mobile": |
| 1666 | return false |
Brad Fitzpatrick | f6d512d | 2019-12-12 17:43:59 +0000 | [diff] [blame] | 1667 | case "build": |
| 1668 | return false |
Brad Fitzpatrick | 83c6b6a | 2019-03-14 20:35:32 +0000 | [diff] [blame] | 1669 | } |
| 1670 | return true |
| 1671 | }, |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1672 | env: []string{ |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1673 | "CGO_ENABLED=0", |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1674 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1675 | // This USER=root was required for Docker-based builds but probably isn't required |
| 1676 | // in the VM anymore, since the buildlet probably already has this in its environment. |
| 1677 | // (It was required because without cgo, it couldn't find the username) |
| 1678 | "USER=root", |
| 1679 | }, |
| 1680 | }) |
| 1681 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1682 | Name: "linux-amd64-noopt", |
| 1683 | Notes: "optimizations and inlining disabled", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1684 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1685 | buildsRepo: onlyGo, |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1686 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1687 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1688 | "GO_GCFLAGS=-N -l", |
| 1689 | }, |
Brad Fitzpatrick | 50ba0cb | 2015-01-27 14:22:21 -0800 | [diff] [blame] | 1690 | }) |
| 1691 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | de72d46 | 2016-05-04 17:47:12 +0000 | [diff] [blame] | 1692 | Name: "linux-amd64-ssacheck", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1693 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1694 | buildsRepo: onlyGo, |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1695 | tryBot: nil, // TODO: add a func to conditionally run this trybot if compiler dirs are touched |
Brad Fitzpatrick | de72d46 | 2016-05-04 17:47:12 +0000 | [diff] [blame] | 1696 | CompileOnly: true, |
| 1697 | Notes: "SSA internal checks enabled", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1698 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1699 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1700 | "GO_GCFLAGS=-d=ssa/check/on,dclstack", |
| 1701 | }, |
Brad Fitzpatrick | bd4de1f | 2017-05-19 21:23:14 +0000 | [diff] [blame] | 1702 | GoDeps: []string{ |
| 1703 | "f65abf6ddc8d1f3d403a9195fd74eaffa022b07f", // adds dclstack |
| 1704 | }, |
Keith Randall | a04c813 | 2016-03-18 15:30:38 -0700 | [diff] [blame] | 1705 | }) |
| 1706 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | c070703 | 2020-04-08 12:13:38 -0400 | [diff] [blame] | 1707 | Name: "linux-amd64-staticlockranking", |
| 1708 | HostType: "host-linux-stretch", |
| 1709 | Notes: "builder with GOEXPERIMENT=staticlockranking, see golang.org/issue/37937", |
Dmitri Shuralyov | 77c96bb | 2020-03-19 10:34:11 -0400 | [diff] [blame] | 1710 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1711 | return repo == "go" && atLeastGo1(goBranch, 15) |
| 1712 | }, |
| 1713 | env: []string{ |
| 1714 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1715 | "GOEXPERIMENT=staticlockranking", |
| 1716 | }, |
| 1717 | GoDeps: []string{ |
| 1718 | "02057906f7272a4787b8a0b5b7cafff8ad3024f0", // A master commit from 2020/03/19, just before CL 222925 and CL 207619 have landed. |
| 1719 | }, |
| 1720 | }) |
| 1721 | addBuilder(BuildConfig{ |
Matthew Dempsky | df58bba | 2021-06-16 23:08:22 -0700 | [diff] [blame] | 1722 | Name: "linux-amd64-unified", |
| 1723 | HostType: "host-linux-buster", |
| 1724 | Notes: "builder with GOEXPERIMENT=unified, see golang.org/issue/46786", |
| 1725 | tryBot: func(repo, branch, goBranch string) bool { |
Matthew Dempsky | 4f8007b | 2021-08-12 15:11:41 -0700 | [diff] [blame] | 1726 | return (repo == "go" || repo == "tools") && (goBranch == "master" || goBranch == "dev.typeparams") |
Matthew Dempsky | df58bba | 2021-06-16 23:08:22 -0700 | [diff] [blame] | 1727 | }, |
| 1728 | buildsRepo: func(repo, branch, goBranch string) bool { |
Matthew Dempsky | 4f8007b | 2021-08-12 15:11:41 -0700 | [diff] [blame] | 1729 | return (repo == "go" || repo == "tools") && (goBranch == "master" || goBranch == "dev.typeparams") |
Matthew Dempsky | df58bba | 2021-06-16 23:08:22 -0700 | [diff] [blame] | 1730 | }, |
| 1731 | env: []string{ |
| 1732 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1733 | "GOEXPERIMENT=unified", |
| 1734 | }, |
| 1735 | GoDeps: []string{ |
| 1736 | "804ecc2581caf33ae347d6a1ce67436d1f74e93b", // CL 328215, which added GOEXPERIMENT=unified on dev.typeparams |
| 1737 | }, |
| 1738 | numTestHelpers: 1, |
| 1739 | numTryTestHelpers: 4, |
| 1740 | }) |
| 1741 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | bfca87f | 2017-04-21 23:41:12 +0000 | [diff] [blame] | 1742 | Name: "linux-amd64-racecompile", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1743 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1744 | tryBot: nil, // TODO: add a func to conditionally run this trybot if compiler dirs are touched |
Brad Fitzpatrick | bfca87f | 2017-04-21 23:41:12 +0000 | [diff] [blame] | 1745 | CompileOnly: true, |
Brad Fitzpatrick | 4f5eef0 | 2017-04-24 21:14:05 +0000 | [diff] [blame] | 1746 | SkipSnapshot: true, |
| 1747 | StopAfterMake: true, |
Cherry Zhang | 2ea12c1 | 2020-03-30 11:20:59 -0400 | [diff] [blame] | 1748 | InstallRacePackages: []string{"cmd/compile", "cmd/link"}, |
| 1749 | Notes: "race-enabled cmd/compile and cmd/link", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1750 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1751 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1752 | }, |
Brad Fitzpatrick | bd4de1f | 2017-05-19 21:23:14 +0000 | [diff] [blame] | 1753 | GoDeps: []string{ |
| 1754 | "22f1b56dab29d397d2bdbdd603d85e60fb678089", // adds cmd/compile -c; Issue 20222 |
| 1755 | }, |
Brad Fitzpatrick | bfca87f | 2017-04-21 23:41:12 +0000 | [diff] [blame] | 1756 | }) |
| 1757 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 1758 | Name: "linux-amd64-race", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1759 | HostType: "host-linux-bullseye", |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1760 | tryBot: defaultTrySet(), |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 1761 | buildsRepo: defaultPlusExpBuild, |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1762 | distTestAdjust: fasterTrybots, |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 1763 | numTestHelpers: 1, |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 1764 | numTryTestHelpers: 5, |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1765 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1766 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1767 | }, |
Brad Fitzpatrick | 32d0520 | 2015-01-21 15:15:48 -0800 | [diff] [blame] | 1768 | }) |
| 1769 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1770 | Name: "linux-386-clang", |
| 1771 | HostType: "host-linux-clang", |
| 1772 | Notes: "Debian jessie + clang 3.9 instead of gcc", |
| 1773 | env: []string{"CC=/usr/bin/clang", "GOHOSTARCH=386"}, |
Brad Fitzpatrick | a0a155e | 2015-02-12 19:45:02 -0800 | [diff] [blame] | 1774 | }) |
| 1775 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1776 | Name: "linux-amd64-clang", |
| 1777 | HostType: "host-linux-clang", |
| 1778 | Notes: "Debian jessie + clang 3.9 instead of gcc", |
| 1779 | env: []string{"CC=/usr/bin/clang"}, |
Brad Fitzpatrick | a0a155e | 2015-02-12 19:45:02 -0800 | [diff] [blame] | 1780 | }) |
| 1781 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1782 | Name: "linux-386-sid", |
| 1783 | HostType: "host-linux-sid", |
| 1784 | Notes: "Debian sid (unstable)", |
| 1785 | env: []string{"GOHOSTARCH=386"}, |
Brad Fitzpatrick | f0728e3 | 2015-02-13 19:01:32 -0800 | [diff] [blame] | 1786 | }) |
| 1787 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1788 | Name: "linux-amd64-sid", |
| 1789 | HostType: "host-linux-sid", |
| 1790 | Notes: "Debian sid (unstable)", |
Brad Fitzpatrick | f0728e3 | 2015-02-13 19:01:32 -0800 | [diff] [blame] | 1791 | }) |
| 1792 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1793 | Name: "linux-amd64-fedora", |
| 1794 | HostType: "host-linux-fedora", |
| 1795 | Notes: "Fedora", |
Brad Fitzpatrick | 07bb129 | 2019-05-08 16:25:38 +0000 | [diff] [blame] | 1796 | }) |
| 1797 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 1798 | Name: "linux-amd64-androidemu", |
| 1799 | HostType: "host-android-amd64-emu", |
| 1800 | env: []string{ |
| 1801 | "GOARCH=amd64", |
| 1802 | "GOOS=linux", |
| 1803 | "CGO_ENABLED=1", |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1804 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 1805 | }, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1806 | tryBot: func(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 1807 | // Only for mobile repo for now, not "go": |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1808 | return repo == "mobile" && branch == "master" && goBranch == "master" |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 1809 | }, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1810 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1811 | return repo == "mobile" && branch == "master" && goBranch == "master" |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 1812 | }, |
| 1813 | Notes: "Runs GOOS=linux but with the Android emulator attached, for running x/mobile host tests.", |
| 1814 | }) |
| 1815 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1816 | Name: "linux-amd64-jessie", |
| 1817 | HostType: "host-linux-jessie", |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 1818 | Notes: "Debian Jessie.", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1819 | env: []string{ |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1820 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | d7985a8 | 2019-03-06 05:20:12 +0000 | [diff] [blame] | 1821 | }, |
Brad Fitzpatrick | ade2862 | 2018-05-14 17:22:45 +0000 | [diff] [blame] | 1822 | }) |
| 1823 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 90d5e7c | 2020-12-07 22:31:50 -0500 | [diff] [blame] | 1824 | Name: "linux-amd64-stretch", |
| 1825 | HostType: "host-linux-stretch", |
| 1826 | Notes: "Debian Stretch. Same as the normal 'linux-amd64' builder at this time, but with -stretch suffix. Used for release builds.", |
| 1827 | buildsRepo: disabledBuilder, // Disabled because the "linux-amd64" builder does identical work. |
| 1828 | env: []string{ |
| 1829 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1830 | }, |
| 1831 | }) |
| 1832 | addBuilder(BuildConfig{ |
Carlos Amedee | 4386493 | 2021-08-16 15:35:39 -0400 | [diff] [blame] | 1833 | Name: "linux-amd64-bullseye", |
| 1834 | HostType: "host-linux-bullseye", |
| 1835 | Notes: "Debian Bullseye.", |
| 1836 | env: []string{ |
| 1837 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1838 | }, |
| 1839 | }) |
| 1840 | addBuilder(BuildConfig{ |
Carlos Amedee | 81f4b09 | 2020-11-02 15:11:10 -0500 | [diff] [blame] | 1841 | Name: "linux-amd64-buster", |
| 1842 | HostType: "host-linux-buster", |
| 1843 | Notes: "Debian Buster.", |
| 1844 | env: []string{ |
| 1845 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1846 | }, |
Carlos Amedee | 81f4b09 | 2020-11-02 15:11:10 -0500 | [diff] [blame] | 1847 | }) |
| 1848 | addBuilder(BuildConfig{ |
Carlos Amedee | 23650a9 | 2021-08-18 17:45:09 -0400 | [diff] [blame] | 1849 | Name: "linux-386-jessie", |
| 1850 | HostType: "host-linux-jessie", |
| 1851 | Notes: "Debian Jessie, 32-bit builder.", |
Dmitri Shuralyov | 90d5e7c | 2020-12-07 22:31:50 -0500 | [diff] [blame] | 1852 | env: []string{ |
| 1853 | "GOARCH=386", |
| 1854 | "GOHOSTARCH=386", |
| 1855 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1856 | }, |
| 1857 | }) |
| 1858 | addBuilder(BuildConfig{ |
| 1859 | Name: "linux-386-stretch", |
| 1860 | HostType: "host-linux-stretch", |
| 1861 | Notes: "Debian Stretch, 32-bit builder.", |
| 1862 | env: []string{ |
| 1863 | "GOARCH=386", |
| 1864 | "GOHOSTARCH=386", |
| 1865 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1866 | }, |
| 1867 | }) |
| 1868 | addBuilder(BuildConfig{ |
Carlos Amedee | 23650a9 | 2021-08-18 17:45:09 -0400 | [diff] [blame] | 1869 | Name: "linux-386-buster", |
| 1870 | HostType: "host-linux-buster", |
| 1871 | Notes: "Debian Buster, 32-bit builder.", |
| 1872 | env: []string{ |
| 1873 | "GOARCH=386", |
| 1874 | "GOHOSTARCH=386", |
| 1875 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
| 1876 | }, |
| 1877 | }) |
| 1878 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1879 | Name: "linux-amd64-longtest", |
| 1880 | HostType: "host-linux-stretch-morecpu", |
| 1881 | Notes: "Debian Stretch with go test -short=false", |
Dmitri Shuralyov | 5a8fb63 | 2020-05-26 18:19:05 -0400 | [diff] [blame] | 1882 | tryBot: func(repo, branch, goBranch string) bool { |
| 1883 | onReleaseBranch := strings.HasPrefix(branch, "release-branch.") |
| 1884 | return repo == "go" && onReleaseBranch // See issue 37827. |
| 1885 | }, |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1886 | buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1887 | // Test all repos, ignoring buildRepoByDefault. |
| 1888 | // For golang.org/x repos, don't test non-latest versions. |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1889 | return repo == "go" || (branch == "master" && goBranch == "master") |
| 1890 | }, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 1891 | needsGoProxy: true, // for cmd/go module tests |
Alberto Donizetti | e7d3cfb | 2018-05-29 21:03:23 +0200 | [diff] [blame] | 1892 | env: []string{ |
Brad Fitzpatrick | 61ce0be | 2019-03-14 16:06:57 +0000 | [diff] [blame] | 1893 | "GO_TEST_TIMEOUT_SCALE=5", // give them lots of time |
Alberto Donizetti | e7d3cfb | 2018-05-29 21:03:23 +0200 | [diff] [blame] | 1894 | }, |
Dmitri Shuralyov | 7d700e0 | 2020-12-21 14:42:00 -0500 | [diff] [blame] | 1895 | numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661. |
Brad Fitzpatrick | 65a9d98 | 2018-05-16 19:50:39 +0000 | [diff] [blame] | 1896 | }) |
| 1897 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 1898 | Name: "linux-386-longtest", |
| 1899 | HostType: "host-linux-stretch-morecpu", |
| 1900 | Notes: "Debian Stretch with go test -short=false; to get 32-bit coverage", |
Dmitri Shuralyov | 5a8fb63 | 2020-05-26 18:19:05 -0400 | [diff] [blame] | 1901 | tryBot: func(repo, branch, goBranch string) bool { |
| 1902 | onReleaseBranch := strings.HasPrefix(branch, "release-branch.") |
| 1903 | return repo == "go" && onReleaseBranch // See issue 37827. |
| 1904 | }, |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 1905 | buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1906 | b := buildRepoByDefault(repo) |
| 1907 | if repo != "go" && !(branch == "master" && goBranch == "master") { |
| 1908 | // For golang.org/x repos, don't test non-latest versions. |
| 1909 | b = false |
Brad Fitzpatrick | f6d512d | 2019-12-12 17:43:59 +0000 | [diff] [blame] | 1910 | } |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 1911 | return b |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 1912 | }, |
| 1913 | needsGoProxy: true, // for cmd/go module tests |
| 1914 | env: []string{ |
Dmitri Shuralyov | be58d06 | 2020-05-18 19:34:15 -0400 | [diff] [blame] | 1915 | "GOARCH=386", |
| 1916 | "GOHOSTARCH=386", |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 1917 | "GO_TEST_TIMEOUT_SCALE=5", // give them lots of time |
| 1918 | }, |
Dmitri Shuralyov | 7d700e0 | 2020-12-21 14:42:00 -0500 | [diff] [blame] | 1919 | numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661. |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 1920 | }) |
| 1921 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | cd2ea43 | 2018-06-28 20:30:35 +0000 | [diff] [blame] | 1922 | Name: "js-wasm", |
| 1923 | HostType: "host-js-wasm", |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 1924 | tryBot: explicitTrySet("go"), |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1925 | buildsRepo: func(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1926 | switch repo { |
| 1927 | case "go": |
| 1928 | return true |
Brad Fitzpatrick | f6d512d | 2019-12-12 17:43:59 +0000 | [diff] [blame] | 1929 | case "build", "mobile", "exp", "benchmarks", "debug", "perf", "talks", "tools", "tour", "website": |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 1930 | return false |
| 1931 | default: |
| 1932 | return branch == "master" && goBranch == "master" |
| 1933 | } |
Brad Fitzpatrick | b8db43d | 2019-03-11 04:20:46 +0000 | [diff] [blame] | 1934 | }, |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 1935 | distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool { |
| 1936 | if isNormalTry { |
Brad Fitzpatrick | cd2ea43 | 2018-06-28 20:30:35 +0000 | [diff] [blame] | 1937 | if strings.Contains(distTest, "/internal/") || |
| 1938 | strings.Contains(distTest, "vendor/golang.org/x/arch") { |
| 1939 | return false |
| 1940 | } |
| 1941 | switch distTest { |
Dmitri Shuralyov | 3f45b3b | 2021-08-31 17:45:43 -0400 | [diff] [blame] | 1942 | case "cmd/go", "nolibgcc:crypto/x509", "reboot": |
Brad Fitzpatrick | cd2ea43 | 2018-06-28 20:30:35 +0000 | [diff] [blame] | 1943 | return false |
| 1944 | } |
Brad Fitzpatrick | cd2ea43 | 2018-06-28 20:30:35 +0000 | [diff] [blame] | 1945 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1946 | return run |
Brad Fitzpatrick | cd2ea43 | 2018-06-28 20:30:35 +0000 | [diff] [blame] | 1947 | }, |
Brad Fitzpatrick | ed99f86 | 2019-10-10 19:09:40 +0000 | [diff] [blame] | 1948 | numTryTestHelpers: 5, |
Brad Fitzpatrick | 4b011fe | 2018-05-11 05:54:32 +0000 | [diff] [blame] | 1949 | env: []string{ |
| 1950 | "GOOS=js", "GOARCH=wasm", "GOHOSTOS=linux", "GOHOSTARCH=amd64", |
| 1951 | "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workdir/go/misc/wasm", |
Brad Fitzpatrick | 136868b | 2019-08-29 18:28:01 +0000 | [diff] [blame] | 1952 | "GO_DISABLE_OUTBOUND_NETWORK=1", |
Brad Fitzpatrick | 4b011fe | 2018-05-11 05:54:32 +0000 | [diff] [blame] | 1953 | }, |
| 1954 | }) |
| 1955 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 01e47d9 | 2020-12-21 14:12:25 -0500 | [diff] [blame] | 1956 | Name: "openbsd-amd64-64", |
| 1957 | HostType: "host-openbsd-amd64-64", |
| 1958 | MinimumGoVersion: types.MajorMinor{1, 11}, |
| 1959 | distTestAdjust: noTestDirAndNoReboot, |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 1960 | }) |
| 1961 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1962 | Name: "openbsd-386-64", |
| 1963 | HostType: "host-openbsd-386-64", |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1964 | distTestAdjust: noTestDirAndNoReboot, |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 1965 | }) |
Joel Sing | 23861f9 | 2019-08-31 03:09:05 +1000 | [diff] [blame] | 1966 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 0a4bf69 | 2020-12-23 13:33:19 -0500 | [diff] [blame] | 1967 | Name: "openbsd-amd64-68", |
| 1968 | HostType: "host-openbsd-amd64-68", |
| 1969 | tryBot: defaultTrySet(), |
| 1970 | distTestAdjust: noTestDirAndNoReboot, |
| 1971 | numTryTestHelpers: 4, |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 1972 | }) |
| 1973 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 01e47d9 | 2020-12-21 14:12:25 -0500 | [diff] [blame] | 1974 | Name: "openbsd-386-68", |
| 1975 | HostType: "host-openbsd-386-68", |
| 1976 | tryBot: explicitTrySet("sys"), |
| 1977 | distTestAdjust: noTestDirAndNoReboot, |
| 1978 | numTryTestHelpers: 4, |
Dmitri Shuralyov | 3a574da | 2020-11-12 12:27:32 -0500 | [diff] [blame] | 1979 | }) |
| 1980 | addBuilder(BuildConfig{ |
Joel Sing | 6a8b9e1 | 2020-04-17 01:47:53 +1000 | [diff] [blame] | 1981 | Name: "openbsd-arm-jsing", |
| 1982 | HostType: "host-openbsd-arm-joelsing", |
| 1983 | SkipSnapshot: true, |
| 1984 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 1985 | switch repo { |
| 1986 | case "go", "net", "sys": |
| 1987 | return branch == "master" && goBranch == "master" |
| 1988 | default: |
| 1989 | return false |
| 1990 | } |
| 1991 | }, |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 1992 | distTestAdjust: noTestDirAndNoReboot, |
| 1993 | tryBot: nil, |
Joel Sing | 23861f9 | 2019-08-31 03:09:05 +1000 | [diff] [blame] | 1994 | env: []string{ |
| 1995 | // The machine is slow. |
| 1996 | "GO_TEST_TIMEOUT_SCALE=5", |
| 1997 | }, |
| 1998 | }) |
Dmitri Shuralyov | a5d3073 | 2018-10-04 18:14:50 -0400 | [diff] [blame] | 1999 | addBuilder(BuildConfig{ |
Joel Sing | b91348e | 2020-08-21 04:42:01 +1000 | [diff] [blame] | 2000 | Name: "openbsd-arm64-jsing", |
| 2001 | HostType: "host-openbsd-arm64-joelsing", |
| 2002 | SkipSnapshot: true, |
| 2003 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2004 | switch repo { |
| 2005 | case "go", "net", "sys": |
| 2006 | return branch == "master" && goBranch == "master" |
| 2007 | default: |
| 2008 | return false |
| 2009 | } |
| 2010 | }, |
| 2011 | distTestAdjust: noTestDirAndNoReboot, |
| 2012 | tryBot: nil, |
| 2013 | env: []string{ |
| 2014 | // The machine is slow. |
| 2015 | "GO_TEST_TIMEOUT_SCALE=5", |
| 2016 | }, |
| 2017 | }) |
| 2018 | addBuilder(BuildConfig{ |
Joel Sing | 18a54c6 | 2020-08-24 02:02:40 +1000 | [diff] [blame] | 2019 | Name: "openbsd-mips64-jsing", |
| 2020 | HostType: "host-openbsd-mips64-joelsing", |
| 2021 | SkipSnapshot: true, |
Joel Sing | 18a54c6 | 2020-08-24 02:02:40 +1000 | [diff] [blame] | 2022 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2023 | switch repo { |
| 2024 | case "go", "net", "sys": |
| 2025 | return branch == "master" && goBranch == "master" |
| 2026 | default: |
| 2027 | return false |
| 2028 | } |
| 2029 | }, |
| 2030 | distTestAdjust: noTestDirAndNoReboot, |
| 2031 | tryBot: nil, |
| 2032 | env: []string{ |
| 2033 | // The machine is slow. |
| 2034 | "GO_TEST_TIMEOUT_SCALE=5", |
| 2035 | }, |
| 2036 | }) |
| 2037 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2038 | Name: "netbsd-amd64-9_0", |
| 2039 | HostType: "host-netbsd-amd64-9_0", |
| 2040 | distTestAdjust: noTestDirAndNoReboot, |
| 2041 | tryBot: explicitTrySet("sys"), |
Dmitri Shuralyov | 219acbf | 2020-04-02 08:55:30 -0400 | [diff] [blame] | 2042 | }) |
| 2043 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2044 | Name: "netbsd-386-9_0", |
| 2045 | HostType: "host-netbsd-386-9_0", |
| 2046 | distTestAdjust: noTestDirAndNoReboot, |
Dmitri Shuralyov | 219acbf | 2020-04-02 08:55:30 -0400 | [diff] [blame] | 2047 | }) |
| 2048 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2049 | Name: "netbsd-arm-bsiegert", |
| 2050 | HostType: "host-netbsd-arm-bsiegert", |
| 2051 | distTestAdjust: noTestDirAndNoReboot, |
| 2052 | tryBot: nil, |
Benny Siegert | ebee6e9 | 2019-03-19 14:28:04 +0100 | [diff] [blame] | 2053 | env: []string{ |
| 2054 | // The machine is slow. |
| 2055 | "GO_TEST_TIMEOUT_SCALE=10", |
| 2056 | }, |
| 2057 | }) |
| 2058 | addBuilder(BuildConfig{ |
Tobias Klauser | da0cd80 | 2020-09-28 10:28:32 +0200 | [diff] [blame] | 2059 | Name: "netbsd-arm64-bsiegert", |
| 2060 | HostType: "host-netbsd-arm64-bsiegert", |
| 2061 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2062 | return atLeastGo1(goBranch, 16) && buildRepoByDefault(repo) |
| 2063 | }, |
Benny Siegert | 7c9f64d | 2020-08-18 20:42:30 +0200 | [diff] [blame] | 2064 | distTestAdjust: noTestDirAndNoReboot, |
| 2065 | tryBot: nil, |
| 2066 | env: []string{ |
| 2067 | // The machine is slow. |
| 2068 | "GO_TEST_TIMEOUT_SCALE=10", |
| 2069 | }, |
| 2070 | }) |
| 2071 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2072 | Name: "plan9-386", |
| 2073 | HostType: "host-plan9-386-gce", |
Brad Fitzpatrick | f7a5fcf | 2019-04-03 05:03:37 +0000 | [diff] [blame] | 2074 | numTestHelpers: 1, |
Brad Fitzpatrick | 67073b9 | 2019-04-18 19:33:19 +0000 | [diff] [blame] | 2075 | tryOnly: true, // disable it for now; Issue 31261, Issue 29801 |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2076 | distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool { |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2077 | switch distTest { |
Brad Fitzpatrick | a865ae3 | 2019-01-18 22:19:58 +0000 | [diff] [blame] | 2078 | case "api", |
| 2079 | "go_test:cmd/go": // takes over 20 minutes without working SMP |
| 2080 | return false |
| 2081 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2082 | return run |
Brad Fitzpatrick | a865ae3 | 2019-01-18 22:19:58 +0000 | [diff] [blame] | 2083 | }, |
Tobias Klauser | 22d3b24 | 2019-11-28 11:33:00 +0100 | [diff] [blame] | 2084 | buildsRepo: onlyMasterDefault, |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2085 | }) |
Brad Fitzpatrick | cc587d4 | 2015-02-06 17:32:15 -0800 | [diff] [blame] | 2086 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2087 | Name: "windows-amd64-2008", |
| 2088 | HostType: "host-windows-amd64-2008", |
| 2089 | distTestAdjust: noTestDirAndNoReboot, |
| 2090 | buildsRepo: onlyGo, |
Andrew Bonventre | ccab5db | 2018-04-30 17:16:33 -0400 | [diff] [blame] | 2091 | env: []string{ |
| 2092 | "GOARCH=amd64", |
| 2093 | "GOHOSTARCH=amd64", |
| 2094 | // cmd/go takes ~188 seconds on windows-amd64 |
| 2095 | // now, which is over the 180 second default |
| 2096 | // dist test timeout. So, bump this builder |
| 2097 | // up: |
| 2098 | "GO_TEST_TIMEOUT_SCALE=2", |
| 2099 | }, |
Brad Fitzpatrick | 97a4f81 | 2017-04-24 20:32:02 +0000 | [diff] [blame] | 2100 | }) |
| 2101 | addBuilder(BuildConfig{ |
Jeff Johnson | f8afd1d | 2017-04-27 13:12:08 -0700 | [diff] [blame] | 2102 | Name: "windows-386-2008", |
| 2103 | HostType: "host-windows-amd64-2008", |
Brad Fitzpatrick | c8ca962 | 2019-12-07 05:14:28 +0000 | [diff] [blame] | 2104 | buildsRepo: defaultPlusExpBuild, |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2105 | distTestAdjust: fasterTrybots, |
Jeff Johnson | f8afd1d | 2017-04-27 13:12:08 -0700 | [diff] [blame] | 2106 | env: []string{"GOARCH=386", "GOHOSTARCH=386"}, |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2107 | tryBot: defaultTrySet(), |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2108 | numTryTestHelpers: 4, |
Jeff Johnson | f8afd1d | 2017-04-27 13:12:08 -0700 | [diff] [blame] | 2109 | }) |
| 2110 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2111 | Name: "windows-amd64-2012", |
| 2112 | HostType: "host-windows-amd64-2012", |
| 2113 | distTestAdjust: noTestDirAndNoReboot, |
| 2114 | buildsRepo: onlyGo, |
Andrew Bonventre | ccab5db | 2018-04-30 17:16:33 -0400 | [diff] [blame] | 2115 | env: []string{ |
| 2116 | "GOARCH=amd64", |
| 2117 | "GOHOSTARCH=amd64", |
| 2118 | // cmd/go takes ~188 seconds on windows-amd64 |
| 2119 | // now, which is over the 180 second default |
| 2120 | // dist test timeout. So, bump this builder |
| 2121 | // up: |
| 2122 | "GO_TEST_TIMEOUT_SCALE=2", |
| 2123 | }, |
Brad Fitzpatrick | 97a4f81 | 2017-04-24 20:32:02 +0000 | [diff] [blame] | 2124 | }) |
| 2125 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2126 | Name: "windows-amd64-2016", |
| 2127 | HostType: "host-windows-amd64-2016", |
| 2128 | buildsRepo: defaultPlusExpBuild, |
| 2129 | distTestAdjust: fasterTrybots, |
Andrew Bonventre | ccab5db | 2018-04-30 17:16:33 -0400 | [diff] [blame] | 2130 | env: []string{ |
| 2131 | "GOARCH=amd64", |
| 2132 | "GOHOSTARCH=amd64", |
| 2133 | // cmd/go takes ~188 seconds on windows-amd64 |
| 2134 | // now, which is over the 180 second default |
| 2135 | // dist test timeout. So, bump this builder |
| 2136 | // up: |
| 2137 | "GO_TEST_TIMEOUT_SCALE=2", |
| 2138 | }, |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2139 | tryBot: defaultTrySet(), |
Brad Fitzpatrick | 9251bc9 | 2017-07-27 04:52:12 +0000 | [diff] [blame] | 2140 | numTryTestHelpers: 5, |
Brad Fitzpatrick | cc587d4 | 2015-02-06 17:32:15 -0800 | [diff] [blame] | 2141 | }) |
| 2142 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 2143 | Name: "windows-amd64-longtest", |
Dmitri Shuralyov | 9939300 | 2019-11-22 18:01:25 -0500 | [diff] [blame] | 2144 | HostType: "host-windows-amd64-2016-big", |
Brad Fitzpatrick | 1356066 | 2019-11-14 15:43:33 +0000 | [diff] [blame] | 2145 | Notes: "Windows Server 2016 with go test -short=false", |
Dmitri Shuralyov | 5a8fb63 | 2020-05-26 18:19:05 -0400 | [diff] [blame] | 2146 | tryBot: func(repo, branch, goBranch string) bool { |
| 2147 | onReleaseBranch := strings.HasPrefix(branch, "release-branch.") |
| 2148 | return repo == "go" && onReleaseBranch // See issue 37827. |
| 2149 | }, |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 2150 | buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 2151 | b := defaultPlusExpBuild(repo, branch, goBranch) |
| 2152 | if repo != "go" && !(branch == "master" && goBranch == "master") { |
| 2153 | // For golang.org/x repos, don't test non-latest versions. |
| 2154 | b = false |
Brad Fitzpatrick | f9c537e | 2019-10-28 20:16:36 +0000 | [diff] [blame] | 2155 | } |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 2156 | return b |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 2157 | }, |
| 2158 | needsGoProxy: true, // for cmd/go module tests |
| 2159 | env: []string{ |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 2160 | "GO_TEST_TIMEOUT_SCALE=5", // give them lots of time |
| 2161 | }, |
Dmitri Shuralyov | 7d700e0 | 2020-12-21 14:42:00 -0500 | [diff] [blame] | 2162 | numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661. |
Brad Fitzpatrick | 70a7cc8 | 2019-10-21 16:58:47 +0000 | [diff] [blame] | 2163 | }) |
| 2164 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 2165 | Name: "windows-amd64-race", |
Dmitri Shuralyov | 6afe8a2 | 2020-05-27 11:58:11 -0400 | [diff] [blame] | 2166 | HostType: "host-windows-amd64-2016-big", |
Brad Fitzpatrick | 8665028 | 2019-03-11 18:49:56 +0000 | [diff] [blame] | 2167 | Notes: "Only runs -race tests (./race.bat)", |
Andrew Bonventre | ccab5db | 2018-04-30 17:16:33 -0400 | [diff] [blame] | 2168 | env: []string{ |
| 2169 | "GOARCH=amd64", |
| 2170 | "GOHOSTARCH=amd64", |
| 2171 | // cmd/go takes ~188 seconds on windows-amd64 |
| 2172 | // now, which is over the 180 second default |
| 2173 | // dist test timeout. So, bump this builder |
| 2174 | // up: |
| 2175 | "GO_TEST_TIMEOUT_SCALE=2"}, |
Brad Fitzpatrick | cc587d4 | 2015-02-06 17:32:15 -0800 | [diff] [blame] | 2176 | }) |
| 2177 | addBuilder(BuildConfig{ |
Jason A. Donenfeld | 9bcb083 | 2020-11-28 15:02:05 +0100 | [diff] [blame] | 2178 | Name: "windows-arm-zx2c4", |
| 2179 | HostType: "host-windows-arm64-zx2c4", |
Jason A. Donenfeld | 5d75ed7 | 2020-11-20 18:35:33 +0100 | [diff] [blame] | 2180 | env: []string{ |
| 2181 | "GOARM=7", |
Jason A. Donenfeld | b6220de | 2020-12-01 20:06:23 +0100 | [diff] [blame] | 2182 | "GO_TEST_TIMEOUT_SCALE=3"}, |
Jason A. Donenfeld | 5d75ed7 | 2020-11-20 18:35:33 +0100 | [diff] [blame] | 2183 | }) |
| 2184 | addBuilder(BuildConfig{ |
Alexander Rakoczy | 666c18f | 2021-06-15 16:42:51 -0400 | [diff] [blame] | 2185 | Name: "windows-arm64-10", |
| 2186 | HostType: "host-windows-arm64-mini", |
| 2187 | numTryTestHelpers: 1, |
| 2188 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2189 | return atLeastGo1(goBranch, 17) && buildRepoByDefault(repo) |
| 2190 | }, |
Alexander Rakoczy | 3a6c4f3 | 2021-08-25 15:50:51 -0400 | [diff] [blame] | 2191 | env: []string{ |
| 2192 | "GOARCH=arm64", |
Alexander Rakoczy | 3a6c4f3 | 2021-08-25 15:50:51 -0400 | [diff] [blame] | 2193 | }, |
| 2194 | }) |
| 2195 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2196 | Name: "darwin-amd64-10_12", |
| 2197 | HostType: "host-darwin-10_12", |
| 2198 | distTestAdjust: macTestPolicy, |
Carlos Amedee | 6469a76 | 2021-04-22 13:51:16 -0400 | [diff] [blame] | 2199 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2200 | // macOS 10.12 not supported after Go 1.16 |
| 2201 | return atMostGo1(goBranch, 16) && buildRepoByDefault(repo) |
| 2202 | }, |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2203 | }) |
| 2204 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2205 | Name: "darwin-amd64-10_14", |
| 2206 | HostType: "host-darwin-10_14", |
| 2207 | distTestAdjust: macTestPolicy, |
| 2208 | buildsRepo: defaultPlusExp, |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 2209 | }) |
| 2210 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2211 | Name: "darwin-amd64-10_15", |
| 2212 | HostType: "host-darwin-10_15", |
| 2213 | distTestAdjust: macTestPolicy, |
| 2214 | buildsRepo: defaultPlusExpBuild, |
Carlos Amedee | d6dec9c | 2019-11-19 14:55:01 +0000 | [diff] [blame] | 2215 | }) |
| 2216 | addBuilder(BuildConfig{ |
Carlos Amedee | d576fd3 | 2021-01-29 15:47:13 -0500 | [diff] [blame] | 2217 | Name: "darwin-amd64-11_0", |
| 2218 | HostType: "host-darwin-amd64-11_0", |
| 2219 | distTestAdjust: macTestPolicy, |
| 2220 | buildsRepo: defaultPlusExpBuild, |
Carlos Amedee | d576fd3 | 2021-01-29 15:47:13 -0500 | [diff] [blame] | 2221 | }) |
| 2222 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2223 | Name: "darwin-amd64-nocgo", |
| 2224 | HostType: "host-darwin-10_15", |
| 2225 | distTestAdjust: noTestDirAndNoReboot, |
| 2226 | env: []string{"CGO_ENABLED=0"}, |
Brad Fitzpatrick | fcf7a58 | 2019-04-30 22:37:31 +0000 | [diff] [blame] | 2227 | }) |
| 2228 | addBuilder(BuildConfig{ |
Alexander Rakoczy | 9ad13ba | 2020-12-15 12:58:50 -0500 | [diff] [blame] | 2229 | Name: "darwin-arm64-11_0-toothrot", |
| 2230 | HostType: "host-darwin-arm64-11_0-toothrot", |
| 2231 | distTestAdjust: macTestPolicy, |
| 2232 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2233 | // Darwin ARM64 added in Go 1.16. |
| 2234 | return atLeastGo1(goBranch, 16) && defaultPlusExpBuild(repo, branch, goBranch) |
| 2235 | }, |
Alexander Rakoczy | 9ad13ba | 2020-12-15 12:58:50 -0500 | [diff] [blame] | 2236 | }) |
| 2237 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2238 | Name: "darwin-amd64-race", |
| 2239 | HostType: "host-darwin-10_15", |
| 2240 | distTestAdjust: macTestPolicy, |
| 2241 | buildsRepo: onlyGo, |
Brad Fitzpatrick | 409147c | 2017-01-18 22:45:12 +0000 | [diff] [blame] | 2242 | }) |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2243 | addBuilder(BuildConfig{ |
Elias Naur | 18919d6 | 2020-10-03 11:37:07 +0200 | [diff] [blame] | 2244 | Name: "ios-arm64-corellium", |
| 2245 | HostType: "host-ios-arm64-corellium-ios", |
Elias Naur | 6bebc8e | 2019-05-01 20:33:26 +0200 | [diff] [blame] | 2246 | Notes: "Virtual iPhone SE running on Corellium; owned by zenly", |
| 2247 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2248 | return repo == "go" && branch == "master" && goBranch == "master" |
| 2249 | }, |
| 2250 | }) |
| 2251 | addBuilder(BuildConfig{ |
Elias Naur | 4d0f77a | 2019-05-01 22:28:43 +0200 | [diff] [blame] | 2252 | Name: "android-arm64-corellium", |
| 2253 | HostType: "host-android-arm64-corellium-android", |
| 2254 | Notes: "Virtual Android running on Corellium; owned by zenly", |
| 2255 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2256 | return repo == "go" && branch == "master" && goBranch == "master" |
| 2257 | }, |
| 2258 | }) |
| 2259 | addBuilder(BuildConfig{ |
Elias Naur | 7ae7539 | 2019-05-02 00:54:54 +0200 | [diff] [blame] | 2260 | Name: "android-arm-corellium", |
| 2261 | HostType: "host-android-arm64-corellium-android", |
| 2262 | Notes: "Virtual Android running on Corellium; owned by zenly", |
| 2263 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2264 | return repo == "go" && branch == "master" && goBranch == "master" |
| 2265 | }, |
| 2266 | env: []string{ |
| 2267 | "CGO_ENABLED=1", |
Elias Naur | 7ae7539 | 2019-05-02 00:54:54 +0200 | [diff] [blame] | 2268 | "GOARCH=arm", |
| 2269 | }, |
| 2270 | }) |
| 2271 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | cfe14ab | 2019-02-25 20:35:29 +0000 | [diff] [blame] | 2272 | Name: "android-386-emu", |
| 2273 | HostType: "host-android-amd64-emu", // same amd64 host is used for 386 builder |
| 2274 | Notes: "Android emulator on GCE", |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2275 | buildsRepo: func(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2276 | switch repo { |
Brad Fitzpatrick | f6d512d | 2019-12-12 17:43:59 +0000 | [diff] [blame] | 2277 | case "build", "blog", "talks", "review", "tour", "website": |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2278 | return false |
| 2279 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2280 | return atLeastGo1(branch, 13) && atLeastGo1(goBranch, 13) |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2281 | }, |
Brad Fitzpatrick | cfe14ab | 2019-02-25 20:35:29 +0000 | [diff] [blame] | 2282 | env: []string{ |
| 2283 | "GOARCH=386", |
| 2284 | "GOOS=android", |
| 2285 | "GOHOSTARCH=amd64", |
| 2286 | "GOHOSTOS=linux", |
| 2287 | "CGO_ENABLED=1", |
| 2288 | }, |
| 2289 | }) |
| 2290 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 4e29d67 | 2019-04-18 19:45:32 +0000 | [diff] [blame] | 2291 | Name: "android-amd64-emu", |
| 2292 | HostType: "host-android-amd64-emu", |
| 2293 | Notes: "Android emulator on GCE", |
| 2294 | numTryTestHelpers: 3, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2295 | tryBot: func(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 6d867c8 | 2019-04-26 14:04:00 +0000 | [diff] [blame] | 2296 | switch repo { |
| 2297 | case "go", "mobile", "sys", "net", "tools", "crypto", "sync", "text", "time": |
| 2298 | return atLeastGo1(branch, 13) && atLeastGo1(goBranch, 13) |
| 2299 | } |
| 2300 | return false |
Brad Fitzpatrick | 6f51171 | 2019-02-28 17:32:45 +0000 | [diff] [blame] | 2301 | }, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2302 | buildsRepo: func(repo, branch, goBranch string) bool { |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2303 | switch repo { |
Brad Fitzpatrick | f6d512d | 2019-12-12 17:43:59 +0000 | [diff] [blame] | 2304 | case "build", "blog", "talks", "review", "tour", "website": |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2305 | return false |
| 2306 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2307 | return atLeastGo1(branch, 13) && atLeastGo1(goBranch, 13) |
Brad Fitzpatrick | 2c2d26c | 2019-03-01 16:54:25 +0000 | [diff] [blame] | 2308 | }, |
Brad Fitzpatrick | cfe14ab | 2019-02-25 20:35:29 +0000 | [diff] [blame] | 2309 | env: []string{ |
| 2310 | "GOARCH=amd64", |
| 2311 | "GOOS=android", |
| 2312 | "GOHOSTARCH=amd64", |
| 2313 | "GOHOSTOS=linux", |
| 2314 | "CGO_ENABLED=1", |
| 2315 | }, |
| 2316 | }) |
| 2317 | addBuilder(BuildConfig{ |
Joshua M. Clulow | a022e90 | 2019-10-17 01:48:13 -0700 | [diff] [blame] | 2318 | Name: "illumos-amd64", |
| 2319 | HostType: "host-illumos-amd64-jclulow", |
| 2320 | MinimumGoVersion: types.MajorMinor{1, 13}, |
| 2321 | }) |
| 2322 | addBuilder(BuildConfig{ |
Shawn Walker-Salas | 22e055b | 2017-07-07 13:41:20 -0700 | [diff] [blame] | 2323 | Name: "solaris-amd64-oraclerel", |
| 2324 | HostType: "host-solaris-oracle-amd64-oraclerel", |
| 2325 | Notes: "Oracle Solaris release version", |
| 2326 | }) |
| 2327 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2328 | Name: "linux-ppc64-buildlet", |
| 2329 | HostType: "host-linux-ppc64-osu", |
| 2330 | FlakyNet: true, |
| 2331 | distTestAdjust: ppc64DistTestPolicy, |
Lynn Boger | 3a0fcf7 | 2021-03-11 13:00:33 -0600 | [diff] [blame] | 2332 | env: []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422 |
Brad Fitzpatrick | f8a3106 | 2016-10-06 20:30:58 +0000 | [diff] [blame] | 2333 | }) |
| 2334 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2335 | Name: "linux-ppc64le-buildlet", |
| 2336 | HostType: "host-linux-ppc64le-osu", |
| 2337 | FlakyNet: true, |
| 2338 | distTestAdjust: ppc64DistTestPolicy, |
Lynn Boger | 3a0fcf7 | 2021-03-11 13:00:33 -0600 | [diff] [blame] | 2339 | env: []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422 |
Brad Fitzpatrick | c2a36fd | 2016-03-01 04:49:24 +0000 | [diff] [blame] | 2340 | }) |
| 2341 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2342 | Name: "linux-ppc64le-power9osu", |
| 2343 | HostType: "host-linux-ppc64le-power9-osu", |
| 2344 | FlakyNet: true, |
| 2345 | distTestAdjust: ppc64DistTestPolicy, |
Lynn Boger | 3a0fcf7 | 2021-03-11 13:00:33 -0600 | [diff] [blame] | 2346 | env: []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422 |
Carlos Eduardo Seo | 202164e | 2019-02-25 17:05:12 -0300 | [diff] [blame] | 2347 | }) |
| 2348 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | ad0e3fb | 2017-04-06 22:16:28 +0000 | [diff] [blame] | 2349 | Name: "linux-arm64-packet", |
| 2350 | HostType: "host-linux-arm64-packet", |
Brad Fitzpatrick | 8fa933c | 2019-03-07 05:16:49 +0000 | [diff] [blame] | 2351 | FlakyNet: true, // maybe not flaky, but here conservatively |
Brad Fitzpatrick | ad0e3fb | 2017-04-06 22:16:28 +0000 | [diff] [blame] | 2352 | }) |
| 2353 | addBuilder(BuildConfig{ |
Carlos Amedee | 34b0d64 | 2021-03-19 14:53:06 -0400 | [diff] [blame] | 2354 | Name: "linux-arm64-aws", |
| 2355 | HostType: "host-linux-arm64-aws", |
| 2356 | tryBot: defaultTrySet(), |
| 2357 | numTryTestHelpers: 1, |
Carlos Amedee | d77c6d0 | 2020-08-18 13:32:05 -0400 | [diff] [blame] | 2358 | }) |
| 2359 | addBuilder(BuildConfig{ |
Carlos Amedee | c1822c7 | 2021-03-19 13:54:17 -0400 | [diff] [blame] | 2360 | Name: "linux-arm-aws", |
| 2361 | HostType: "host-linux-arm-aws", |
| 2362 | tryBot: defaultTrySet(), |
| 2363 | numTryTestHelpers: 1, |
Carlos Amedee | 3bd8f47 | 2021-08-05 11:02:29 -0400 | [diff] [blame] | 2364 | env: []string{ |
| 2365 | "GOARCH=arm", |
| 2366 | "GOARM=6", |
| 2367 | "GOHOSTARCH=arm", |
| 2368 | }, |
Carlos Amedee | d72655c | 2020-10-08 16:49:48 -0400 | [diff] [blame] | 2369 | }) |
| 2370 | addBuilder(BuildConfig{ |
Xiaodong Liu | 5eaa6e0 | 2021-09-02 15:51:28 +0800 | [diff] [blame^] | 2371 | HostType: "host-linux-loong64-3a5000", |
| 2372 | Name: "linux-loong64-3a5000", |
| 2373 | SkipSnapshot: true, |
| 2374 | distTestAdjust: loong64DistTestPolicy, |
| 2375 | buildsRepo: loong64BuildsRepoPolicy, |
| 2376 | env: []string{ |
| 2377 | "GOARCH=loong64", |
| 2378 | "GOHOSTARCH=loong64", |
| 2379 | }, |
| 2380 | KnownIssue: 46229, |
| 2381 | }) |
| 2382 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2383 | FlakyNet: true, |
| 2384 | HostType: "host-linux-mipsle-mengzhuo", |
| 2385 | Name: "linux-mips64le-mengzhuo", |
| 2386 | SkipSnapshot: true, |
| 2387 | distTestAdjust: mipsDistTestPolicy, |
| 2388 | buildsRepo: mipsBuildsRepoPolicy, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2389 | }) |
| 2390 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2391 | FlakyNet: true, |
| 2392 | HostType: "host-linux-mips64le-rtrk", |
| 2393 | Name: "linux-mips64le-rtrk", |
| 2394 | SkipSnapshot: true, |
| 2395 | distTestAdjust: mipsDistTestPolicy, |
| 2396 | buildsRepo: mipsBuildsRepoPolicy, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2397 | env: []string{ |
| 2398 | "GOARCH=mips64le", |
| 2399 | "GOHOSTARCH=mips64le", |
| 2400 | }, |
| 2401 | }) |
| 2402 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2403 | FlakyNet: true, |
| 2404 | HostType: "host-linux-mips64le-rtrk", |
| 2405 | Name: "linux-mipsle-rtrk", |
| 2406 | SkipSnapshot: true, |
| 2407 | distTestAdjust: mipsDistTestPolicy, |
| 2408 | buildsRepo: mipsBuildsRepoPolicy, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2409 | env: []string{ |
| 2410 | "GOARCH=mipsle", |
| 2411 | "GOHOSTARCH=mipsle", |
| 2412 | }, |
| 2413 | }) |
| 2414 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2415 | FlakyNet: true, |
| 2416 | HostType: "host-linux-mips64-rtrk", |
| 2417 | Name: "linux-mips64-rtrk", |
| 2418 | SkipSnapshot: true, |
| 2419 | distTestAdjust: mipsDistTestPolicy, |
| 2420 | buildsRepo: mipsBuildsRepoPolicy, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2421 | env: []string{ |
| 2422 | "GOARCH=mips64", |
| 2423 | "GOHOSTARCH=mips64", |
| 2424 | }, |
| 2425 | }) |
| 2426 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2427 | FlakyNet: true, |
| 2428 | HostType: "host-linux-mips64-rtrk", |
| 2429 | Name: "linux-mips-rtrk", |
| 2430 | SkipSnapshot: true, |
| 2431 | distTestAdjust: mipsDistTestPolicy, |
| 2432 | buildsRepo: mipsBuildsRepoPolicy, |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2433 | env: []string{ |
| 2434 | "GOARCH=mips", |
| 2435 | "GOHOSTARCH=mips", |
Meng Zhuo | 8805279 | 2019-09-10 07:21:11 +0800 | [diff] [blame] | 2436 | }, |
| 2437 | }) |
| 2438 | addBuilder(BuildConfig{ |
Meng Zhuo | 1b56216 | 2021-09-01 15:08:03 +0800 | [diff] [blame] | 2439 | HostType: "host-linux-riscv64-joelsing", |
| 2440 | Name: "linux-riscv64-jsing", |
| 2441 | SkipSnapshot: true, |
| 2442 | env: []string{"GO_TEST_TIMEOUT_SCALE=4"}, |
| 2443 | distTestAdjust: riscvDistTestPolicy, |
Joel Sing | 8ea6a2c | 2020-09-28 04:25:41 +1000 | [diff] [blame] | 2444 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2445 | switch repo { |
| 2446 | case "go", "net", "sys": |
| 2447 | return branch == "master" && goBranch == "master" |
| 2448 | default: |
| 2449 | return false |
| 2450 | } |
| 2451 | }, |
| 2452 | }) |
| 2453 | addBuilder(BuildConfig{ |
Meng Zhuo | 1b56216 | 2021-09-01 15:08:03 +0800 | [diff] [blame] | 2454 | HostType: "host-linux-riscv64-unleashed", |
| 2455 | Name: "linux-riscv64-unleashed", |
| 2456 | SkipSnapshot: true, |
| 2457 | env: []string{"GO_TEST_TIMEOUT_SCALE=4"}, |
| 2458 | distTestAdjust: riscvDistTestPolicy, |
Brad Fitzpatrick | 773364d | 2019-11-12 06:19:21 +0000 | [diff] [blame] | 2459 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2460 | switch repo { |
| 2461 | case "go", "net", "sys": |
| 2462 | return branch == "master" && goBranch == "master" |
| 2463 | default: |
| 2464 | return false |
| 2465 | } |
| 2466 | }, |
| 2467 | }) |
| 2468 | addBuilder(BuildConfig{ |
Meng Zhuo | 1b56216 | 2021-09-01 15:08:03 +0800 | [diff] [blame] | 2469 | HostType: "host-linux-riscv64-unmatched", |
| 2470 | Name: "linux-riscv64-unmatched", |
| 2471 | env: []string{"GO_TEST_TIMEOUT_SCALE=4"}, |
| 2472 | FlakyNet: true, |
Meng Zhuo | 1b56216 | 2021-09-01 15:08:03 +0800 | [diff] [blame] | 2473 | buildsRepo: onlyMasterDefault, |
| 2474 | distTestAdjust: riscvDistTestPolicy, |
Meng Zhuo | 7fa5d57 | 2021-08-27 12:26:14 +0800 | [diff] [blame] | 2475 | }) |
| 2476 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | c2a36fd | 2016-03-01 04:49:24 +0000 | [diff] [blame] | 2477 | Name: "linux-s390x-ibm", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2478 | HostType: "host-linux-s390x", |
Brad Fitzpatrick | 94d0141 | 2016-09-13 22:45:48 +0000 | [diff] [blame] | 2479 | numTestHelpers: 0, |
Brad Fitzpatrick | c2a36fd | 2016-03-01 04:49:24 +0000 | [diff] [blame] | 2480 | }) |
Brad Fitzpatrick | 30761a0 | 2016-04-08 19:40:23 +0000 | [diff] [blame] | 2481 | addBuilder(BuildConfig{ |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2482 | Name: "linux-s390x-crosscompile", |
Brad Fitzpatrick | 76cf968 | 2019-12-04 21:27:28 +0000 | [diff] [blame] | 2483 | HostType: "host-s390x-cross", |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2484 | Notes: "s390x cross-compile builder for releases; doesn't run tests", |
| 2485 | CompileOnly: true, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2486 | tryOnly: true, // but not in trybot set for now |
Brad Fitzpatrick | 9702f6a | 2016-08-30 20:32:33 +0000 | [diff] [blame] | 2487 | env: []string{ |
Brad Fitzpatrick | 9702f6a | 2016-08-30 20:32:33 +0000 | [diff] [blame] | 2488 | "CGO_ENABLED=1", |
| 2489 | "GOARCH=s390x", |
| 2490 | "GOHOSTARCH=amd64", |
| 2491 | "CC_FOR_TARGET=s390x-linux-gnu-gcc", |
| 2492 | }, |
| 2493 | }) |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 2494 | addBuilder(BuildConfig{ |
| 2495 | Name: "linux-amd64-localdev", |
| 2496 | HostType: "host-linux-amd64-localdev", |
| 2497 | Notes: "for localhost development only", |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2498 | tryOnly: true, |
Brad Fitzpatrick | 4eceee2 | 2017-07-22 19:15:56 +0000 | [diff] [blame] | 2499 | }) |
Brad Fitzpatrick | e47c447 | 2017-08-05 22:56:18 +0000 | [diff] [blame] | 2500 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2501 | Name: "dragonfly-amd64", |
| 2502 | HostType: "host-dragonfly-amd64-master", |
| 2503 | Notes: "DragonFly BSD master, run by DragonFly team", |
| 2504 | distTestAdjust: noTestDirAndNoReboot, |
Antonio Huete Jimenez | 249a248 | 2021-04-30 13:35:02 +0000 | [diff] [blame] | 2505 | env: []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issue/45216 |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2506 | SkipSnapshot: true, |
Bryan C. Mills | 5a2c611 | 2019-08-29 12:37:31 -0400 | [diff] [blame] | 2507 | buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 2508 | return atLeastGo1(goBranch, 14) && buildRepoByDefault(repo) |
Bryan C. Mills | 5a2c611 | 2019-08-29 12:37:31 -0400 | [diff] [blame] | 2509 | }, |
Brad Fitzpatrick | e47c447 | 2017-08-05 22:56:18 +0000 | [diff] [blame] | 2510 | }) |
| 2511 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2512 | Name: "freebsd-arm-paulzhol", |
| 2513 | HostType: "host-freebsd-arm-paulzhol", |
| 2514 | distTestAdjust: noTestDirAndNoReboot, |
| 2515 | SkipSnapshot: true, |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2516 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2517 | // This was a fragile little machine with limited memory. |
| 2518 | // Only run a few of the core subrepos for now while |
| 2519 | // we figure out what's killing it. |
| 2520 | switch repo { |
| 2521 | case "go", "sys", "net": |
| 2522 | return true |
| 2523 | } |
| 2524 | return false |
| 2525 | }, |
Brad Fitzpatrick | e47c447 | 2017-08-05 22:56:18 +0000 | [diff] [blame] | 2526 | env: []string{ |
| 2527 | "GOARM=7", |
| 2528 | "CGO_ENABLED=1", |
| 2529 | }, |
| 2530 | }) |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 2531 | addBuilder(BuildConfig{ |
Dmitri Goutnik | 39f3d49 | 2019-10-03 07:56:19 -0500 | [diff] [blame] | 2532 | Name: "freebsd-arm64-dmgk", |
| 2533 | HostType: "host-freebsd-arm64-dmgk", |
Tobias Klauser | c0a862a | 2019-10-25 21:21:38 +0200 | [diff] [blame] | 2534 | buildsRepo: func(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 2535 | return atLeastGo1(goBranch, 14) && buildRepoByDefault(repo) |
Tobias Klauser | c0a862a | 2019-10-25 21:21:38 +0200 | [diff] [blame] | 2536 | }, |
Dmitri Goutnik | 39f3d49 | 2019-10-03 07:56:19 -0500 | [diff] [blame] | 2537 | }) |
| 2538 | addBuilder(BuildConfig{ |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2539 | Name: "plan9-arm", |
| 2540 | HostType: "host-plan9-arm-0intro", |
| 2541 | distTestAdjust: noTestDirAndNoReboot, |
| 2542 | buildsRepo: onlyMasterDefault, |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 2543 | }) |
| 2544 | addBuilder(BuildConfig{ |
David du Colombier | 9d71121 | 2021-04-05 20:42:05 +0200 | [diff] [blame] | 2545 | Name: "plan9-amd64-0intro", |
David du Colombier | 4c648a9 | 2019-11-22 20:19:11 +0100 | [diff] [blame] | 2546 | HostType: "host-plan9-amd64-0intro", |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2547 | distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool { |
| 2548 | run = noTestDirAndNoReboot(run, distTest, isNormalTry) |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2549 | switch distTest { |
David du Colombier | 2bfcb61 | 2019-05-08 19:42:00 +0200 | [diff] [blame] | 2550 | case "api", |
| 2551 | "go_test:cmd/go": // takes over 20 minutes without working SMP |
| 2552 | return false |
| 2553 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2554 | return run |
David du Colombier | 2bfcb61 | 2019-05-08 19:42:00 +0200 | [diff] [blame] | 2555 | }, |
Tobias Klauser | 22d3b24 | 2019-11-28 11:33:00 +0100 | [diff] [blame] | 2556 | buildsRepo: onlyMasterDefault, |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 2557 | }) |
Dmitri Shuralyov | c946330 | 2018-08-24 14:41:05 -0400 | [diff] [blame] | 2558 | addBuilder(BuildConfig{ |
David du Colombier | 4c648a9 | 2019-11-22 20:19:11 +0100 | [diff] [blame] | 2559 | Name: "plan9-386-0intro", |
| 2560 | HostType: "host-plan9-386-0intro", |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2561 | distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool { |
| 2562 | run = noTestDirAndNoReboot(run, distTest, isNormalTry) |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2563 | switch distTest { |
David du Colombier | 7373b40 | 2019-05-09 18:52:40 +0200 | [diff] [blame] | 2564 | case "api", |
| 2565 | "go_test:cmd/go": // takes over 20 minutes without working SMP |
| 2566 | return false |
| 2567 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2568 | return run |
David du Colombier | 7373b40 | 2019-05-09 18:52:40 +0200 | [diff] [blame] | 2569 | }, |
Tobias Klauser | 22d3b24 | 2019-11-28 11:33:00 +0100 | [diff] [blame] | 2570 | buildsRepo: onlyMasterDefault, |
David du Colombier | 7373b40 | 2019-05-09 18:52:40 +0200 | [diff] [blame] | 2571 | }) |
| 2572 | addBuilder(BuildConfig{ |
Tobias Klauser | b7b6693 | 2019-03-13 09:29:15 +0100 | [diff] [blame] | 2573 | Name: "aix-ppc64", |
| 2574 | HostType: "host-aix-ppc64-osuosl", |
| 2575 | MinimumGoVersion: types.MajorMinor{1, 12}, |
Tobias Klauser | 1e1239b | 2018-12-04 15:46:08 +0100 | [diff] [blame] | 2576 | env: []string{ |
| 2577 | "PATH=/opt/freeware/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin", |
| 2578 | }, |
Brad Fitzpatrick | 0bbb12f | 2019-04-19 14:37:11 +0000 | [diff] [blame] | 2579 | buildsRepo: func(repo, branch, goBranch string) bool { |
| 2580 | switch repo { |
Bryan C. Mills | 6b2867e | 2019-12-16 19:09:01 +0000 | [diff] [blame] | 2581 | case "tools", "tour", "website": |
Bryan C. Mills | 485f930 | 2019-08-29 15:05:21 -0400 | [diff] [blame] | 2582 | // The PATH on this builder is misconfigured in a way that causes |
| 2583 | // any test that executes a 'go' command as a subprocess to fail. |
Bryan C. Mills | 5a2c611 | 2019-08-29 12:37:31 -0400 | [diff] [blame] | 2584 | // (https://golang.org/issue/31567). |
Bryan C. Mills | 485f930 | 2019-08-29 15:05:21 -0400 | [diff] [blame] | 2585 | // Skip affected repos until the builder is fixed. |
Bryan C. Mills | 5a2c611 | 2019-08-29 12:37:31 -0400 | [diff] [blame] | 2586 | return false |
Brad Fitzpatrick | 0bbb12f | 2019-04-19 14:37:11 +0000 | [diff] [blame] | 2587 | } |
Dmitri Shuralyov | 43ea694 | 2021-02-19 12:17:28 -0500 | [diff] [blame] | 2588 | return buildRepoByDefault(repo) |
Brad Fitzpatrick | 0bbb12f | 2019-04-19 14:37:11 +0000 | [diff] [blame] | 2589 | }, |
Dmitri Shuralyov | c946330 | 2018-08-24 14:41:05 -0400 | [diff] [blame] | 2590 | }) |
Meng Zhuo | 2e05377 | 2020-11-25 00:44:38 +0800 | [diff] [blame] | 2591 | addBuilder(BuildConfig{ |
| 2592 | Name: "linux-amd64-wsl", |
| 2593 | HostType: "host-linux-amd64-wsl", |
| 2594 | Notes: "Windows 10 WSL2 Ubuntu", |
| 2595 | FlakyNet: true, |
| 2596 | SkipSnapshot: true, // The builder has a slow uplink bandwidth. |
| 2597 | }) |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2598 | } |
Brad Fitzpatrick | 9702f6a | 2016-08-30 20:32:33 +0000 | [diff] [blame] | 2599 | |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 2600 | // addBuilder adds c to the Builders map after doing some sanity |
| 2601 | // checks. |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2602 | func addBuilder(c BuildConfig) { |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2603 | if c.Name == "" { |
| 2604 | panic("empty name") |
| 2605 | } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2606 | if c.HostType == "" { |
| 2607 | panic(fmt.Sprintf("missing HostType for builder %q", c.Name)) |
| 2608 | } |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2609 | if _, dup := Builders[c.Name]; dup { |
Brad Fitzpatrick | 2446fb3 | 2017-08-06 15:57:06 +0000 | [diff] [blame] | 2610 | panic("dup name " + c.Name) |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2611 | } |
Brad Fitzpatrick | 328c9b8 | 2016-09-21 21:27:37 +0000 | [diff] [blame] | 2612 | if _, ok := Hosts[c.HostType]; !ok { |
| 2613 | panic(fmt.Sprintf("undefined HostType %q for builder %q", c.HostType, c.Name)) |
Brad Fitzpatrick | 6925ce8 | 2015-09-08 15:18:47 -0700 | [diff] [blame] | 2614 | } |
Brad Fitzpatrick | b911fb9 | 2017-04-13 04:34:42 +0000 | [diff] [blame] | 2615 | if c.SkipSnapshot && (c.numTestHelpers > 0 || c.numTryTestHelpers > 0) { |
| 2616 | panic(fmt.Sprintf("config %q's SkipSnapshot is not compatible with sharded test helpers", c.Name)) |
| 2617 | } |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 2618 | |
| 2619 | types := 0 |
Brad Fitzpatrick | 14d9973 | 2018-05-05 16:36:05 +0000 | [diff] [blame] | 2620 | for _, fn := range []func() bool{c.IsReverse, c.IsContainer, c.IsVM} { |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 2621 | if fn() { |
| 2622 | types++ |
| 2623 | } |
| 2624 | } |
| 2625 | if types != 1 { |
Brad Fitzpatrick | 6ae8750 | 2018-05-04 02:42:17 +0000 | [diff] [blame] | 2626 | panic(fmt.Sprintf("build config %q host type inconsistent (must be Reverse, Image, or VM)", c.Name)) |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 2627 | } |
| 2628 | |
Brad Fitzpatrick | 5eb896e | 2018-10-26 17:52:25 +0000 | [diff] [blame] | 2629 | Builders[c.Name] = &c |
Brad Fitzpatrick | 46cc759 | 2015-01-15 12:46:22 -0800 | [diff] [blame] | 2630 | } |
Brad Fitzpatrick | c328d04 | 2017-04-12 00:35:37 +0000 | [diff] [blame] | 2631 | |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 2632 | // tryNewMiscCompile is an intermediate step towards adding a real addMiscCompile TryBot. |
| 2633 | // It adds a post-submit-only builder with KnownIssue, GoDeps set to the provided values, |
| 2634 | // and runs on a limited set of branches to get test results without potential disruption |
| 2635 | // for contributors. It can be modified as needed when onboarding a misc-compile builder. |
| 2636 | func tryNewMiscCompile(suffix, rx string, knownIssue int, goDeps []string) { |
| 2637 | if knownIssue == 0 { |
| 2638 | panic("tryNewMiscCompile: knownIssue parameter must be non-zero") |
| 2639 | } |
| 2640 | addBuilder(BuildConfig{ |
| 2641 | Name: "misc-compile" + suffix, |
Carlos Amedee | 701f717 | 2021-08-19 13:27:43 -0400 | [diff] [blame] | 2642 | HostType: "host-linux-bullseye", |
Dmitri Shuralyov | 4c544cb | 2020-11-02 22:25:51 -0500 | [diff] [blame] | 2643 | buildsRepo: func(repo, branch, goBranch string) bool { return repo == "go" && branch == "master" }, |
| 2644 | KnownIssue: knownIssue, |
| 2645 | GoDeps: goDeps, |
| 2646 | env: []string{"GO_DISABLE_OUTBOUND_NETWORK=1"}, |
| 2647 | CompileOnly: true, |
| 2648 | Notes: fmt.Sprintf("Tries buildall.bash to cross-compile & vet std+cmd packages for "+rx+", but doesn't run any tests. See golang.org/issue/%d.", knownIssue), |
| 2649 | allScriptArgs: []string{ |
| 2650 | // Filtering pattern to buildall.bash: |
| 2651 | rx, |
| 2652 | }, |
| 2653 | }) |
| 2654 | } |
| 2655 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2656 | // fasterTrybots is a distTestAdjust policy function. |
| 2657 | // It skips (returns false) the test/ directory and reboot tests for trybots. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2658 | func fasterTrybots(run bool, distTest string, isNormalTry bool) bool { |
| 2659 | if isNormalTry { |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2660 | if strings.HasPrefix(distTest, "test:") || distTest == "reboot" { |
Brad Fitzpatrick | 5a66f4e | 2019-03-17 22:28:15 +0000 | [diff] [blame] | 2661 | return false // skip test |
| 2662 | } |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2663 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2664 | return run |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2665 | } |
| 2666 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2667 | // noTestDirAndNoReboot is a distTestAdjust policy function. |
| 2668 | // It skips (returns false) the test/ directory and reboot tests for all builds. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2669 | func noTestDirAndNoReboot(run bool, distTest string, isNormalTry bool) bool { |
Brad Fitzpatrick | 5a66f4e | 2019-03-17 22:28:15 +0000 | [diff] [blame] | 2670 | if strings.HasPrefix(distTest, "test:") || distTest == "reboot" { |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2671 | return false // skip test |
| 2672 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2673 | return run |
Brad Fitzpatrick | 7b0a998 | 2017-12-07 00:40:40 +0000 | [diff] [blame] | 2674 | } |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2675 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2676 | // ppc64DistTestPolicy is a distTestAdjust policy function |
Brad Fitzpatrick | 02e7e2b | 2019-10-29 08:02:19 -0700 | [diff] [blame] | 2677 | // that's shared by linux-ppc64le, -ppc64le-power9osu, and -ppc64. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2678 | func ppc64DistTestPolicy(run bool, distTest string, isNormalTry bool) bool { |
Brad Fitzpatrick | 02e7e2b | 2019-10-29 08:02:19 -0700 | [diff] [blame] | 2679 | if distTest == "reboot" { |
| 2680 | // Skip test. It seems to use a lot of memory? |
| 2681 | // See https://golang.org/issue/35233. |
| 2682 | return false |
| 2683 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2684 | return run |
Brad Fitzpatrick | 02e7e2b | 2019-10-29 08:02:19 -0700 | [diff] [blame] | 2685 | } |
| 2686 | |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2687 | // mipsDistTestPolicy is a distTestAdjust policy function |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2688 | // that's shared by the slow mips builders. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2689 | func mipsDistTestPolicy(run bool, distTest string, isNormalTry bool) bool { |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2690 | switch distTest { |
| 2691 | case "api", "reboot": |
| 2692 | return false |
| 2693 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2694 | return run |
Brad Fitzpatrick | f120ea3 | 2019-10-29 20:35:07 +0000 | [diff] [blame] | 2695 | } |
| 2696 | |
| 2697 | // mipsBuildsRepoPolicy is a buildsRepo policy function |
| 2698 | // that's shared by the slow mips builders. |
| 2699 | func mipsBuildsRepoPolicy(repo, branch, goBranch string) bool { |
| 2700 | switch repo { |
| 2701 | case "go", "net", "sys": |
| 2702 | return branch == "master" && goBranch == "master" |
| 2703 | default: |
| 2704 | return false |
| 2705 | } |
| 2706 | } |
| 2707 | |
Meng Zhuo | 1b56216 | 2021-09-01 15:08:03 +0800 | [diff] [blame] | 2708 | // riscvDistTestPolicy is same as mipsDistTestPolicy for now. |
| 2709 | var riscvDistTestPolicy = mipsDistTestPolicy |
| 2710 | |
Xiaodong Liu | 5eaa6e0 | 2021-09-02 15:51:28 +0800 | [diff] [blame^] | 2711 | // loong64DistTestPolicy is a distTestAdjust policy function |
| 2712 | func loong64DistTestPolicy(run bool, distTest string, isNormalTry bool) bool { |
| 2713 | switch distTest { |
| 2714 | case "api", "reboot": |
| 2715 | return false |
| 2716 | } |
| 2717 | return run |
| 2718 | } |
| 2719 | |
| 2720 | // loong64BuildsRepoPolicy is a buildsRepo policy function |
| 2721 | func loong64BuildsRepoPolicy(repo, branch, goBranch string) bool { |
| 2722 | switch repo { |
| 2723 | case "go", "net", "sys": |
| 2724 | return branch == "master" && goBranch == "master" |
| 2725 | default: |
| 2726 | return false |
| 2727 | } |
| 2728 | } |
| 2729 | |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2730 | // TryBuildersForProject returns the builders that should run as part of |
| 2731 | // a TryBot set for the given project. |
| 2732 | // The project argument is of the form "go", "net", "sys", etc. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2733 | // The branch is the branch of that project ("master", "release-branch.go1.12", etc) |
| 2734 | // The goBranch is the branch of Go to use. If proj == "go", then branch == goBranch. |
| 2735 | func TryBuildersForProject(proj, branch, goBranch string) []*BuildConfig { |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2736 | var confs []*BuildConfig |
| 2737 | for _, conf := range Builders { |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2738 | if conf.BuildsRepoTryBot(proj, branch, goBranch) { |
Brad Fitzpatrick | c517aed | 2018-10-26 19:21:58 +0000 | [diff] [blame] | 2739 | confs = append(confs, conf) |
| 2740 | } |
| 2741 | } |
| 2742 | sort.Slice(confs, func(i, j int) bool { |
| 2743 | return confs[i].Name < confs[j].Name |
| 2744 | }) |
| 2745 | return confs |
| 2746 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2747 | |
Cherry Zhang | 50a7880 | 2020-03-13 17:09:21 -0400 | [diff] [blame] | 2748 | // atLeastGo1 reports whether branch is "release-branch.go1.N" where N >= min. |
| 2749 | // It assumes "master" and "dev.*" branches are already greater than min, and |
| 2750 | // always includes them. |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2751 | func atLeastGo1(branch string, min int) bool { |
| 2752 | if branch == "master" { |
| 2753 | return true |
| 2754 | } |
Cherry Zhang | 50a7880 | 2020-03-13 17:09:21 -0400 | [diff] [blame] | 2755 | if strings.HasPrefix(branch, "dev.") { |
| 2756 | // Treat dev branches current. |
| 2757 | // If a dev branch is active, it will be current. |
| 2758 | // If it is not active, it doesn't matter anyway. |
| 2759 | // TODO: dev.boringcrypto.go1.N branches may be the |
| 2760 | // exception. Currently we only build boringcrypto |
| 2761 | // on linux/amd64 and windows/386, which support all |
| 2762 | // versions of Go, so it doesn't actually matter. |
| 2763 | return true |
| 2764 | } |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2765 | major, minor, ok := version.ParseReleaseBranch(branch) |
| 2766 | return ok && major == 1 && minor >= min |
| 2767 | } |
| 2768 | |
Dmitri Shuralyov | a1a9ec1 | 2020-03-10 13:26:20 -0400 | [diff] [blame] | 2769 | // atMostGo1 reports whether branch is "release-branch.go1.N" where N <= max. |
| 2770 | // It assumes "master" branch is already greater than max, and doesn't include it. |
| 2771 | func atMostGo1(branch string, max int) bool { |
| 2772 | major, minor, ok := version.ParseReleaseBranch(branch) |
| 2773 | return ok && major == 1 && minor <= max |
| 2774 | } |
| 2775 | |
Brad Fitzpatrick | 756764c | 2019-03-07 17:44:41 +0000 | [diff] [blame] | 2776 | // onlyGo is a common buildsRepo policy value that only builds the main "go" repo. |
| 2777 | func onlyGo(repo, branch, goBranch string) bool { return repo == "go" } |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 2778 | |
Tobias Klauser | 22d3b24 | 2019-11-28 11:33:00 +0100 | [diff] [blame] | 2779 | // onlyMasterDefault is a common buildsRepo policy value that only builds |
| 2780 | // default repos on the master branch. |
| 2781 | func onlyMasterDefault(repo, branch, goBranch string) bool { |
Dmitri Shuralyov | 5d9c992 | 2020-07-01 14:45:10 -0400 | [diff] [blame] | 2782 | return branch == "master" && goBranch == "master" && buildRepoByDefault(repo) |
Brad Fitzpatrick | b61ecd0 | 2019-10-10 04:17:45 +0000 | [diff] [blame] | 2783 | } |
Brad Fitzpatrick | f7a5fcf | 2019-04-03 05:03:37 +0000 | [diff] [blame] | 2784 | |
Brad Fitzpatrick | 8bd8e0e | 2019-03-26 23:04:31 +0000 | [diff] [blame] | 2785 | // disabledBuilder is a buildsRepo policy function that always return false. |
| 2786 | func disabledBuilder(repo, branch, goBranch string) bool { return false } |
Brad Fitzpatrick | c72a0ed | 2019-03-27 23:03:50 +0000 | [diff] [blame] | 2787 | |
| 2788 | // macTestPolicy is the test policy for Macs. |
| 2789 | // |
| 2790 | // We have limited Mac resources. It's not worth wasting time testing |
| 2791 | // portable things on them. That is, if there's a slow test that will |
| 2792 | // still fail slowly on another builder where we have more resources |
| 2793 | // (like linux-amd64), then there's no point testing it redundantly on |
| 2794 | // the Macs. |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2795 | func macTestPolicy(run bool, distTest string, isNormalTry bool) bool { |
Brad Fitzpatrick | c72a0ed | 2019-03-27 23:03:50 +0000 | [diff] [blame] | 2796 | if strings.HasPrefix(distTest, "test:") { |
| 2797 | return false |
| 2798 | } |
| 2799 | switch distTest { |
| 2800 | case "reboot", "api", "doc_progs", |
| 2801 | "wiki", "bench_go1", "codewalk": |
| 2802 | return false |
| 2803 | } |
Dmitri Shuralyov | 81f06ce | 2020-04-09 16:24:30 -0400 | [diff] [blame] | 2804 | if isNormalTry { |
Brad Fitzpatrick | c72a0ed | 2019-03-27 23:03:50 +0000 | [diff] [blame] | 2805 | switch distTest { |
| 2806 | case "runtime:cpu124", "race", "moved_goroot": |
| 2807 | return false |
| 2808 | } |
| 2809 | // TODO: more. Look at bigquery results once we have more data. |
| 2810 | } |
Dmitri Shuralyov | 75a37cb | 2020-04-09 12:47:03 -0400 | [diff] [blame] | 2811 | return run |
Brad Fitzpatrick | c72a0ed | 2019-03-27 23:03:50 +0000 | [diff] [blame] | 2812 | } |