зеркало из https://github.com/golang/build.git
cmd/release, dashboard: implement builder plan for Go 1.16
See https://golang.org/issues/40561#issuecomment-731482962 for the plan description and rationale. Add new builder definitions that are needed for the plan. Don't rely on generic builder name like "linux-amd64" to avoid a repeat of golang.org/issue/31293; use a specific builder name instead. Remove support and test cases for Go 1.13, it's unsupported per release policy. For golang/go#40561. Change-Id: I070744e15be9f1932d649a27ee7e4599e467553f Reviewed-on: https://go-review.googlesource.com/c/build/+/276034 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Родитель
0949104402
Коммит
90d5e7c418
|
@ -151,29 +151,30 @@ var builds = []*Build{
|
||||||
Builder: "linux-amd64",
|
Builder: "linux-amd64",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GoQuery: ">= go1.16beta1",
|
||||||
OS: "linux",
|
OS: "linux",
|
||||||
Arch: "386",
|
Arch: "386",
|
||||||
Builder: "linux-386",
|
Builder: "linux-386-stretch",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GoQuery: ">= go1.16beta1",
|
||||||
OS: "linux",
|
OS: "linux",
|
||||||
Arch: "arm",
|
Arch: "arm",
|
||||||
Builder: "linux-arm",
|
Builder: "linux-arm-aws",
|
||||||
Goarm: 6, // for compatibility with all Raspberry Pi models.
|
Goarm: 6, // For compatibility with all Raspberry Pi models.
|
||||||
// The tests take too long for the release packaging.
|
|
||||||
// Much of the time the whole buildlet times out.
|
|
||||||
SkipTests: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GoQuery: ">= go1.16beta1",
|
||||||
OS: "linux",
|
OS: "linux",
|
||||||
Arch: "amd64",
|
Arch: "amd64",
|
||||||
Race: true,
|
Race: true,
|
||||||
Builder: "linux-amd64-jessie", // using Jessie for at least [Go 1.11, Go 1.13] due to golang.org/issue/31293
|
Builder: "linux-amd64-stretch", // Using Stretch as of Go 1.16 because Jessie LTS has ended (golang.org/issue/40561#issuecomment-731482962).
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
GoQuery: ">= go1.16beta1",
|
||||||
OS: "linux",
|
OS: "linux",
|
||||||
Arch: "arm64",
|
Arch: "arm64",
|
||||||
Builder: "linux-arm64-packet",
|
Builder: "linux-arm64-aws",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
GoQuery: ">= go1.15rc2", // See #40563.
|
GoQuery: ">= go1.15rc2", // See #40563.
|
||||||
|
@ -223,6 +224,35 @@ var builds = []*Build{
|
||||||
},
|
},
|
||||||
|
|
||||||
// Older builds.
|
// Older builds.
|
||||||
|
{
|
||||||
|
GoQuery: "< go1.16beta1",
|
||||||
|
OS: "linux",
|
||||||
|
Arch: "386",
|
||||||
|
Builder: "linux-386-jessie",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GoQuery: "< go1.16beta1",
|
||||||
|
OS: "linux",
|
||||||
|
Arch: "arm",
|
||||||
|
Builder: "linux-arm",
|
||||||
|
Goarm: 6, // For compatibility with all Raspberry Pi models.
|
||||||
|
// The tests take too long for the release packaging.
|
||||||
|
// Much of the time the whole buildlet times out.
|
||||||
|
SkipTests: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GoQuery: "< go1.16beta1",
|
||||||
|
OS: "linux",
|
||||||
|
Arch: "amd64",
|
||||||
|
Race: true,
|
||||||
|
Builder: "linux-amd64-jessie", // Using Jessie for Go 1.11 through Go 1.15 inclusive due to golang.org/issue/31293.
|
||||||
|
},
|
||||||
|
{
|
||||||
|
GoQuery: "< go1.16beta1",
|
||||||
|
OS: "linux",
|
||||||
|
Arch: "arm64",
|
||||||
|
Builder: "linux-arm64-packet",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
GoQuery: "< go1.15",
|
GoQuery: "< go1.15",
|
||||||
OS: "freebsd",
|
OS: "freebsd",
|
||||||
|
@ -960,9 +990,9 @@ func minSupportedMacOSVersion(goVer string) string {
|
||||||
// TODO(amedee,dmitshur,golang.org/issue/40558): Use a version package to compare versions of Go.
|
// TODO(amedee,dmitshur,golang.org/issue/40558): Use a version package to compare versions of Go.
|
||||||
|
|
||||||
// The minimum supported version of macOS with each version of go:
|
// The minimum supported version of macOS with each version of go:
|
||||||
// go1.13 - macOS 10.11
|
|
||||||
// go1.14 - macOS 10.11
|
// go1.14 - macOS 10.11
|
||||||
// go1.15 - macOS 10.12
|
// go1.15 - macOS 10.12
|
||||||
|
// go1.16 - macOS 10.12
|
||||||
minMacVersion := "10.12"
|
minMacVersion := "10.12"
|
||||||
if match("< go1.15", goVer) {
|
if match("< go1.15", goVer) {
|
||||||
minMacVersion = "10.11"
|
minMacVersion = "10.11"
|
||||||
|
@ -979,14 +1009,18 @@ func match(query, goVer string) bool {
|
||||||
switch query {
|
switch query {
|
||||||
case "": // A special case to make the zero Build.GoQuery value useful.
|
case "": // A special case to make the zero Build.GoQuery value useful.
|
||||||
return true
|
return true
|
||||||
|
case ">= go1.16beta1":
|
||||||
|
return !strings.HasPrefix(goVer, "go1.15") && !strings.HasPrefix(goVer, "go1.14")
|
||||||
|
case "< go1.16beta1":
|
||||||
|
return strings.HasPrefix(goVer, "go1.15") || strings.HasPrefix(goVer, "go1.14")
|
||||||
case ">= go1.15rc2":
|
case ">= go1.15rc2":
|
||||||
// By the time this code is added, Go 1.15 RC 1 has already been released and
|
// By the time this code is added, Go 1.15 RC 1 has already been released and
|
||||||
// won't be modified, that's why we only care about matching RC 2 and onwards.
|
// won't be modified, that's why we only care about matching RC 2 and onwards.
|
||||||
// (We could've just done ">= go1.15", but that could be misleading in future.)
|
// (We could've just done ">= go1.15", but that could be misleading in future.)
|
||||||
return goVer != "go1.15rc1" && !strings.HasPrefix(goVer, "go1.15beta") &&
|
return goVer != "go1.15rc1" && !strings.HasPrefix(goVer, "go1.15beta") &&
|
||||||
!strings.HasPrefix(goVer, "go1.14") && !strings.HasPrefix(goVer, "go1.13")
|
!strings.HasPrefix(goVer, "go1.14")
|
||||||
case "< go1.15":
|
case "< go1.15":
|
||||||
return strings.HasPrefix(goVer, "go1.14") || strings.HasPrefix(goVer, "go1.13")
|
return strings.HasPrefix(goVer, "go1.14")
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("match: query %q is not supported", query))
|
panic(fmt.Errorf("match: query %q is not supported", query))
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,19 +42,20 @@ func TestTestOnlyBuildsDontSkipTests(t *testing.T) {
|
||||||
|
|
||||||
func TestMinSupportedMacOSVersion(t *testing.T) {
|
func TestMinSupportedMacOSVersion(t *testing.T) {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
desc string
|
|
||||||
goVer string
|
goVer string
|
||||||
wantMacOS string
|
wantMacOS string
|
||||||
}{
|
}{
|
||||||
{"minor_release_13", "go1.13", "10.11"},
|
{"go1.14", "10.11"},
|
||||||
{"minor_release_14", "go1.14", "10.11"},
|
{"go1.14.14", "10.11"},
|
||||||
{"rc_release_13", "go1.13rc1", "10.11"},
|
{"go1.15", "10.12"},
|
||||||
{"beta_release_13", "go1.13beta1", "10.11"},
|
{"go1.15.7", "10.12"},
|
||||||
{"minor_release_15", "go1.15", "10.12"},
|
{"go1.16beta1", "10.12"},
|
||||||
{"patch_release_15", "go1.15.1", "10.12"},
|
{"go1.16rc1", "10.12"},
|
||||||
|
{"go1.16", "10.12"},
|
||||||
|
{"go1.16.1", "10.12"},
|
||||||
}
|
}
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
t.Run(tc.desc, func(t *testing.T) {
|
t.Run(tc.goVer, func(t *testing.T) {
|
||||||
got := minSupportedMacOSVersion(tc.goVer)
|
got := minSupportedMacOSVersion(tc.goVer)
|
||||||
if got != tc.wantMacOS {
|
if got != tc.wantMacOS {
|
||||||
t.Errorf("got %s; want %s", got, tc.wantMacOS)
|
t.Errorf("got %s; want %s", got, tc.wantMacOS)
|
||||||
|
@ -63,7 +64,7 @@ func TestMinSupportedMacOSVersion(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFreeBSDBuilder(t *testing.T) {
|
func TestBuilderSelectionPerGoVersion(t *testing.T) {
|
||||||
matchBuilds := func(target, goVer string) (matched []*Build) {
|
matchBuilds := func(target, goVer string) (matched []*Build) {
|
||||||
for _, b := range builds {
|
for _, b := range builds {
|
||||||
if b.String() != target || !match(b.GoQuery, goVer) {
|
if b.String() != target || !match(b.GoQuery, goVer) {
|
||||||
|
@ -79,12 +80,23 @@ func TestFreeBSDBuilder(t *testing.T) {
|
||||||
target string
|
target string
|
||||||
wantBuilder string
|
wantBuilder string
|
||||||
}{
|
}{
|
||||||
// Go 1.14.x and 1.13.x still use the FreeBSD 11.1 builder.
|
// Go 1.15.x and 1.14.x still use the Jessie builders.
|
||||||
{"go1.13.55", "freebsd-amd64", "freebsd-amd64-11_1"},
|
{"go1.14.55", "linux-amd64", "linux-amd64-jessie"},
|
||||||
{"go1.13.55", "freebsd-386", "freebsd-386-11_1"},
|
{"go1.15.55", "linux-386", "linux-386-jessie"},
|
||||||
|
// Go 1.16 starts to use the the Stretch builders.
|
||||||
|
{"go1.16", "linux-amd64", "linux-amd64-stretch"},
|
||||||
|
{"go1.16", "linux-386", "linux-386-stretch"},
|
||||||
|
|
||||||
|
// Go 1.15.x and 1.14.x still use the Packet and Scaleway builders.
|
||||||
|
{"go1.14.55", "linux-arm64", "linux-arm64-packet"},
|
||||||
|
{"go1.15.55", "linux-armv6l", "linux-arm"},
|
||||||
|
// Go 1.16 starts to use the the AWS builders.
|
||||||
|
{"go1.16", "linux-arm64", "linux-arm64-aws"},
|
||||||
|
{"go1.16", "linux-armv6l", "linux-arm-aws"},
|
||||||
|
|
||||||
|
// Go 1.14.x still use the FreeBSD 11.1 builder.
|
||||||
{"go1.14.55", "freebsd-amd64", "freebsd-amd64-11_1"},
|
{"go1.14.55", "freebsd-amd64", "freebsd-amd64-11_1"},
|
||||||
{"go1.14.55", "freebsd-386", "freebsd-386-11_1"},
|
{"go1.14.55", "freebsd-386", "freebsd-386-11_1"},
|
||||||
|
|
||||||
// Go 1.15 RC 2+ starts to use the the FreeBSD 11.2 builder.
|
// Go 1.15 RC 2+ starts to use the the FreeBSD 11.2 builder.
|
||||||
{"go1.15rc2", "freebsd-amd64", "freebsd-amd64-11_2"},
|
{"go1.15rc2", "freebsd-amd64", "freebsd-amd64-11_2"},
|
||||||
{"go1.15rc2", "freebsd-386", "freebsd-386-11_2"},
|
{"go1.15rc2", "freebsd-386", "freebsd-386-11_2"},
|
||||||
|
@ -92,14 +104,12 @@ func TestFreeBSDBuilder(t *testing.T) {
|
||||||
{"go1.15", "freebsd-386", "freebsd-386-11_2"},
|
{"go1.15", "freebsd-386", "freebsd-386-11_2"},
|
||||||
{"go1.15.1", "freebsd-amd64", "freebsd-amd64-11_2"},
|
{"go1.15.1", "freebsd-amd64", "freebsd-amd64-11_2"},
|
||||||
{"go1.15.1", "freebsd-386", "freebsd-386-11_2"},
|
{"go1.15.1", "freebsd-386", "freebsd-386-11_2"},
|
||||||
|
// Go 1.16 continues to use the the FreeBSD 11.2 builder.
|
||||||
// May change further during the 1.16 dev cycle,
|
|
||||||
// but expect same builder as 1.15 for now.
|
|
||||||
{"go1.16", "freebsd-amd64", "freebsd-amd64-11_2"},
|
{"go1.16", "freebsd-amd64", "freebsd-amd64-11_2"},
|
||||||
{"go1.16", "freebsd-386", "freebsd-386-11_2"},
|
{"go1.16", "freebsd-386", "freebsd-386-11_2"},
|
||||||
}
|
}
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
t.Run(tc.goVer, func(t *testing.T) {
|
t.Run(tc.target+"@"+tc.goVer, func(t *testing.T) {
|
||||||
builds := matchBuilds(tc.target, tc.goVer)
|
builds := matchBuilds(tc.target, tc.goVer)
|
||||||
if len(builds) != 1 {
|
if len(builds) != 1 {
|
||||||
t.Fatalf("got %d matching builds; want 1", len(builds))
|
t.Fatalf("got %d matching builds; want 1", len(builds))
|
||||||
|
|
|
@ -1789,6 +1789,15 @@ func init() {
|
||||||
"GO_DISABLE_OUTBOUND_NETWORK=1",
|
"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{
|
addBuilder(BuildConfig{
|
||||||
Name: "linux-amd64-buster",
|
Name: "linux-amd64-buster",
|
||||||
HostType: "host-linux-buster",
|
HostType: "host-linux-buster",
|
||||||
|
@ -1797,6 +1806,27 @@ func init() {
|
||||||
"GO_DISABLE_OUTBOUND_NETWORK=1",
|
"GO_DISABLE_OUTBOUND_NETWORK=1",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
addBuilder(BuildConfig{
|
||||||
|
Name: "linux-386-jessie",
|
||||||
|
HostType: "host-linux-jessie",
|
||||||
|
Notes: "Debian Jessie, 32-bit builder. Same as the normal 'linux-386' builder at this time, but with -jessie suffix. Used for release builds.",
|
||||||
|
buildsRepo: disabledBuilder, // Disabled because the "linux-386" builder does identical work.
|
||||||
|
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{
|
addBuilder(BuildConfig{
|
||||||
Name: "linux-amd64-longtest",
|
Name: "linux-amd64-longtest",
|
||||||
HostType: "host-linux-stretch-morecpu",
|
HostType: "host-linux-stretch-morecpu",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче