env/android-amd64-emu: add new Android emulator container + VM image
Now that we can do nested virtualization on GCE, that means we can run
the Android emulator (which requires KVM) on GCE and at least get
fast trybots and such for android-amd64.
Updates golang/go#23824
Change-Id: I0da38c7fa0f15492230a31291d2921ba72f2151d
Reviewed-on: https://go-review.googlesource.com/c/163738
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 8968dfa..0089cf1 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -530,6 +530,15 @@
ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/opt/freeware/lib/golang"},
},
+ "host-android-amd64-emu": &HostConfig{
+ Notes: "Debian Buster w/ Android SDK + emulator (use nested virt)",
+ ContainerImage: "android-amd64-emu:ba38cc4f0c38",
+ KonletVMImage: "android-amd64-emu",
+ NestedVirt: true,
+ buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64",
+ env: []string{"GOROOT_BOOTSTRAP=/go1.4"},
+ SSHUsername: "root",
+ },
}
func init() {
@@ -860,10 +869,13 @@
// These we've verified to work.
return true
}
- // TODO(bradfitz): make androidtest.bash and iotest.bash work
- // too. And buildall.bash should really just be N small
- // container jobs instead of a "buildall.bash". Then we can
- // delete this whole method.
+ if c.GOOS() == "android" && c.HostType == "host-android-amd64-emu" {
+ return true
+ }
+ // TODO(bradfitz): make iotest.bash work too. And
+ // buildall.bash should really just be N small container jobs
+ // instead of a "buildall.bash". Then we can delete this whole
+ // method.
return false
}
@@ -873,7 +885,9 @@
}
// TODO(bradfitz,dmitshur): move this into BuildConfig bools, rather than this Name switch.
switch c.Name {
- case "darwin-amd64-10_11",
+ case "android-amd64-emu",
+ "android-386-emu",
+ "darwin-amd64-10_11",
"darwin-386-10_11",
// TODO: add darwin-amd64-10_12 when we have a build scheduler
"freebsd-amd64-93",
@@ -1732,6 +1746,34 @@
},
})
addBuilder(BuildConfig{
+ Name: "android-386-emu",
+ HostType: "host-android-amd64-emu", // same amd64 host is used for 386 builder
+ Notes: "Android emulator on GCE",
+ TryOnly: true, // but not in trybot set for now
+ tryBot: nil,
+ env: []string{
+ "GOARCH=386",
+ "GOOS=android",
+ "GOHOSTARCH=amd64",
+ "GOHOSTOS=linux",
+ "CGO_ENABLED=1",
+ },
+ })
+ addBuilder(BuildConfig{
+ Name: "android-amd64-emu",
+ HostType: "host-android-amd64-emu",
+ Notes: "Android emulator on GCE",
+ TryOnly: true, // but not in trybot set for now
+ tryBot: nil,
+ env: []string{
+ "GOARCH=amd64",
+ "GOOS=android",
+ "GOHOSTARCH=amd64",
+ "GOHOSTOS=linux",
+ "CGO_ENABLED=1",
+ },
+ })
+ addBuilder(BuildConfig{
Name: "android-386-emulator",
HostType: "host-darwin-amd64-eliasnaur-android",
Notes: "Android emulator, via a Mac Mini",