Skip to content

Commit

Permalink
dashboard: make post-submit subrepo misc-compile builders into trybots
Browse files Browse the repository at this point in the history
This change turns the experimental post-submit subrepo misc-compile
builders into proper misc-compile trybots.

Fixes golang/go#58163.

Change-Id: I4ca68ea89bb26370e7da3baa104a12f3f063399f
Reviewed-on: https://go-review.googlesource.com/c/build/+/464958
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
  • Loading branch information
mknyszek committed Feb 3, 2023
1 parent a695691 commit 4a5d2d0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 80 deletions.
55 changes: 7 additions & 48 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -1461,14 +1461,10 @@ func explicitTrySet(projs ...string) func(proj, branch, goBranch string) bool {
// should use trybots based on the platform.
func crossCompileBuildSet(goos, goarch string) func(proj, branch, goBranch string) bool {
return func(proj, branch, goBranch string) bool {
if branch != "master" {
// TODO(#58163): Remove this once we finish testing misc-compile builders for subrepos.
return false
if proj != "go" && branch != "master" {
return false // #58311
}
switch proj {
case "go":
// TODO(#58163): Remove this once we finish testing misc-compile builders for subrepos.
return false
case "benchmarks":
return goarch != "loong64" // #58306
case "build":
Expand Down Expand Up @@ -1606,13 +1602,13 @@ func init() {
addBuilder(BuildConfig{
Name: "misc-compile-" + platform,
HostType: "host-linux-amd64-bullseye",
tryBot: onlyGo,
tryBot: crossCompileBuildSet(goos, goarch),
env: append(extraEnv, "GO_DISABLE_OUTBOUND_NETWORK=1", "GOOS="+goos, "GOARCH="+goarch),
tryOnly: true,
MinimumGoVersion: v,
CompileOnly: true,
SkipSnapshot: true,
Notes: "Runs make.bash for " + platform + ", but doesn't run any tests." + alsoNote,
Notes: "Runs make.bash (or compile-only go test) for " + platform + ", but doesn't run any tests." + alsoNote,
})
}
// addMiscCompile adds a misc-compile TryBot
Expand Down Expand Up @@ -1662,39 +1658,6 @@ func init() {
addMiscCompileGo1(0, "linux", "arm", "-arm5", "GOARM=5")
addMiscCompileGo1(20, "freebsd", "riscv64", "-go1.20")

tryNewMiscCompileForSubrepos("windows", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("windows", "arm64", "", 58163, nil)
tryNewMiscCompileForSubrepos("darwin", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("darwin", "arm64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "mips", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "mips64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "mipsle", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "mips64le", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "ppc64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "ppc64le", "", 58163, nil)
tryNewMiscCompileForSubrepos("aix", "ppc64", "", 58163, nil)
tryNewMiscCompileForSubrepos("freebsd", "386", "", 58163, nil)
tryNewMiscCompileForSubrepos("freebsd", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("freebsd", "arm64", "", 58163, nil)
tryNewMiscCompileForSubrepos("netbsd", "386", "", 58163, nil)
tryNewMiscCompileForSubrepos("netbsd", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("netbsd", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("netbsd", "arm64", "", 58163, nil)
tryNewMiscCompileForSubrepos("openbsd", "386", "", 58163, nil)
tryNewMiscCompileForSubrepos("openbsd", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("openbsd", "arm64", "", 58163, nil)
tryNewMiscCompileForSubrepos("plan9", "386", "", 58163, nil)
tryNewMiscCompileForSubrepos("plan9", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("plan9", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("solaris", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("illumos", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("dragonfly", "amd64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "loong64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "riscv64", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "s390x", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "arm", "", 58163, nil)
tryNewMiscCompileForSubrepos("linux", "arm", "-arm5", 58163, nil, "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-.
Expand Down Expand Up @@ -3103,22 +3066,18 @@ func addBuilder(c BuildConfig) {
Builders[c.Name] = &c
}

// tryNewMiscCompileForSubrepos is an intermediate step towards adding a real addMiscCompile TryBot
// for only subrepos.
// tryNewMiscCompile is an intermediate step towards adding a real addMiscCompile TryBot.
//
// It adds a post-submit-only builder with KnownIssue, GoDeps set to the provided values,
// and runs on a limited set of branches to get test results without potential disruption
// for contributors. It can be modified as needed when onboarding a misc-compile builder.
//
// TODO(#58163): This function is supposed to be for all repos, but while we set up misc-compile
// builders for subrepos we first only want to add it as a post-submit builder.
func tryNewMiscCompileForSubrepos(goos, goarch, extraSuffix string, knownIssue int, goDeps []string, extraEnv ...string) {
func tryNewMiscCompile(goos, goarch, extraSuffix string, knownIssue int, goDeps []string, extraEnv ...string) {
if knownIssue == 0 {
panic("tryNewMiscCompile: knownIssue parameter must be non-zero")
}
platform := goos + "-" + goarch + extraSuffix
addBuilder(BuildConfig{
Name: "misc-compile-" + platform + "-subrepo",
Name: "misc-compile-" + platform,
HostType: "host-linux-amd64-bullseye",
buildsRepo: crossCompileBuildSet(goos, goarch),
KnownIssues: []int{knownIssue},
Expand Down
66 changes: 34 additions & 32 deletions dashboard/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,40 @@ func TestTrybots(t *testing.T) {
"openbsd-386-72",
"openbsd-amd64-72",
"windows-amd64-2016",

"misc-compile-windows-arm",
"misc-compile-windows-arm64",
"misc-compile-darwin-amd64",
"misc-compile-darwin-arm64",
"misc-compile-linux-mips",
"misc-compile-linux-mips64",
"misc-compile-linux-mipsle",
"misc-compile-linux-mips64le",
"misc-compile-linux-ppc64",
"misc-compile-linux-ppc64le",
"misc-compile-aix-ppc64",
"misc-compile-freebsd-386",
"misc-compile-freebsd-arm",
"misc-compile-freebsd-arm64",
"misc-compile-netbsd-386",
"misc-compile-netbsd-amd64",
"misc-compile-netbsd-arm",
"misc-compile-netbsd-arm64",
"misc-compile-openbsd-386",
"misc-compile-openbsd-arm",
"misc-compile-openbsd-arm64",
"misc-compile-plan9-386",
"misc-compile-plan9-amd64",
"misc-compile-plan9-arm",
"misc-compile-solaris-amd64",
"misc-compile-illumos-amd64",
"misc-compile-dragonfly-amd64",
"misc-compile-linux-loong64",
"misc-compile-linux-riscv64",
"misc-compile-linux-s390x",
"misc-compile-linux-arm",
"misc-compile-linux-arm-arm5",
"misc-compile-freebsd-riscv64-go1.20",
},
},
{
Expand Down Expand Up @@ -397,38 +431,6 @@ func TestPostSubmit(t *testing.T) {
want: []string{
"linux-amd64",
"linux-amd64-longtest",

"misc-compile-windows-arm-subrepo",
"misc-compile-windows-arm64-subrepo",
"misc-compile-darwin-amd64-subrepo",
"misc-compile-darwin-arm64-subrepo",
"misc-compile-linux-mips-subrepo",
"misc-compile-linux-mips64-subrepo",
"misc-compile-linux-mipsle-subrepo",
"misc-compile-linux-mips64le-subrepo",
"misc-compile-linux-ppc64-subrepo",
"misc-compile-linux-ppc64le-subrepo",
"misc-compile-freebsd-386-subrepo",
"misc-compile-freebsd-arm-subrepo",
"misc-compile-freebsd-arm64-subrepo",
"misc-compile-netbsd-386-subrepo",
"misc-compile-netbsd-amd64-subrepo",
"misc-compile-netbsd-arm-subrepo",
"misc-compile-netbsd-arm64-subrepo",
"misc-compile-openbsd-386-subrepo",
"misc-compile-openbsd-arm-subrepo",
"misc-compile-openbsd-arm64-subrepo",
"misc-compile-plan9-386-subrepo",
"misc-compile-plan9-amd64-subrepo",
"misc-compile-plan9-arm-subrepo",
"misc-compile-solaris-amd64-subrepo",
"misc-compile-illumos-amd64-subrepo",
"misc-compile-dragonfly-amd64-subrepo",
"misc-compile-linux-loong64-subrepo",
"misc-compile-linux-riscv64-subrepo",
"misc-compile-linux-s390x-subrepo",
"misc-compile-linux-arm-subrepo",
"misc-compile-linux-arm-arm5-subrepo",
},
},
}
Expand Down

0 comments on commit 4a5d2d0

Please sign in to comment.