func init()

in dashboard/builders.go [1479:2714]


func init() {
	addBuilder(BuildConfig{
		Name:              "freebsd-amd64-11_2",
		HostType:          "host-freebsd-11_2",
		tryBot:            explicitTrySet("sys"),
		distTestAdjust:    fasterTrybots,
		numTryTestHelpers: 4,
		buildsRepo: func(repo, branch, goBranch string) bool {
			// This builder is still used by Go 1.16 and 1.15,
			// so keep it around a bit longer. See golang.org/issue/45727.
			// Test relevant Go versions so that we're better informed.
			return atMostGo1(goBranch, 16) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:              "freebsd-amd64-11_4",
		HostType:          "host-freebsd-11_4",
		tryBot:            explicitTrySet("sys"),
		distTestAdjust:    fasterTrybots,
		numTryTestHelpers: 4,
		buildsRepo: func(repo, branch, goBranch string) bool {
			// This builder is still used by Go 1.17 and 1.16,
			// keep it around a bit longer. See go.dev/issue/49491.
			return atMostGo1(goBranch, 17) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:     "freebsd-amd64-12_3",
		HostType: "host-freebsd-12_3",
		tryBot:   defaultTrySet("sys"),

		distTestAdjust:    fasterTrybots, // If changing this policy, update TestShouldRunDistTest accordingly.
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:              "freebsd-386-12_3",
		HostType:          "host-freebsd-12_3",
		env:               []string{"GOARCH=386", "GOHOSTARCH=386"},
		distTestAdjust:    fasterTrybots,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:     "freebsd-amd64-race",
		HostType: "host-freebsd-13_0-big",
	})
	addBuilder(BuildConfig{
		Name:              "freebsd-amd64-13_0",
		HostType:          "host-freebsd-13_0",
		tryBot:            explicitTrySet("sys"),
		distTestAdjust:    fasterTrybots, // If changing this policy, update TestShouldRunDistTest accordingly.
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:              "freebsd-386-13_0",
		HostType:          "host-freebsd-13_0",
		tryBot:            explicitTrySet("sys"),
		env:               []string{"GOARCH=386", "GOHOSTARCH=386"},
		distTestAdjust:    fasterTrybots,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:           "freebsd-386-11_2",
		HostType:       "host-freebsd-11_2",
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         explicitTrySet("sys"),
		env:            []string{"GOARCH=386", "GOHOSTARCH=386"},
		buildsRepo: func(repo, branch, goBranch string) bool {
			// This builder is still used by Go 1.16 and 1.15,
			// so keep it around a bit longer. See golang.org/issue/45727.
			// Test relevant Go versions so that we're better informed.
			return atMostGo1(goBranch, 16) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:           "freebsd-386-11_4",
		HostType:       "host-freebsd-11_4",
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         explicitTrySet("sys"),
		env:            []string{"GOARCH=386", "GOHOSTARCH=386"},
		buildsRepo: func(repo, branch, goBranch string) bool {
			// This builder is still used by Go 1.17 and 1.16,
			// keep it around a bit longer. See go.dev/issue/49491.
			return atMostGo1(goBranch, 17) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:           "linux-386",
		HostType:       "host-linux-bullseye",
		distTestAdjust: fasterTrybots,
		tryBot:         defaultTrySet(),
		Notes:          "Debian stable (currently Debian bullseye).",
		env: []string{
			"GOARCH=386",
			"GOHOSTARCH=386",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
		numTestHelpers:    1,
		numTryTestHelpers: 3,
	})
	addBuilder(BuildConfig{
		Name:  "linux-386-softfloat",
		Notes: "GO386=softfloat",
		buildsRepo: func(repo, branch, goBranch string) bool {
			// GO386=softfloat is added in Go 1.16 (golang.org/issue/41848).
			return atLeastGo1(goBranch, 16) && (repo == "go" || repo == "crypto")
		},
		GoDeps: []string{
			"04b8a9fea57e37589d82410281f22ebde0027808", // CL 260017, "all: implement GO386=softfloat".
		},
		HostType: "host-linux-stretch",
		env:      []string{"GOARCH=386", "GOHOSTARCH=386", "GO386=softfloat"},
	})
	addBuilder(BuildConfig{
		Name:       "linux-amd64",
		HostType:   "host-linux-bullseye",
		tryBot:     defaultTrySet(),
		buildsRepo: defaultPlus("exp", "build", "vulndb"),
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
		numTestHelpers:    1,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:       "linux-amd64-vmx",
		HostType:   "host-linux-stretch-vmx",
		buildsRepo: disabledBuilder,
	})

	const testAlpine = false // Issue 22689 (hide all red builders), Issue 19938 (get Alpine passing)
	if testAlpine {
		addBuilder(BuildConfig{
			Name:     "linux-amd64-alpine",
			HostType: "host-linux-x86-alpine",
		})
	}

	// addMiscCompileGo1 adds a misc-compile TryBot that
	// runs buildall.bash on the specified target(s), up to 3 max.
	// The targets are matched against the "go tool dist list" name,
	// but with hyphens instead of forward slashes ("linux-amd64", etc).
	// If min is non-zero, it specifies the minimum Go 1.x version.
	addMiscCompileGo1 := func(min int, suffix string, targets ...string) {
		if len(targets) > 3 {
			// This limit will do until we have better visibility
			// into holistic TryBot completion times via metrics.
			panic("at most 3 targets may be specified to avoid making TryBots slow; see issues 32632 and 17104")
		}
		var v types.MajorMinor
		var alsoNote string
		if min != 0 {
			v = types.MajorMinor{1, min}
			alsoNote = fmt.Sprintf(" Applies to Go 1.%d and newer.", min)
		}
		addBuilder(BuildConfig{
			Name:     "misc-compile" + suffix,
			HostType: "host-linux-jessie",
			tryBot:   defaultTrySet(),
			env: []string{
				"GO_DISABLE_OUTBOUND_NETWORK=1",
			},
			tryOnly:          true,
			MinimumGoVersion: v,
			CompileOnly:      true,
			Notes:            "Runs buildall.bash to cross-compile & vet std+cmd packages for " + strings.Join(targets, " & ") + ", but doesn't run any tests." + alsoNote,
			allScriptArgs: []string{
				// Filtering pattern to buildall.bash:
				"^(" + strings.Join(targets, "|") + ")$",
			},
		})
	}
	// addMiscCompile adds a misc-compile TryBot
	// for all supported Go versions.
	addMiscCompile := func(suffix string, targets ...string) { addMiscCompileGo1(0, suffix, targets...) }

	// Arrange so that no more than 3 ports are tested sequentially in each misc-compile
	// TryBot to avoid any individual misc-compile TryBot from becoming a bottleneck for
	// overall TryBot completion time (currently 10 minutes; see golang.org/issue/17104).
	//
	// The TestTryBotsCompileAllPorts test is used to detect any gaps in TryBot coverage
	// when new ports are added, and the misc-compile pairs below can be re-arranged.
	//
	// (In the past, we used flexible regexp patterns that matched all architectures
	// for a given GOOS value. However, over time as new architectures were added,
	// some misc-compile TryBot could become much slower than others.)
	//
	// See golang.org/issue/32632.
	addMiscCompile("-mac-win", "darwin-amd64", "windows-arm", "windows-arm64")
	addMiscCompileGo1(16, "-darwinarm64", "darwin-arm64") // darwin/arm64 (for Go 1.16 and newer) only.
	addMiscCompile("-mips", "linux-mips", "linux-mips64")
	addMiscCompile("-mipsle", "linux-mipsle", "linux-mips64le")
	addMiscCompile("-ppc", "linux-ppc64", "linux-ppc64le", "aix-ppc64")
	addMiscCompile("-freebsd", "freebsd-386", "freebsd-arm", "freebsd-arm64")
	addMiscCompile("-netbsd", "netbsd-386", "netbsd-amd64")
	addMiscCompile("-netbsd-arm", "netbsd-arm", "netbsd-arm64")
	addMiscCompile("-openbsd", "openbsd-386", "openbsd-mips64")
	addMiscCompile("-openbsd-arm", "openbsd-arm", "openbsd-arm64")
	addMiscCompile("-plan9", "plan9-386", "plan9-amd64", "plan9-arm")
	addMiscCompile("-other-1", "solaris-amd64", "illumos-amd64", "dragonfly-amd64")
	addMiscCompile("-other-2", "linux-riscv64", "linux-s390x", "linux-arm-arm5") // 'linux-arm-arm5' is linux/arm with GOARM=5.

	// TODO: Issue 25963, get the misc-compile trybots for Android/iOS.
	// Then consider subrepos too, so "mobile" can at least be included
	// as a misc-compile for ^android- and ^ios-.

	addBuilder(BuildConfig{
		Name:     "linux-amd64-nocgo",
		HostType: "host-linux-bullseye",
		Notes:    "cgo disabled",
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := buildRepoByDefault(repo)
			switch repo {
			case "perf":
				// Requires sqlite, which requires cgo.
				b = false
			case "exp":
				b = true
			}
			return b
		},
		env: []string{
			"CGO_ENABLED=0",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
			// This USER=root was required for Docker-based builds but probably isn't required
			// in the VM anymore, since the buildlet probably already has this in its environment.
			// (It was required because without cgo, it couldn't find the username)
			"USER=root",
		},
	})
	addBuilder(BuildConfig{
		Name:       "linux-amd64-noopt",
		Notes:      "optimizations and inlining disabled",
		HostType:   "host-linux-bullseye",
		buildsRepo: onlyGo,
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
			"GO_GCFLAGS=-N -l",
		},
	})
	addBuilder(BuildConfig{
		Name:        "linux-amd64-ssacheck",
		HostType:    "host-linux-bullseye",
		buildsRepo:  onlyGo,
		tryBot:      nil, // TODO: add a func to conditionally run this trybot if compiler dirs are touched
		CompileOnly: true,
		Notes:       "SSA internal checks enabled",
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
			"GO_GCFLAGS=-d=ssa/check/on,dclstack",
		},
		GoDeps: []string{
			"f65abf6ddc8d1f3d403a9195fd74eaffa022b07f", // adds dclstack
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-staticlockranking",
		HostType: "host-linux-stretch",
		Notes:    "builder with GOEXPERIMENT=staticlockranking, see golang.org/issue/37937",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "go" && atLeastGo1(goBranch, 15)
		},
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
			"GOEXPERIMENT=staticlockranking",
		},
		GoDeps: []string{
			"02057906f7272a4787b8a0b5b7cafff8ad3024f0", // A master commit from 2020/03/19, just before CL 222925 and CL 207619 have landed.
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-unified",
		HostType: "host-linux-buster",
		Notes:    "builder with GOEXPERIMENT=unified, see golang.org/issue/46786",
		tryBot: func(repo, branch, goBranch string) bool {
			return (repo == "go" || repo == "tools") && (goBranch == "master" || goBranch == "dev.typeparams")
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			return (repo == "go" || repo == "tools") && (goBranch == "master" || goBranch == "dev.typeparams")
		},
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
			"GOEXPERIMENT=unified",
		},
		GoDeps: []string{
			"804ecc2581caf33ae347d6a1ce67436d1f74e93b", // CL 328215, which added GOEXPERIMENT=unified on dev.typeparams
		},
		numTestHelpers:    1,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:                "linux-amd64-racecompile",
		HostType:            "host-linux-bullseye",
		tryBot:              nil, // TODO: add a func to conditionally run this trybot if compiler dirs are touched
		CompileOnly:         true,
		SkipSnapshot:        true,
		StopAfterMake:       true,
		InstallRacePackages: []string{"cmd/compile", "cmd/link"},
		Notes:               "race-enabled cmd/compile and cmd/link",
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
		GoDeps: []string{
			"22f1b56dab29d397d2bdbdd603d85e60fb678089", // adds cmd/compile -c; Issue 20222
		},
	})
	addBuilder(BuildConfig{
		Name:              "linux-amd64-race",
		HostType:          "host-linux-bullseye",
		tryBot:            defaultTrySet(),
		buildsRepo:        defaultPlusExpBuild,
		distTestAdjust:    fasterTrybots,
		numTestHelpers:    1,
		numTryTestHelpers: 5,
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-clang",
		HostType: "host-linux-clang",
		Notes:    "Debian jessie + clang 3.9 instead of gcc",
		env:      []string{"CC=/usr/bin/clang", "GOHOSTARCH=386"},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-clang",
		HostType: "host-linux-clang",
		Notes:    "Debian jessie + clang 3.9 instead of gcc",
		env:      []string{"CC=/usr/bin/clang"},
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-sid",
		HostType: "host-linux-sid",
		Notes:    "Debian sid (unstable)",
		env:      []string{"GOHOSTARCH=386"},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-sid",
		HostType: "host-linux-sid",
		Notes:    "Debian sid (unstable)",
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-fedora",
		HostType: "host-linux-fedora",
		Notes:    "Fedora",
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-androidemu",
		HostType: "host-android-amd64-emu",
		env: []string{
			"GOARCH=amd64",
			"GOOS=linux",
			"CGO_ENABLED=1",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
		tryBot: func(repo, branch, goBranch string) bool {
			// Only for mobile repo for now, not "go":
			return repo == "mobile" && branch == "master" && goBranch == "master"
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "mobile" && branch == "master" && goBranch == "master"
		},
		Notes: "Runs GOOS=linux but with the Android emulator attached, for running x/mobile host tests.",
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-jessie",
		HostType: "host-linux-jessie",
		Notes:    "Debian Jessie.",
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:       "linux-amd64-stretch",
		HostType:   "host-linux-stretch",
		Notes:      "Debian Stretch. Same as the normal 'linux-amd64' builder at this time, but with -stretch suffix. Used for release builds.",
		buildsRepo: disabledBuilder, // Disabled because the "linux-amd64" builder does identical work.
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-bullseye",
		HostType: "host-linux-bullseye",
		Notes:    "Debian Bullseye.",
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-buster",
		HostType: "host-linux-buster",
		Notes:    "Debian Buster.",
		env: []string{
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-jessie",
		HostType: "host-linux-jessie",
		Notes:    "Debian Jessie, 32-bit builder.",
		env: []string{
			"GOARCH=386",
			"GOHOSTARCH=386",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-stretch",
		HostType: "host-linux-stretch",
		Notes:    "Debian Stretch, 32-bit builder.",
		env: []string{
			"GOARCH=386",
			"GOHOSTARCH=386",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-buster",
		HostType: "host-linux-buster",
		Notes:    "Debian Buster, 32-bit builder.",
		env: []string{
			"GOARCH=386",
			"GOHOSTARCH=386",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-longtest",
		HostType: "host-linux-stretch-morecpu",
		Notes:    "Debian Stretch with go test -short=false",
		tryBot: func(repo, branch, goBranch string) bool {
			onReleaseBranch := strings.HasPrefix(branch, "release-branch.")
			return repo == "go" && onReleaseBranch // See issue 37827.
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			// Test all repos, ignoring buildRepoByDefault.
			// For golang.org/x repos, don't test non-latest versions.
			return repo == "go" || (branch == "master" && goBranch == "master")
		},
		needsGoProxy: true, // for cmd/go module tests
		env: []string{
			"GO_TEST_TIMEOUT_SCALE=5", // give them lots of time
		},
		numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661.
	})
	addBuilder(BuildConfig{
		Name:     "linux-386-longtest",
		HostType: "host-linux-stretch-morecpu",
		Notes:    "Debian Stretch with go test -short=false; to get 32-bit coverage",
		tryBot: func(repo, branch, goBranch string) bool {
			onReleaseBranch := strings.HasPrefix(branch, "release-branch.")
			return repo == "go" && onReleaseBranch // See issue 37827.
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := buildRepoByDefault(repo)
			if repo != "go" && !(branch == "master" && goBranch == "master") {
				// For golang.org/x repos, don't test non-latest versions.
				b = false
			}
			return b
		},
		needsGoProxy: true, // for cmd/go module tests
		env: []string{
			"GOARCH=386",
			"GOHOSTARCH=386",
			"GO_TEST_TIMEOUT_SCALE=5", // give them lots of time
		},
		numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661.
	})
	addBuilder(BuildConfig{
		Name:     "js-wasm",
		HostType: "host-js-wasm",
		tryBot:   explicitTrySet("go"),
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := buildRepoByDefault(repo)
			switch repo {
			case "benchmarks", "debug", "perf", "talks", "tools", "tour", "website":
				// Don't test these golang.org/x repos.
				b = false
			}
			if repo != "go" && !(branch == "master" && goBranch == "master") {
				// For golang.org/x repos, don't test non-latest versions.
				b = false
			}
			return b
		},

		distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
			if isNormalTry {
				if strings.Contains(distTest, "/internal/") ||
					strings.Contains(distTest, "vendor/golang.org/x/arch") {
					return false
				}
				switch distTest {
				case "cmd/go", "nolibgcc:crypto/x509", "reboot":
					return false
				}
			}
			return run
		},
		numTryTestHelpers: 5,
		env: []string{
			"GOOS=js", "GOARCH=wasm", "GOHOSTOS=linux", "GOHOSTARCH=amd64",
			"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workdir/go/misc/wasm",
			"GO_DISABLE_OUTBOUND_NETWORK=1",
		},
	})
	addBuilder(BuildConfig{
		Name:              "openbsd-amd64-68",
		HostType:          "host-openbsd-amd64-68",
		tryBot:            defaultTrySet(),
		distTestAdjust:    noTestDirAndNoReboot,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:     "openbsd-386-68",
		HostType: "host-openbsd-386-68",
		tryBot:   explicitTrySet("sys"),
		buildsRepo: func(repo, branch, goBranch string) bool {
			if repo == "review" {
				// https://golang.org/issue/49529: git seems to be too slow on this
				// platform.
				return false
			}
			return buildRepoByDefault(repo)
		},
		distTestAdjust:    noTestDirAndNoReboot,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:           "openbsd-amd64-70",
		HostType:       "host-openbsd-amd64-70",
		tryBot:         defaultTrySet(),
		distTestAdjust: noTestDirAndNoReboot,
		buildsRepo: func(repo, branch, goBranch string) bool {
			// https://github.com/golang/go/issues/48977#issuecomment-971763553:
			// 1.16 seems to be incompatible with 7.0.
			return atLeastGo1(goBranch, 17) && buildRepoByDefault(repo)
		},
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:     "openbsd-386-70",
		HostType: "host-openbsd-386-70",
		tryBot:   explicitTrySet("sys"),
		buildsRepo: func(repo, branch, goBranch string) bool {
			if repo == "review" {
				// https://golang.org/issue/49529: git seems to be too slow on this
				// platform.
				return false
			}
			// https://github.com/golang/go/issues/48977#issuecomment-971763553:
			// 1.16 seems to be incompatible with 7.0.
			return atLeastGo1(goBranch, 17) && buildRepoByDefault(repo)
		},
		distTestAdjust:    noTestDirAndNoReboot,
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		// This builder is only for the runtime team to use investigating golang/go#49209.
		Name:           "openbsd-386-70-n2d",
		HostType:       "host-openbsd-386-70-n2d",
		buildsRepo:     disabledBuilder,
		distTestAdjust: noTestDirAndNoReboot,
	})
	addBuilder(BuildConfig{
		Name:         "openbsd-arm-jsing",
		HostType:     "host-openbsd-arm-joelsing",
		SkipSnapshot: true,
		FlakyNet:     true,
		buildsRepo: func(repo, branch, goBranch string) bool {
			switch repo {
			case "go", "net", "sys":
				return branch == "master" && goBranch == "master"
			default:
				return false
			}
		},
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         nil,
		env: []string{
			// The machine is slow.
			"GO_TEST_TIMEOUT_SCALE=5",
		},
	})
	addBuilder(BuildConfig{
		Name:         "openbsd-arm64-jsing",
		HostType:     "host-openbsd-arm64-joelsing",
		SkipSnapshot: true,
		FlakyNet:     true,
		buildsRepo: func(repo, branch, goBranch string) bool {
			switch repo {
			case "go", "net", "sys":
				return branch == "master" && goBranch == "master"
			default:
				return false
			}
		},
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         nil,
		env: []string{
			// The machine is slow.
			"GO_TEST_TIMEOUT_SCALE=5",
		},
	})
	addBuilder(BuildConfig{
		Name:         "openbsd-mips64-jsing",
		HostType:     "host-openbsd-mips64-joelsing",
		SkipSnapshot: true,
		FlakyNet:     true,
		buildsRepo: func(repo, branch, goBranch string) bool {
			switch repo {
			case "go", "net", "sys":
				return branch == "master" && goBranch == "master"
			default:
				return false
			}
		},
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         nil,
		env: []string{
			// The machine is slow.
			"GO_TEST_TIMEOUT_SCALE=5",
		},
	})
	addBuilder(BuildConfig{
		Name:           "netbsd-amd64-9_0",
		HostType:       "host-netbsd-amd64-9_0",
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         explicitTrySet("sys"),
	})
	addBuilder(BuildConfig{
		Name:           "netbsd-386-9_0",
		HostType:       "host-netbsd-386-9_0",
		distTestAdjust: noTestDirAndNoReboot,
	})
	addBuilder(BuildConfig{
		Name:     "netbsd-arm-bsiegert",
		HostType: "host-netbsd-arm-bsiegert",
		buildsRepo: func(repo, branch, goBranch string) bool {
			if repo == "review" {
				// https://golang.org/issue/49530: This test seems to be too slow even
				// with a long scale factor.
				return false
			}
			return buildRepoByDefault(repo)
		},
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         nil,
		env: []string{
			// The machine is slow.
			"GO_TEST_TIMEOUT_SCALE=10",
		},
	})
	addBuilder(BuildConfig{
		Name:     "netbsd-arm64-bsiegert",
		HostType: "host-netbsd-arm64-bsiegert",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return atLeastGo1(goBranch, 16) && buildRepoByDefault(repo)
		},
		distTestAdjust: noTestDirAndNoReboot,
		tryBot:         nil,
		env: []string{
			// The machine is slow.
			"GO_TEST_TIMEOUT_SCALE=10",
		},
	})
	addBuilder(BuildConfig{
		Name:           "plan9-386",
		HostType:       "host-plan9-386-gce",
		numTestHelpers: 1,
		tryOnly:        true, // disable it for now; Issue 31261, Issue 29801
		distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
			switch distTest {
			case "api",
				"go_test:cmd/go": // takes over 20 minutes without working SMP
				return false
			}
			return run
		},
		buildsRepo: plan9Default,
	})
	addBuilder(BuildConfig{
		Name:           "windows-amd64-2008",
		HostType:       "host-windows-amd64-2008",
		distTestAdjust: noTestDirAndNoReboot,
		buildsRepo:     onlyGo,
		env: []string{
			"GOARCH=amd64",
			"GOHOSTARCH=amd64",
			// cmd/go takes ~188 seconds on windows-amd64
			// now, which is over the 180 second default
			// dist test timeout. So, bump this builder
			// up:
			"GO_TEST_TIMEOUT_SCALE=2",
		},
	})
	addBuilder(BuildConfig{
		Name:              "windows-386-2008",
		HostType:          "host-windows-amd64-2008",
		buildsRepo:        defaultPlusExpBuild,
		distTestAdjust:    fasterTrybots,
		env:               []string{"GOARCH=386", "GOHOSTARCH=386"},
		tryBot:            defaultTrySet(),
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:              "windows-386-2012",
		HostType:          "host-windows-amd64-2012",
		distTestAdjust:    fasterTrybots,
		buildsRepo:        onlyGo,
		env:               []string{"GOARCH=386", "GOHOSTARCH=386"},
		tryBot:            defaultTrySet(),
		numTryTestHelpers: 4,
	})
	addBuilder(BuildConfig{
		Name:           "windows-amd64-2012",
		HostType:       "host-windows-amd64-2012",
		distTestAdjust: noTestDirAndNoReboot,
		buildsRepo:     onlyGo,
		env: []string{
			"GOARCH=amd64",
			"GOHOSTARCH=amd64",
			// cmd/go takes ~188 seconds on windows-amd64
			// now, which is over the 180 second default
			// dist test timeout. So, bump this builder
			// up:
			"GO_TEST_TIMEOUT_SCALE=2",
		},
	})
	addBuilder(BuildConfig{
		Name:           "windows-amd64-2016",
		HostType:       "host-windows-amd64-2016",
		buildsRepo:     defaultPlusExpBuild,
		distTestAdjust: fasterTrybots,
		env: []string{
			"GOARCH=amd64",
			"GOHOSTARCH=amd64",
			// cmd/go takes ~188 seconds on windows-amd64
			// now, which is over the 180 second default
			// dist test timeout. So, bump this builder
			// up:
			"GO_TEST_TIMEOUT_SCALE=2",
		},
		tryBot:            defaultTrySet(),
		numTryTestHelpers: 5,
	})
	addBuilder(BuildConfig{
		Name:     "windows-amd64-longtest",
		HostType: "host-windows-amd64-2016-big",
		Notes:    "Windows Server 2016 with go test -short=false",
		tryBot: func(repo, branch, goBranch string) bool {
			onReleaseBranch := strings.HasPrefix(branch, "release-branch.")
			return repo == "go" && onReleaseBranch // See issue 37827.
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := defaultPlusExpBuild(repo, branch, goBranch)
			if repo != "go" && !(branch == "master" && goBranch == "master") {
				// For golang.org/x repos, don't test non-latest versions.
				b = false
			}
			return b
		},
		needsGoProxy: true, // for cmd/go module tests
		env: []string{
			"GO_TEST_TIMEOUT_SCALE=5", // give them lots of time
		},
		numTryTestHelpers: 4, // Target time is < 15 min for golang.org/issue/42661.
	})
	addBuilder(BuildConfig{
		Name:     "windows-amd64-race",
		HostType: "host-windows-amd64-2016-big",
		Notes:    "Only runs -race tests (./race.bat)",
		env: []string{
			"GOARCH=amd64",
			"GOHOSTARCH=amd64",
			// cmd/go takes ~188 seconds on windows-amd64
			// now, which is over the 180 second default
			// dist test timeout. So, bump this builder
			// up:
			"GO_TEST_TIMEOUT_SCALE=2"},
	})
	addBuilder(BuildConfig{
		Name:     "windows-arm-zx2c4",
		HostType: "host-windows-arm64-zx2c4",
		env: []string{
			"GOARM=7",
			"GO_TEST_TIMEOUT_SCALE=3"},
	})
	addBuilder(BuildConfig{
		Name:              "windows-arm64-10",
		HostType:          "host-windows-arm64-mini",
		numTryTestHelpers: 1,
		buildsRepo: func(repo, branch, goBranch string) bool {
			return atLeastGo1(goBranch, 17) && buildRepoByDefault(repo)
		},
		env: []string{
			"GOARCH=arm64",
		},
	})
	addBuilder(BuildConfig{
		Name:              "windows-arm64-11",
		HostType:          "host-windows11-arm64-mini",
		numTryTestHelpers: 1,
		buildsRepo: func(repo, branch, goBranch string) bool {
			return atLeastGo1(goBranch, 18) && buildRepoByDefault(repo)
		},
		env: []string{
			"GOARCH=arm64",
		},
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-10_12",
		HostType:       "host-darwin-10_12",
		distTestAdjust: macTestPolicy,
		buildsRepo: func(repo, branch, goBranch string) bool {
			// macOS 10.12 not supported after Go 1.16
			return atMostGo1(goBranch, 16) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-10_14",
		HostType:       "host-darwin-10_14",
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExp,
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-10_15",
		HostType:       "host-darwin-10_15",
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExpBuild,
		env: []string{
			// Find out via at least one builder if having -mmacosx-version-min
			// set via CGO_CFLAGS causes unexpected problems. This env var will
			// also be set by cmd/release during a release. See issue 50892.
			"CGO_CFLAGS=-mmacosx-version-min=10.13",
		},
		Notes: "Unlike other darwin/amd64 builders, this one sets CGO_CFLAGS=-mmacosx-version-min=10.13 in env.",
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-11_0",
		HostType:       "host-darwin-amd64-11_0",
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExpBuild,
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-12_0",
		HostType:       "host-darwin-amd64-12_0",
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExpBuild,
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-nocgo",
		HostType:       "host-darwin-amd64-12_0",
		distTestAdjust: noTestDirAndNoReboot,
		env:            []string{"CGO_ENABLED=0"},
	})
	addBuilder(BuildConfig{
		Name:           "darwin-arm64-11_0-toothrot",
		HostType:       "host-darwin-arm64-11_0-toothrot",
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExpBuild,
	})
	addBuilder(BuildConfig{
		Name:           "darwin-arm64-12_0-toothrot",
		HostType:       "host-darwin-arm64-12_0-toothrot",
		KnownIssue:     49149,
		distTestAdjust: macTestPolicy,
		buildsRepo:     defaultPlusExpBuild,
	})
	addBuilder(BuildConfig{
		Name:           "darwin-amd64-race",
		HostType:       "host-darwin-amd64-12_0",
		distTestAdjust: macTestPolicy,
		buildsRepo:     onlyGo,
	})
	addBuilder(BuildConfig{
		Name:     "ios-arm64-corellium",
		HostType: "host-ios-arm64-corellium-ios",
		Notes:    "Virtual iPhone SE running on Corellium; owned by zenly (github.com/znly)",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "go" && branch == "master" && goBranch == "master"
		},
	})
	addBuilder(BuildConfig{
		Name:     "android-arm64-corellium",
		HostType: "host-android-arm64-corellium-android",
		Notes:    "Virtual Android running on Corellium; owned by zenly (github.com/znly)",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "go" && branch == "master" && goBranch == "master"
		},
	})
	addBuilder(BuildConfig{
		Name:     "android-arm-corellium",
		HostType: "host-android-arm64-corellium-android",
		Notes:    "Virtual Android running on Corellium; owned by zenly (github.com/znly)",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "go" && branch == "master" && goBranch == "master"
		},
		env: []string{
			"CGO_ENABLED=1",
			"GOARCH=arm",
		},
	})
	addBuilder(BuildConfig{
		Name:     "android-386-emu",
		HostType: "host-android-amd64-emu", // same amd64 host is used for 386 builder
		Notes:    "Android emulator on GCE",
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := buildRepoByDefault(repo)
			switch repo {
			case "mobile":
				b = true
			case "build", "blog", "talks", "review", "tour", "website":
				b = false
			}
			return b
		},
		env: []string{
			"GOARCH=386",
			"GOOS=android",
			"GOHOSTARCH=amd64",
			"GOHOSTOS=linux",
			"CGO_ENABLED=1",
		},
	})
	addBuilder(BuildConfig{
		Name:              "android-amd64-emu",
		HostType:          "host-android-amd64-emu",
		Notes:             "Android emulator on GCE",
		numTryTestHelpers: 3,
		tryBot: func(repo, branch, goBranch string) bool {
			switch repo {
			case "go", "mobile", "sys", "net", "tools", "crypto", "sync", "text", "time":
				return atLeastGo1(branch, 13) && atLeastGo1(goBranch, 13)
			}
			return false
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			b := buildRepoByDefault(repo)
			switch repo {
			case "mobile":
				b = true
			case "build", "blog", "talks", "review", "tour", "website":
				b = false
			}
			return b
		},
		env: []string{
			"GOARCH=amd64",
			"GOOS=android",
			"GOHOSTARCH=amd64",
			"GOHOSTOS=linux",
			"CGO_ENABLED=1",
		},
	})
	addBuilder(BuildConfig{
		Name:             "illumos-amd64",
		HostType:         "host-illumos-amd64-jclulow",
		MinimumGoVersion: types.MajorMinor{1, 13},
	})
	addBuilder(BuildConfig{
		Name:     "solaris-amd64-oraclerel",
		HostType: "host-solaris-oracle-amd64-oraclerel",
		Notes:    "Oracle Solaris release version",
		FlakyNet: true,
	})
	addBuilder(BuildConfig{
		Name:           "linux-ppc64-buildlet",
		HostType:       "host-linux-ppc64-osu",
		FlakyNet:       true,
		distTestAdjust: ppc64DistTestPolicy,
		env:            []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422
	})
	addBuilder(BuildConfig{
		Name:           "linux-ppc64le-buildlet",
		HostType:       "host-linux-ppc64le-osu",
		FlakyNet:       true,
		distTestAdjust: ppc64DistTestPolicy,
		env:            []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422
	})
	addBuilder(BuildConfig{
		Name:           "linux-ppc64le-power9osu",
		HostType:       "host-linux-ppc64le-power9-osu",
		FlakyNet:       true,
		distTestAdjust: ppc64DistTestPolicy,
		env:            []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issues/44422
	})
	addBuilder(BuildConfig{
		Name:     "linux-arm64-packet",
		HostType: "host-linux-arm64-packet",
		FlakyNet: true, // maybe not flaky, but here conservatively
	})
	addBuilder(BuildConfig{
		Name:              "linux-arm64-aws",
		HostType:          "host-linux-arm64-aws",
		tryBot:            defaultTrySet(),
		numTryTestHelpers: 1,
	})
	addBuilder(BuildConfig{
		Name:              "linux-arm-aws",
		HostType:          "host-linux-arm-aws",
		tryBot:            defaultTrySet(),
		numTryTestHelpers: 1,
		env: []string{
			"GOARCH=arm",
			"GOARM=6",
			"GOHOSTARCH=arm",
		},
	})
	addBuilder(BuildConfig{
		HostType:       "host-linux-loong64-3a5000",
		Name:           "linux-loong64-3a5000",
		SkipSnapshot:   true,
		distTestAdjust: loong64DistTestPolicy,
		buildsRepo:     loong64BuildsRepoPolicy,
		env: []string{
			"GOARCH=loong64",
			"GOHOSTARCH=loong64",
		},
		KnownIssue: 46229,
	})
	addBuilder(BuildConfig{
		FlakyNet:       true,
		HostType:       "host-linux-mipsle-mengzhuo",
		Name:           "linux-mips64le-mengzhuo",
		buildsRepo:     onlyMasterDefault,
		distTestAdjust: mipsDistTestPolicy,
	})
	addBuilder(BuildConfig{
		FlakyNet:       true,
		HostType:       "host-linux-mips64le-rtrk",
		Name:           "linux-mips64le-rtrk",
		SkipSnapshot:   true,
		distTestAdjust: mipsDistTestPolicy,
		buildsRepo:     mipsBuildsRepoPolicy,
		env: []string{
			"GOARCH=mips64le",
			"GOHOSTARCH=mips64le",
		},
	})
	addBuilder(BuildConfig{
		FlakyNet:       true,
		HostType:       "host-linux-mips64le-rtrk",
		Name:           "linux-mipsle-rtrk",
		SkipSnapshot:   true,
		distTestAdjust: mipsDistTestPolicy,
		buildsRepo:     mipsBuildsRepoPolicy,
		env: []string{
			"GOARCH=mipsle",
			"GOHOSTARCH=mipsle",
		},
	})
	addBuilder(BuildConfig{
		FlakyNet:       true,
		HostType:       "host-linux-mips64-rtrk",
		Name:           "linux-mips64-rtrk",
		SkipSnapshot:   true,
		distTestAdjust: mipsDistTestPolicy,
		buildsRepo:     mipsBuildsRepoPolicy,
		env: []string{
			"GOARCH=mips64",
			"GOHOSTARCH=mips64",
		},
	})
	addBuilder(BuildConfig{
		FlakyNet:       true,
		HostType:       "host-linux-mips64-rtrk",
		Name:           "linux-mips-rtrk",
		SkipSnapshot:   true,
		distTestAdjust: mipsDistTestPolicy,
		buildsRepo:     mipsBuildsRepoPolicy,
		env: []string{
			"GOARCH=mips",
			"GOHOSTARCH=mips",
		},
	})
	addBuilder(BuildConfig{
		HostType:       "host-linux-riscv64-joelsing",
		Name:           "linux-riscv64-jsing",
		SkipSnapshot:   true,
		FlakyNet:       true,
		env:            []string{"GO_TEST_TIMEOUT_SCALE=4"},
		distTestAdjust: riscvDistTestPolicy,
		buildsRepo: func(repo, branch, goBranch string) bool {
			switch repo {
			case "go", "net", "sys":
				return branch == "master" && goBranch == "master"
			default:
				return false
			}
		},
	})
	addBuilder(BuildConfig{
		HostType:       "host-linux-riscv64-unmatched",
		Name:           "linux-riscv64-unmatched",
		env:            []string{"GO_TEST_TIMEOUT_SCALE=4"},
		FlakyNet:       true,
		buildsRepo:     onlyMasterDefault,
		distTestAdjust: riscvDistTestPolicy,
	})
	addBuilder(BuildConfig{
		Name:           "linux-s390x-ibm",
		HostType:       "host-linux-s390x",
		numTestHelpers: 0,
		FlakyNet:       true,
	})
	addBuilder(BuildConfig{
		Name:        "linux-s390x-crosscompile",
		HostType:    "host-s390x-cross",
		Notes:       "s390x cross-compile builder for releases; doesn't run tests",
		CompileOnly: true,
		tryOnly:     true, // but not in trybot set for now
		env: []string{
			"CGO_ENABLED=1",
			"GOARCH=s390x",
			"GOHOSTARCH=amd64",
			"CC_FOR_TARGET=s390x-linux-gnu-gcc",
		},
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-localdev",
		HostType: "host-linux-amd64-localdev",
		Notes:    "for localhost development only",
		tryOnly:  true,
	})
	addBuilder(BuildConfig{
		Name:           "dragonfly-amd64",
		HostType:       "host-dragonfly-amd64-master",
		Notes:          "DragonFly BSD master, run by DragonFly team",
		distTestAdjust: noTestDirAndNoReboot,
		env:            []string{"GO_TEST_TIMEOUT_SCALE=2"}, // see golang.org/issue/45216
		SkipSnapshot:   true,
		buildsRepo: func(repo, branch, goBranch string) bool {
			return atLeastGo1(goBranch, 14) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:           "freebsd-arm-paulzhol",
		HostType:       "host-freebsd-arm-paulzhol",
		distTestAdjust: noTestDirAndNoReboot,
		SkipSnapshot:   true,
		FlakyNet:       true,
		buildsRepo: func(repo, branch, goBranch string) bool {
			// This was a fragile little machine with limited memory.
			// Only run a few of the core subrepos for now while
			// we figure out what's killing it.
			switch repo {
			case "go", "sys", "net":
				return true
			}
			return false
		},
		env: []string{
			"GOARM=7",
			"CGO_ENABLED=1",
		},
	})
	addBuilder(BuildConfig{
		Name:     "freebsd-arm64-dmgk",
		HostType: "host-freebsd-arm64-dmgk",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return atLeastGo1(goBranch, 14) && buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:           "plan9-arm",
		HostType:       "host-plan9-arm-0intro",
		distTestAdjust: noTestDirAndNoReboot,
		buildsRepo:     plan9Default,
	})
	addBuilder(BuildConfig{
		Name:     "plan9-amd64-0intro",
		HostType: "host-plan9-amd64-0intro",
		distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
			run = noTestDirAndNoReboot(run, distTest, isNormalTry)
			switch distTest {
			case "api",
				"go_test:cmd/go": // takes over 20 minutes without working SMP
				return false
			}
			return run
		},
		buildsRepo: plan9Default,
	})
	addBuilder(BuildConfig{
		Name:     "plan9-386-0intro",
		HostType: "host-plan9-386-0intro",
		distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
			run = noTestDirAndNoReboot(run, distTest, isNormalTry)
			switch distTest {
			case "api",
				"go_test:cmd/go": // takes over 20 minutes without working SMP
				return false
			}
			return run
		},
		buildsRepo: plan9Default,
	})
	addBuilder(BuildConfig{
		Name:             "aix-ppc64",
		HostType:         "host-aix-ppc64-osuosl",
		MinimumGoVersion: types.MajorMinor{1, 12},
		env: []string{
			"PATH=/opt/freeware/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin",
		},
		buildsRepo: func(repo, branch, goBranch string) bool {
			switch repo {
			case "vulndb", "vuln":
				// vulndb currently uses a dependency which does not build cleanly
				// on aix-ppc64. Until that issue is resolved, skip vulndb on
				// this builder.
				// (https://golang.org/issue/49218).
				return false
			}
			return buildRepoByDefault(repo)
		},
	})
	addBuilder(BuildConfig{
		Name:         "linux-amd64-wsl",
		HostType:     "host-linux-amd64-wsl",
		Notes:        "Windows 10 WSL2 Ubuntu",
		FlakyNet:     true,
		SkipSnapshot: true, // The builder has a slow uplink bandwidth.
	})
	addBuilder(BuildConfig{
		Name:     "linux-amd64-perf",
		HostType: "host-linux-amd64-perf",
		Notes:    "Performance testing for linux-amd64",
		buildsRepo: func(repo, branch, goBranch string) bool {
			return repo == "benchmarks"
		},
		RunBench:     true,
		SkipSnapshot: true,
	})
}