1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:14:43 -07:00

dashboard: add 32-bit gccgo builder; improve performance of gccgo builds on docker

This change adds a 32-bit builder for gccgo and fixes some specific
configuration problems with the docker image/coordinator to speed up builds.
The go builder running on the linux-x86-gccgo image has been modified to run
`make -j16` when building to reduce build times from ~60 minutes to ~10 minutes
and the coordinator has been modified to run the command `make check-go -j16`
to reduce testsuite run times from ~30 minutes to ~10 minutes.

LGTM=bradfitz
R=bradfitz
CC=adg, golang-codereviews
https://golang.org/cl/151530043
This commit is contained in:
Chris Manghane 2014-10-09 14:04:49 -07:00
parent 2f1c768885
commit cced8d21dd
5 changed files with 43 additions and 21 deletions

View File

@ -62,7 +62,6 @@ 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
@ -81,8 +80,14 @@ func main() {
addBuilder(buildConfig{
name: "linux-amd64-gccgo",
image: "gobuilders/linux-x86-gccgo",
cmd: "make check-go -kj",
cmdTimeout: 60 * time.Minute,
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",
})
@ -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"
}

View File

@ -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 <golang-dev@googlegroups.com>
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

View File

@ -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

View File

@ -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

View File

@ -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