зеркало из https://github.com/golang/build.git
all: add ppc64 (big endian) builders
Change-Id: I0fddda33179555a50b6f03dcff13338544b742c3 Reviewed-on: https://go-review.googlesource.com/30599 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
44209b0bd3
Коммит
f8a3106eb2
|
@ -48,6 +48,10 @@ buildlet.linux-arm64: FORCE
|
|||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet --public go-builder-data/$@
|
||||
|
||||
buildlet.linux-ppc64: FORCE
|
||||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet --public go-builder-data/$@
|
||||
|
||||
buildlet.linux-ppc64le: FORCE
|
||||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet --public go-builder-data/$@
|
||||
|
|
|
@ -16,6 +16,10 @@ buildlet-stage0.linux-arm64: FORCE
|
|||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
|
||||
|
||||
buildlet-stage0.linux-ppc64: FORCE
|
||||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
|
||||
|
||||
buildlet-stage0.linux-ppc64le: FORCE
|
||||
go install golang.org/x/build/cmd/upload
|
||||
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
|
||||
|
|
|
@ -54,6 +54,8 @@ func main() {
|
|||
}
|
||||
case "linux/arm64":
|
||||
initLinaroARM64()
|
||||
case "linux/ppc64":
|
||||
initOregonStatePPC64()
|
||||
case "linux/ppc64le":
|
||||
initOregonStatePPC64le()
|
||||
}
|
||||
|
@ -74,9 +76,21 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
env := os.Environ()
|
||||
if isUnix() && os.Getuid() == 0 {
|
||||
if os.Getenv("USER") == "" {
|
||||
env = append(env, "USER=root")
|
||||
}
|
||||
if os.Getenv("HOME") == "" {
|
||||
env = append(env, "HOME=/root")
|
||||
}
|
||||
}
|
||||
|
||||
cmd := exec.Command(target)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Env = env
|
||||
if onScaleway {
|
||||
cmd.Args = append(cmd.Args, scalewayBuildletArgs()...)
|
||||
}
|
||||
|
@ -86,6 +100,8 @@ func main() {
|
|||
cmd.Args = append(cmd.Args, reverseBuildletArgs("linux-s390x-ibm")...)
|
||||
case "linux/arm64":
|
||||
cmd.Args = append(cmd.Args, reverseBuildletArgs("linux-arm64-buildlet")...)
|
||||
case "linux/ppc64":
|
||||
cmd.Args = append(cmd.Args, reverseBuildletArgs("linux-ppc64-buildlet")...)
|
||||
case "linux/ppc64le":
|
||||
cmd.Args = append(cmd.Args, reverseBuildletArgs("linux-ppc64le-buildlet")...)
|
||||
case "solaris/amd64":
|
||||
|
@ -156,6 +172,8 @@ func buildletURL() string {
|
|||
return "https://storage.googleapis.com/go-builder-data/buildlet.linux-s390x"
|
||||
case "linux/arm64":
|
||||
return "https://storage.googleapis.com/go-builder-data/buildlet.linux-arm64"
|
||||
case "linux/ppc64":
|
||||
return "https://storage.googleapis.com/go-builder-data/buildlet.linux-ppc64"
|
||||
case "linux/ppc64le":
|
||||
return "https://storage.googleapis.com/go-builder-data/buildlet.linux-ppc64le"
|
||||
case "solaris/amd64":
|
||||
|
@ -381,7 +399,20 @@ func initLinaroARM64() {
|
|||
initBootstrapDir("/usr/local/go-bootstrap", "/usr/local/go-bootstrap.tar.gz")
|
||||
}
|
||||
|
||||
func initOregonStatePPC64() {
|
||||
aptGetInstall("gcc", "strace", "libc6-dev", "gdb")
|
||||
initBootstrapDir("/usr/local/go-bootstrap", "/usr/local/go-bootstrap.tar.gz")
|
||||
}
|
||||
|
||||
func initOregonStatePPC64le() {
|
||||
aptGetInstall("gcc", "strace", "libc6-dev", "gdb")
|
||||
initBootstrapDir("/usr/local/go-bootstrap", "/usr/local/go-bootstrap.tar.gz")
|
||||
}
|
||||
|
||||
func isUnix() bool {
|
||||
switch runtime.GOOS {
|
||||
case "plan9", "windows":
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -166,6 +166,12 @@ var Hosts = map[string]*HostConfig{
|
|||
env: []string{"GOROOT_BOOTSTRAP=/var/buildlet/go-linux-s390x-bootstrap"},
|
||||
ReverseAliases: []string{"linux-s390x-ibm"},
|
||||
},
|
||||
"host-linux-ppc64-osu": &HostConfig{
|
||||
Notes: "Debian jessie; run by Go team on osuosl.org",
|
||||
IsReverse: true,
|
||||
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap"},
|
||||
ReverseAliases: []string{"linux-ppc64-buildlet"},
|
||||
},
|
||||
"host-linux-ppc64le-osu": &HostConfig{
|
||||
Notes: "Debian jessie; run by Go team on osuosl.org",
|
||||
IsReverse: true,
|
||||
|
@ -777,6 +783,11 @@ func init() {
|
|||
Name: "solaris-amd64-smartosbuildlet",
|
||||
HostType: "host-solaris-amd64",
|
||||
})
|
||||
addBuilder(BuildConfig{
|
||||
Name: "linux-ppc64-buildlet",
|
||||
HostType: "host-linux-ppc64-osu",
|
||||
FlakyNet: true,
|
||||
})
|
||||
addBuilder(BuildConfig{
|
||||
Name: "linux-ppc64le-buildlet",
|
||||
HostType: "host-linux-ppc64le-osu",
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
The linux-ppc64 buildlets run on PPC64 VMs at osuosl.org (OSU Open Source Lab).
|
||||
|
||||
They run Debian jessie.
|
||||
|
||||
Filing tickets: https://support.osuosl.org/
|
||||
|
||||
Machines:
|
||||
|
||||
go-be-1: debian@140.211.168.40
|
||||
go-be-2: debian@140.211.168.41
|
||||
go-be-3: debian@140.211.168.42
|
||||
go-be-4: debian@140.211.168.43
|
||||
go-be-5: debian@140.211.168.44
|
||||
|
||||
They accept ssh keys:
|
||||
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBc8FQIyzPuAFtyTmCZFpRb6YSU0qHcuq7Ms96utYfX+ bradfitz@brad5k.local
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEodEQR84ZXQeQEaXFudopaQpvxMxzl7Q4zupODlCiX/ bradfitz@corplaptop
|
||||
|
||||
Log in to each and:
|
||||
|
||||
$ sudo ./setup.bash <BUILDKEY_HERE>
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
KEY=$1
|
||||
if [ "$KEY" = "" ]; then
|
||||
echo "usage: ./setup.bash <BUILDKEY>" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo $KEY > /root/.gobuildkey
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get install strace libc6-dev gcc
|
||||
|
||||
cd /etc/systemd/system
|
||||
cat >buildlet.service <<EOF
|
||||
[Unit]
|
||||
Description=Go builder buildlet
|
||||
After=network.target
|
||||
|
||||
[Install]
|
||||
WantedBy=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/bin/sh -c 'cd /usr/local/bin; /usr/bin/curl -R -f -z buildlet-stage0 -o buildlet-stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-ppc64 && chmod +x buildlet-stage0'
|
||||
ExecStart=/usr/local/bin/buildlet-stage0
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
EOF
|
||||
|
||||
systemctl enable buildlet.service
|
||||
systemctl start buildlet.service
|
Загрузка…
Ссылка в новой задаче