dashboard,env: move iOS builders to GOOS=ios

Updates golang/go#41610

Change-Id: Ie8cb3294da5566e09fc06c01e679b8b773a439cf
Reviewed-on: https://go-review.googlesource.com/c/build/+/259358
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Elias Naur <mail@eliasnaur.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Elias Naur 2020-10-03 11:37:07 +02:00 коммит произвёл Dmitri Shuralyov
Родитель 8057bc879a
Коммит 18919d65fd
5 изменённых файлов: 22 добавлений и 21 удалений

Просмотреть файл

@ -29,7 +29,7 @@ var slowBotAliases = map[string]string{
"openbsd-arm64": "",
"nacl-arm": "",
"darwin-arm": "", // TODO(golang.org/issue/37611): Remove once port is removed.
"ios-arm64": "", // TODO(golang.org/issue/41610): Add builder for ios/arm64.
"darwin-arm64": "", // TODO(golang.org/issue/39782): Add builder for darwin/arm64.
"386": "linux-386",
"aix": "aix-ppc64",
@ -46,7 +46,7 @@ var slowBotAliases = map[string]string{
"darwin": "darwin-amd64-10_14",
"darwin-386": "darwin-386-10_14", // TODO(golang.org/issue/37610): Remove when Go 1.14 is no longer supported.
"darwin-amd64": "darwin-amd64-10_14",
"darwin-arm64": "darwin-arm64-corellium",
"ios-arm64": "ios-arm64-corellium",
"dragonfly": "dragonfly-amd64",
"freebsd": "freebsd-amd64-12_0",
"freebsd-386": "freebsd-386-12_0",
@ -54,7 +54,7 @@ var slowBotAliases = map[string]string{
"freebsd-arm": "freebsd-arm-paulzhol",
"freebsd-arm64": "freebsd-arm64-dmgk",
"illumos": "illumos-amd64",
"ios": "darwin-arm64-corellium",
"ios": "ios-arm64-corellium",
"js": "js-wasm",
"linux": "linux-amd64",
"linux-arm64": "linux-arm64-packet",
@ -562,13 +562,13 @@ var Hosts = map[string]*HostConfig{
"GOROOT_BOOTSTRAP=/usr/local/go-bootstrap",
},
},
"host-darwin-arm64-corellium-ios": &HostConfig{
"host-ios-arm64-corellium-ios": &HostConfig{
Notes: "Virtual iOS devices hosted by Zenly on Corellium; see issues 31722 and 40523",
OwnerGithub: "znly",
IsReverse: true,
ExpectNum: 2,
env: []string{
"GOROOT_BOOTSTRAP=/var/mobile/go-darwin-arm64-bootstrap",
"GOROOT_BOOTSTRAP=/var/mobile/go-ios-arm64-bootstrap",
},
},
"host-android-arm64-corellium-android": &HostConfig{
@ -2115,12 +2115,13 @@ func init() {
buildsRepo: onlyGo,
})
addBuilder(BuildConfig{
Name: "darwin-arm64-corellium",
HostType: "host-darwin-arm64-corellium-ios",
Name: "ios-arm64-corellium",
HostType: "host-ios-arm64-corellium-ios",
Notes: "Virtual iPhone SE running on Corellium; owned by zenly",
buildsRepo: func(repo, branch, goBranch string) bool {
return repo == "go" && branch == "master" && goBranch == "master"
},
KnownIssue: 41610,
})
addBuilder(BuildConfig{
Name: "android-arm64-corellium",

Просмотреть файл

@ -399,11 +399,11 @@ func TestBuilderConfig(t *testing.T) {
{b("linux-amd64-nocgo", "mobile"), none},
// Virtual mobiledevices
{b("darwin-arm64-corellium", "go"), isBuilder},
{b("ios-arm64-corellium", "go"), isBuilder},
{b("android-arm64-corellium", "go"), isBuilder},
{b("android-arm-corellium", "go"), isBuilder},
// Mobile builders that run with GOOS=linux/darwin and have
// Mobile builders that run with GOOS=linux/ios and have
// a device attached.
{b("linux-amd64-androidemu", "mobile"), both},

6
env/corellium/ios/files/builder.sh поставляемый
Просмотреть файл

@ -2,11 +2,11 @@
export HOME=/var/root
export CC=$HOME/bin/clangwrap
export GO_BUILDER_ENV=host-darwin-arm64-corellium-ios
export GOROOT_BOOTSTRAP=$HOME/go-darwin-arm64-bootstrap
export GO_BUILDER_ENV=host-ios-arm64-corellium-ios
export GOROOT_BOOTSTRAP=$HOME/go-ios-arm64-bootstrap
export PATH=$HOME/bin:$PATH
while true; do
$GOROOT_BOOTSTRAP/bin/go get golang.org/x/build/cmd/buildlet
$HOME/go/bin/buildlet -reverse-type host-darwin-arm64-corellium-ios -coordinator farmer.golang.org
$HOME/go/bin/buildlet -reverse-type host-ios-arm64-corellium-ios -coordinator farmer.golang.org
sleep 1
done

2
env/corellium/ios/files/profile поставляемый
Просмотреть файл

@ -1,2 +1,2 @@
export PATH=$HOME/bin:$HOME/go/bin:$PATH
export GOROOT_BOOTSTRAP=$HOME/go-darwin-arm64-bootstrap
export GOROOT_BOOTSTRAP=$HOME/go-ios-arm64-bootstrap

16
env/corellium/ios/install.sh поставляемый
Просмотреть файл

@ -7,8 +7,8 @@
# Put a builder key in `buildkey`.
#
# Use `bootstrap.bash` from the Go standard distribution to build a
# darwin/arm64 bootstrap toolchain and put it in
# `go-darwin-arm64-bootstrap.tbz`.
# ios/arm64 bootstrap toolchain and put it in
# `go-ios-arm64-bootstrap.tbz`.
#
# Finally, install.sh assumes an iPhone SDK in `iPhoneOS.sdk`.
@ -28,20 +28,20 @@ scp files/org.golang.builder.plist $HOST:/Library/LaunchDaemons/
ios launchctl load -w /Library/LaunchDaemons/org.golang.builder.plist
scp files/builder.sh $HOST:/var/root
scp go-darwin-arm64-bootstrap.tbz $HOST:/var/root
ios tar xjf go-darwin-arm64-bootstrap.tbz
scp buildkey $HOST:/var/root/.gobuildkey-host-darwin-arm64-corellium-ios
scp go-ios-arm64-bootstrap.tbz $HOST:/var/root
ios tar xjf go-ios-arm64-bootstrap.tbz
scp buildkey $HOST:/var/root/.gobuildkey-host-ios-arm64-corellium-ios
scp files/profile $HOST:/var/root/.profile
rsync -va iPhoneOS.sdk $HOST:/var/root/
# Dummy sign Go bootstrap toolchain.
ios find go-darwin-arm64-bootstrap -executable -type f| ios xargs -n1 ldid -S
ios find go-ios-arm64-bootstrap -executable -type f| ios xargs -n1 ldid -S
ios mkdir -p /var/root/bin
# Build wrappers on the host.
CGO_ENABLED=1 GOOS=darwin CC=$(go env GOROOT)/misc/ios/clangwrap.sh GOARCH=arm64 go build -o clangwrap -ldflags="-X main.sdkpath=/var/root/iPhoneOS.sdk" files/clangwrap.go
CGO_ENABLED=1 GOOS=darwin CC=$(go env GOROOT)/misc/ios/clangwrap.sh GOARCH=arm64 go build -o arwrap files/arwrap.go
CGO_ENABLED=1 GOOS=ios CC=$(go env GOROOT)/misc/ios/clangwrap.sh GOARCH=arm64 go build -o clangwrap -ldflags="-X main.sdkpath=/var/root/iPhoneOS.sdk" files/clangwrap.go
CGO_ENABLED=1 GOOS=ios CC=$(go env GOROOT)/misc/ios/clangwrap.sh GOARCH=arm64 go build -o arwrap files/arwrap.go
scp arwrap $HOST:/var/root/bin/ar
scp clangwrap $HOST:/var/root/bin/clangwrap
# Dummy sign them.