diff --git a/dashboard/coordinator/main.go b/dashboard/coordinator/main.go index 5d7b6b5c799..2a3803dbfb1 100644 --- a/dashboard/coordinator/main.go +++ b/dashboard/coordinator/main.go @@ -59,13 +59,12 @@ var images = map[string]*imageInfo{ } type buildConfig struct { - name string // "linux-amd64-race" - image string // Docker image to use to build - cmd string // optional -cmd flag (relative to go/src/) - cmdTimeout time.Duration // time to wait for optional cmd to finish - env []string // extra environment ("key=value") pairs - dashURL string // url of the build dashboard - tool string // the tool this configuration is for + name string // "linux-amd64-race" + image string // Docker image to use to build + cmd string // optional -cmd flag (relative to go/src/) + env []string // extra environment ("key=value") pairs + dashURL string // url of the build dashboard + tool string // the tool this configuration is for } func main() { @@ -79,12 +78,18 @@ func main() { addBuilder(buildConfig{name: "nacl-386"}) addBuilder(buildConfig{name: "nacl-amd64p32"}) addBuilder(buildConfig{ - name: "linux-amd64-gccgo", - image: "gobuilders/linux-x86-gccgo", - cmd: "make check-go -kj", - cmdTimeout: 60 * time.Minute, - dashURL: "https://build.golang.org/gccgo", - tool: "gccgo", + name: "linux-amd64-gccgo", + image: "gobuilders/linux-x86-gccgo", + cmd: "make RUNTESTFLAGS=\"--target_board=unix/-m64\" check-go -j16", + dashURL: "https://build.golang.org/gccgo", + tool: "gccgo", + }) + addBuilder(buildConfig{ + name: "linux-386-gccgo", + image: "gobuilders/linux-x86-gccgo", + cmd: "make RUNTESTFLAGS=\"--target_board=unix/-m32\" check-go -j16", + dashURL: "https://build.golang.org/gccgo", + tool: "gccgo", }) addBuilder(buildConfig{name: "linux-386-sid", image: "gobuilders/linux-x86-sid"}) addBuilder(buildConfig{name: "linux-amd64-sid", image: "gobuilders/linux-x86-sid"}) @@ -286,7 +291,6 @@ func (conf buildConfig) dockerRunArgs(rev string) (args []string) { ) if conf.cmd != "" { args = append(args, "-cmd", conf.cmd) - args = append(args, "-cmdTimeout", conf.cmdTimeout.String()) } args = append(args, conf.name) return @@ -302,9 +306,6 @@ func addBuilder(c buildConfig) { if _, dup := builders[c.name]; dup { panic("dup name") } - if c.cmdTimeout == 0 { - c.cmdTimeout = 10 * time.Minute - } if c.dashURL == "" { c.dashURL = "https://build.golang.org" } diff --git a/dashboard/env/linux-x86-gccgo/Dockerfile b/dashboard/env/linux-x86-gccgo/Dockerfile index 4a0feac9543..2ccd0d936f6 100644 --- a/dashboard/env/linux-x86-gccgo/Dockerfile +++ b/dashboard/env/linux-x86-gccgo/Dockerfile @@ -2,9 +2,9 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -# gobuilders/linux-x86-gccgo for 64-bit gccgo. +# gobuilders/linux-x86-gccgo for 32- and 64-bit gccgo. -FROM gobuilders/linux-x86-base +FROM debian:wheezy MAINTAINER golang-dev ENV DEBIAN_FRONTEND noninteractive @@ -14,3 +14,6 @@ RUN /scripts/install-apt-deps.sh ADD /scripts/install-gold.sh /scripts/ RUN /scripts/install-gold.sh + +ADD /scripts/install-gccgo-builder.sh /scripts/ +RUN /scripts/install-gccgo-builder.sh && test -f /usr/local/bin/builder \ No newline at end of file diff --git a/dashboard/env/linux-x86-gccgo/Makefile b/dashboard/env/linux-x86-gccgo/Makefile index 1bed341377e..9d5143fe23b 100644 --- a/dashboard/env/linux-x86-gccgo/Makefile +++ b/dashboard/env/linux-x86-gccgo/Makefile @@ -5,8 +5,11 @@ docker: Dockerfile docker build -t gobuilders/linux-x86-gccgo . -upload: docker +docker-linux.gccgo.tar.gz: docker docker save gobuilders/linux-x86-gccgo | gzip | (cd ../../coordinator/buildongce && go run create.go --write_object=go-builder-data/docker-linux.gccgo.tar.gz) check: docker - docker run gobuilders/linux-x86-gccgo /usr/local/bin/builder -tool="gccgo" -rev=b9151e911a54 -buildroot=/gccgo -v -cmd='make check-go -kj' -report=false linux-amd64-gccgo-temp + docker run gobuilders/linux-x86-gccgo /usr/local/bin/builder -tool="gccgo" -rev=b9151e911a54 -v -cmd='make RUNTESTFLAGS="--target_board=unix/-m64" check-go' -report=false linux-amd64-gccgo-temp + +check32: docker + docker run gobuilders/linux-x86-gccgo /usr/local/bin/builder -tool="gccgo" -rev=b9151e911a54 -v -cmd='make RUNTESTFLAGS="--target_board=unix/-m32" check-go' -report=false linux-386-gccgo-temp diff --git a/dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh b/dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh index 4ce05574e98..90dbac1043c 100755 --- a/dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh +++ b/dashboard/env/linux-x86-gccgo/scripts/install-apt-deps.sh @@ -1,12 +1,20 @@ set -ex apt-get update +# For running curl to get the gccgo builder binary. +apt-get install -y --no-install-recommends curl ca-certificates +# Optionally used by some net/http tests: +apt-get install -y --no-install-recommends strace # For using numeric libraries within GCC. apt-get install -y --no-install-recommends libgmp10-dev libmpc-dev libmpfr-dev # For building binutils and gcc from source. apt-get install -y --no-install-recommends make g++ flex bison +# Same as above, but for 32-bit builds as well. +apt-get install -y --no-install-recommends libc6-dev-i386 g++-multilib # For running the extended gccgo testsuite apt-get install -y --no-install-recommends dejagnu +# For interacting with the gccgo source and git mirror: +apt-get install -y --no-install-recommends mercurial git-core apt-get clean rm -rf /var/lib/apt/lists diff --git a/dashboard/env/linux-x86-gccgo/scripts/install-gccgo-builder.sh b/dashboard/env/linux-x86-gccgo/scripts/install-gccgo-builder.sh new file mode 100755 index 00000000000..fd3785dc934 --- /dev/null +++ b/dashboard/env/linux-x86-gccgo/scripts/install-gccgo-builder.sh @@ -0,0 +1,7 @@ +set -ex + +# Installs a version of the go.tools dashboard builder that runs the gccgo build +# command assuming there are 16 cores available to speed up build times. +# TODO(cmang): There should be an option in the builder to specify this. + +curl -o /usr/local/bin/builder http://storage.googleapis.com/go-builder-data/gccgo_builder && chmod +x /usr/local/bin/builder