Skip to content

Commit 5eaa6e0

Browse files
XiaodongLoongdmitshur
authored andcommitted
dashboard: add linux-loong64-3a5000 builder
Updates golang/go#46229 Change-Id: Ib48e1e64d96a07d5c5282d78935124faf75c89d7 Reviewed-on: https://go-review.googlesource.com/c/build/+/347309 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Cherry Mui <[email protected]>
1 parent e4e0662 commit 5eaa6e0

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

cmd/buildlet/stage0/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ buildlet-stage0.linux-mips64: FORCE
6666
go install golang.org/x/build/cmd/upload
6767
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
6868

69+
buildlet-stage0.linux-loong64: FORCE
70+
go install golang.org/x/build/cmd/upload
71+
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
72+
6973
# macstadium uploads all the darwin-amd64 stage0 binary as
7074
# different filenames, which is used by different Mac VM images.
7175
# See the env/darwin/macstadium/** files for details.

cmd/buildlet/stage0/stage0.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ Download:
156156
case "host-linux-mipsle-mengzhuo":
157157
cmd.Args = append(cmd.Args, reverseHostTypeArgs(buildEnv)...)
158158
cmd.Args = append(cmd.Args, os.ExpandEnv("--workdir=${WORKDIR}"))
159+
case "host-linux-loong64-3a5000":
160+
cmd.Args = append(cmd.Args, reverseHostTypeArgs(buildEnv)...)
161+
cmd.Args = append(cmd.Args, os.ExpandEnv("--workdir=${WORKDIR}"))
159162
case "host-linux-mips64le-rtrk":
160163
cmd.Args = append(cmd.Args, reverseHostTypeArgs(buildEnv)...)
161164
cmd.Args = append(cmd.Args, os.ExpandEnv("--workdir=${WORKDIR}"))

dashboard/builders.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ var slowBotAliases = map[string]string{
5353
"linux": "linux-amd64",
5454
"linux-arm": "linux-arm-aws",
5555
"linux-arm64": "linux-arm64-aws",
56+
"linux-loong64": "linux-loong64-3a5000",
5657
"linux-mips": "linux-mips-rtrk",
5758
"linux-mips64": "linux-mips64-rtrk",
5859
"linux-mips64le": "linux-mips64le-mengzhuo",
@@ -579,6 +580,15 @@ var Hosts = map[string]*HostConfig{
579580
ExpectNum: 1,
580581
env: []string{"GOROOT_BOOTSTRAP=/opt/golang/go-solaris-amd64-bootstrap"},
581582
},
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+
},
582592
"host-linux-mipsle-mengzhuo": &HostConfig{
583593
Notes: "Loongson 3A Box hosted by Meng Zhuo; actually MIPS64le despite the name",
584594
OwnerGithub: "mengzhuo",
@@ -2357,6 +2367,18 @@ func init() {
23572367
"GOHOSTARCH=arm",
23582368
},
23592369
})
2370+
addBuilder(BuildConfig{
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+
})
23602382
addBuilder(BuildConfig{
23612383
FlakyNet: true,
23622384
HostType: "host-linux-mipsle-mengzhuo",
@@ -2686,6 +2708,25 @@ func mipsBuildsRepoPolicy(repo, branch, goBranch string) bool {
26862708
// riscvDistTestPolicy is same as mipsDistTestPolicy for now.
26872709
var riscvDistTestPolicy = mipsDistTestPolicy
26882710

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+
26892730
// TryBuildersForProject returns the builders that should run as part of
26902731
// a TryBot set for the given project.
26912732
// The project argument is of the form "go", "net", "sys", etc.

dashboard/builders_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ func TestBuilderConfig(t *testing.T) {
414414
{b("linux-mips64le-mengzhuo", "sys"), onlyPost},
415415
{b("linux-mips64le-mengzhuo", "net"), onlyPost},
416416

417+
{b("linux-loong64-3a5000", "go"), onlyPost},
418+
{b("linux-loong64-3a5000", "sys"), onlyPost},
419+
{b("linux-loong64-3a5000", "net"), onlyPost},
420+
417421
// OpenBSD.
418422
{b("[email protected]", "go"), both},
419423
{b("[email protected]", "go"), both},

0 commit comments

Comments
 (0)