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:
parent
2f1c768885
commit
cced8d21dd
|
|
@ -62,7 +62,6 @@ type buildConfig struct {
|
||||||
name string // "linux-amd64-race"
|
name string // "linux-amd64-race"
|
||||||
image string // Docker image to use to build
|
image string // Docker image to use to build
|
||||||
cmd string // optional -cmd flag (relative to go/src/)
|
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
|
env []string // extra environment ("key=value") pairs
|
||||||
dashURL string // url of the build dashboard
|
dashURL string // url of the build dashboard
|
||||||
tool string // the tool this configuration is for
|
tool string // the tool this configuration is for
|
||||||
|
|
@ -81,8 +80,14 @@ func main() {
|
||||||
addBuilder(buildConfig{
|
addBuilder(buildConfig{
|
||||||
name: "linux-amd64-gccgo",
|
name: "linux-amd64-gccgo",
|
||||||
image: "gobuilders/linux-x86-gccgo",
|
image: "gobuilders/linux-x86-gccgo",
|
||||||
cmd: "make check-go -kj",
|
cmd: "make RUNTESTFLAGS=\"--target_board=unix/-m64\" check-go -j16",
|
||||||
cmdTimeout: 60 * time.Minute,
|
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",
|
dashURL: "https://build.golang.org/gccgo",
|
||||||
tool: "gccgo",
|
tool: "gccgo",
|
||||||
})
|
})
|
||||||
|
|
@ -286,7 +291,6 @@ func (conf buildConfig) dockerRunArgs(rev string) (args []string) {
|
||||||
)
|
)
|
||||||
if conf.cmd != "" {
|
if conf.cmd != "" {
|
||||||
args = append(args, "-cmd", conf.cmd)
|
args = append(args, "-cmd", conf.cmd)
|
||||||
args = append(args, "-cmdTimeout", conf.cmdTimeout.String())
|
|
||||||
}
|
}
|
||||||
args = append(args, conf.name)
|
args = append(args, conf.name)
|
||||||
return
|
return
|
||||||
|
|
@ -302,9 +306,6 @@ func addBuilder(c buildConfig) {
|
||||||
if _, dup := builders[c.name]; dup {
|
if _, dup := builders[c.name]; dup {
|
||||||
panic("dup name")
|
panic("dup name")
|
||||||
}
|
}
|
||||||
if c.cmdTimeout == 0 {
|
|
||||||
c.cmdTimeout = 10 * time.Minute
|
|
||||||
}
|
|
||||||
if c.dashURL == "" {
|
if c.dashURL == "" {
|
||||||
c.dashURL = "https://build.golang.org"
|
c.dashURL = "https://build.golang.org"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
# Use of this source code is governed by a BSD-style
|
# Use of this source code is governed by a BSD-style
|
||||||
# license that can be found in the LICENSE file.
|
# 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>
|
MAINTAINER golang-dev <golang-dev@googlegroups.com>
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
@ -14,3 +14,6 @@ RUN /scripts/install-apt-deps.sh
|
||||||
|
|
||||||
ADD /scripts/install-gold.sh /scripts/
|
ADD /scripts/install-gold.sh /scripts/
|
||||||
RUN /scripts/install-gold.sh
|
RUN /scripts/install-gold.sh
|
||||||
|
|
||||||
|
ADD /scripts/install-gccgo-builder.sh /scripts/
|
||||||
|
RUN /scripts/install-gccgo-builder.sh && test -f /usr/local/bin/builder
|
||||||
|
|
@ -5,8 +5,11 @@
|
||||||
docker: Dockerfile
|
docker: Dockerfile
|
||||||
docker build -t gobuilders/linux-x86-gccgo .
|
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)
|
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
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,20 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
apt-get update
|
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.
|
# For using numeric libraries within GCC.
|
||||||
apt-get install -y --no-install-recommends libgmp10-dev libmpc-dev libmpfr-dev
|
apt-get install -y --no-install-recommends libgmp10-dev libmpc-dev libmpfr-dev
|
||||||
# For building binutils and gcc from source.
|
# For building binutils and gcc from source.
|
||||||
apt-get install -y --no-install-recommends make g++ flex bison
|
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
|
# For running the extended gccgo testsuite
|
||||||
apt-get install -y --no-install-recommends dejagnu
|
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
|
apt-get clean
|
||||||
rm -rf /var/lib/apt/lists
|
rm -rf /var/lib/apt/lists
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue