Skip to content

Commit ff591b6

Browse files
committed
Auto merge of #39042 - alexcrichton:upload-more, r=brson
travis: Expand dist builder coverage This commit adds six new travis matrix entires for doing cross-compiled distribution builds of the compiler. The support added in #38731 allows us to quickly compile a complete suite of distribution artifacts for cross-compiled platforms, and currently each matrix entry (when fully cached) clocks in around an hour to finish. Note that a full test run typically takes about two hours right now. With further optimizations coming down the pike in #39026 this commit also starts doubling up cross-compiled distribution builders on each matrix entry. We initially planned to do one build per entry, but it's looking like we may be able to get by with more than one in each entry. Depending on how long these builds take we may even be able to up it to three, but we'll start with two first. This commit then completes the suite of cross-compiled compilers that we're going to compile, adding it for a whole litany of platforms detailed in the changes to the docker files here. The existing `cross` image is also trimmed down quite a bit to avoid duplicate work, and we'll eventually provision it for far more cross compilation as well. Note that the gcc toolchains installed to compile most of these compilers are inappropriate for actualy distribution. The glibc they pull in is much newer than we'd like, so before we turn nightlies off we'll need to tweak these docker files to custom build toolchains like the current `linux-cross` docker image does.
2 parents 0ef85a6 + a6d88b0 commit ff591b6

File tree

14 files changed

+394
-55
lines changed

14 files changed

+394
-55
lines changed

.travis.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ matrix:
1515
# Linux builders, all docker images
1616
- env: IMAGE=arm-android DEPLOY=1
1717
- env: IMAGE=cross DEPLOY=1
18-
- env: IMAGE=dist-arm-unknown-linux-gnueabi DEPLOY=1
19-
- env: IMAGE=dist-x86_64-unknown-freebsd DEPLOY=1
18+
- env: IMAGE=dist-arm-linux DEPLOY=1
19+
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
20+
- env: IMAGE=dist-freebsd DEPLOY=1
21+
- env: IMAGE=dist-mips-linux DEPLOY=1
22+
- env: IMAGE=dist-mips64-linux DEPLOY=1
23+
- env: IMAGE=dist-powerpc-linux DEPLOY=1
24+
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
25+
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
2026
- env: IMAGE=i686-gnu DEPLOY=1
2127
- env: IMAGE=i686-gnu-nopt
2228
- env: IMAGE=x86_64-gnu DEPLOY=1

src/ci/docker/arm-android/Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@ ENV RUST_CONFIGURE_ARGS \
5353
# to all the targets above eventually.
5454
ENV SCRIPT \
5555
python2.7 ../x.py test --target arm-linux-androideabi && \
56-
python2.7 ../x.py dist --target arm-linux-androideabi
56+
python2.7 ../x.py dist \
57+
--target arm-linux-androideabi \
58+
--target armv7-linux-androideabi \
59+
--target i686-linux-android \
60+
--target aarch64-linux-android

src/ci/docker/cross/Dockerfile

+1-36
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
git \
1111
cmake \
1212
sudo \
13-
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
14-
gcc-arm-linux-gnueabi libc6-dev-armel-cross \
15-
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross \
16-
gcc-mips-linux-gnu libc6-dev-mips-cross \
17-
gcc-mipsel-linux-gnu libc6-dev-mipsel-cross \
18-
gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
19-
gcc-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross \
20-
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
21-
gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
22-
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
23-
gcc-s390x-linux-gnu libc6-dev-s390x-cross \
2413
xz-utils
2514

2615
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
@@ -32,19 +21,7 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
3221
rm dumb-init_*.deb
3322
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
3423

35-
ENV TARGETS=aarch64-unknown-linux-gnu
36-
ENV TARGETS=$TARGETS,arm-unknown-linux-gnueabi
37-
ENV TARGETS=$TARGETS,arm-unknown-linux-gnueabihf
38-
ENV TARGETS=$TARGETS,armv7-unknown-linux-gnueabihf
39-
ENV TARGETS=$TARGETS,asmjs-unknown-emscripten
40-
ENV TARGETS=$TARGETS,mips-unknown-linux-gnu
41-
ENV TARGETS=$TARGETS,mips64-unknown-linux-gnuabi64
42-
ENV TARGETS=$TARGETS,mips64el-unknown-linux-gnuabi64
43-
ENV TARGETS=$TARGETS,mipsel-unknown-linux-gnu
44-
ENV TARGETS=$TARGETS,powerpc-unknown-linux-gnu
45-
ENV TARGETS=$TARGETS,powerpc64-unknown-linux-gnu
46-
ENV TARGETS=$TARGETS,powerpc64le-unknown-linux-gnu
47-
ENV TARGETS=$TARGETS,s390x-unknown-linux-gnu
24+
ENV TARGETS=asmjs-unknown-emscripten
4825
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
4926

5027
#ENV TARGETS=$TARGETS,mips-unknown-linux-musl
@@ -62,15 +39,3 @@ ENV RUST_CONFIGURE_ARGS \
6239
ENV SCRIPT \
6340
python2.7 ../x.py build && \
6441
python2.7 ../x.py dist --target wasm32-unknown-emscripten
65-
66-
ENV AR_s390x_unknown_linux_gnu=s390x-linux-gnu-ar \
67-
CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
68-
AR_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-ar \
69-
CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
70-
AR_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-ar \
71-
CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc \
72-
AR_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-ar \
73-
CC_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-gcc
74-
75-
# FIXME(rust-lang/rust#36150): powerpc unfortunately aborts right now
76-
ENV NO_LLVM_ASSERTIONS=1

src/ci/docker/dist-arm-unknown-linux-gnueabi/Dockerfile renamed to src/ci/docker/dist-arm-linux/Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1212
sudo \
1313
gdb \
1414
xz-utils \
15-
g++-arm-linux-gnueabi
15+
g++-arm-linux-gnueabi \
16+
g++-arm-linux-gnueabihf
1617

1718
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
1819
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
@@ -23,8 +24,11 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
2324
rm dumb-init_*.deb
2425
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
2526

26-
ENV RUST_CONFIGURE_ARGS --host=arm-unknown-linux-gnueabi
27+
ENV RUST_CONFIGURE_ARGS \
28+
--host=arm-unknown-linux-gnueabi,arm-unknown-linux-gnueabihf
2729
ENV SCRIPT \
2830
python2.7 ../x.py dist \
2931
--host arm-unknown-linux-gnueabi \
30-
--target arm-unknown-linux-gnueabi
32+
--target arm-unknown-linux-gnueabi \
33+
--host arm-unknown-linux-gnueabihf \
34+
--target arm-unknown-linux-gnueabihf
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils \
15+
g++-arm-linux-gnueabihf \
16+
g++-aarch64-linux-gnu
17+
18+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
19+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
20+
tar xJf - -C /usr/local/bin --strip-components=1
21+
22+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
23+
dpkg -i dumb-init_*.deb && \
24+
rm dumb-init_*.deb
25+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26+
27+
ENV RUST_CONFIGURE_ARGS \
28+
--host=armv7-unknown-linux-gnueabihf,aarch64-unknown-linux-gnu
29+
ENV SCRIPT \
30+
python2.7 ../x.py dist \
31+
--host armv7-unknown-linux-gnueabihf \
32+
--target armv7-unknown-linux-gnueabihf \
33+
--host aarch64-unknown-linux-gnu \
34+
--target aarch64-unknown-linux-gnu

src/ci/docker/dist-x86_64-unknown-freebsd/Dockerfile renamed to src/ci/docker/dist-freebsd/Dockerfile

+11-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515
wget
1616

1717
COPY build-toolchain.sh /tmp/
18-
RUN sh /tmp/build-toolchain.sh
18+
RUN /tmp/build-toolchain.sh x86_64
19+
RUN /tmp/build-toolchain.sh i686
1920

2021
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
2122
dpkg -i dumb-init_*.deb && \
@@ -29,10 +30,16 @@ RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST |
2930
ENV \
3031
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
3132
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
32-
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++
33+
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++ \
34+
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
35+
CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \
36+
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++
3337

34-
ENV RUST_CONFIGURE_ARGS --host=x86_64-unknown-freebsd
38+
ENV RUST_CONFIGURE_ARGS \
39+
--host=x86_64-unknown-freebsd,i686-unknown-freebsd
3540
ENV SCRIPT \
3641
python2.7 ../x.py dist \
3742
--host x86_64-unknown-freebsd \
38-
--target x86_64-unknown-freebsd
43+
--target x86_64-unknown-freebsd \
44+
--host i686-unknown-freebsd \
45+
--target i686-unknown-freebsd

src/ci/docker/dist-x86_64-unknown-freebsd/build-toolchain.sh renamed to src/ci/docker/dist-freebsd/build-toolchain.sh

+23-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,37 @@
1111

1212
set -ex
1313

14-
ARCH=x86_64
14+
ARCH=$1
1515
BINUTILS=2.25.1
1616
GCC=5.3.0
1717

18+
hide_output() {
19+
set +x
20+
on_err="
21+
echo ERROR: An error was encountered with the build.
22+
cat /tmp/build.log
23+
exit 1
24+
"
25+
trap "$on_err" ERR
26+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
27+
PING_LOOP_PID=$!
28+
$@ &> /tmp/build.log
29+
trap - ERR
30+
kill $PING_LOOP_PID
31+
set -x
32+
}
33+
1834
mkdir binutils
1935
cd binutils
2036

2137
# First up, build binutils
2238
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
2339
mkdir binutils-build
2440
cd binutils-build
25-
../binutils-$BINUTILS/configure \
41+
hide_output ../binutils-$BINUTILS/configure \
2642
--target=$ARCH-unknown-freebsd10
27-
make -j10
28-
make install
43+
hide_output make -j10
44+
hide_output make install
2945
cd ../..
3046
rm -rf binutils
3147

@@ -76,7 +92,7 @@ cd gcc-$GCC
7692

7793
mkdir ../gcc-build
7894
cd ../gcc-build
79-
../gcc-$GCC/configure \
95+
hide_output ../gcc-$GCC/configure \
8096
--enable-languages=c,c++ \
8197
--target=$ARCH-unknown-freebsd10 \
8298
--disable-multilib \
@@ -90,7 +106,7 @@ cd ../gcc-build
90106
--disable-libsanitizer \
91107
--disable-libquadmath-support \
92108
--disable-lto
93-
make -j10
94-
make install
109+
hide_output make -j10
110+
hide_output make install
95111
cd ../..
96112
rm -rf gcc
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils \
15+
g++-mips-linux-gnu \
16+
g++-mipsel-linux-gnu
17+
18+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
19+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
20+
tar xJf - -C /usr/local/bin --strip-components=1
21+
22+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
23+
dpkg -i dumb-init_*.deb && \
24+
rm dumb-init_*.deb
25+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26+
27+
ENV RUST_CONFIGURE_ARGS \
28+
--host=mips-unknown-linux-gnu,mipsel-unknown-linux-gnu
29+
ENV SCRIPT \
30+
python2.7 ../x.py dist \
31+
--host mips-unknown-linux-gnu \
32+
--target mips-unknown-linux-gnu \
33+
--host mipsel-unknown-linux-gnu \
34+
--target mipsel-unknown-linux-gnu
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils \
15+
g++-mips64-linux-gnuabi64 \
16+
g++-mips64el-linux-gnuabi64
17+
18+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
19+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
20+
tar xJf - -C /usr/local/bin --strip-components=1
21+
22+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
23+
dpkg -i dumb-init_*.deb && \
24+
rm dumb-init_*.deb
25+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26+
27+
ENV RUST_CONFIGURE_ARGS \
28+
--host=mips64-unknown-linux-gnuabi64,mips64el-unknown-linux-gnuabi64
29+
ENV SCRIPT \
30+
python2.7 ../x.py dist \
31+
--host mips64-unknown-linux-gnuabi64 \
32+
--target mips64-unknown-linux-gnuabi64 \
33+
--host mips64el-unknown-linux-gnuabi64 \
34+
--target mips64el-unknown-linux-gnuabi64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils \
15+
g++-powerpc-linux-gnu
16+
17+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
18+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
19+
tar xJf - -C /usr/local/bin --strip-components=1
20+
21+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
22+
dpkg -i dumb-init_*.deb && \
23+
rm dumb-init_*.deb
24+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
25+
26+
ENV RUST_CONFIGURE_ARGS \
27+
--host=powerpc-unknown-linux-gnu
28+
ENV SCRIPT \
29+
python2.7 ../x.py dist \
30+
--host powerpc-unknown-linux-gnu \
31+
--target powerpc-unknown-linux-gnu
32+
33+
# FIXME(#36150) this will fail the bootstrap. Probably means something bad is
34+
# happening!
35+
ENV NO_LLVM_ASSERTIONS 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils \
15+
g++-powerpc64-linux-gnu \
16+
g++-powerpc64le-linux-gnu
17+
18+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
19+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
20+
tar xJf - -C /usr/local/bin --strip-components=1
21+
22+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
23+
dpkg -i dumb-init_*.deb && \
24+
rm dumb-init_*.deb
25+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
26+
27+
ENV \
28+
AR_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-ar \
29+
CC_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-gcc \
30+
CXX_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-g++
31+
32+
ENV RUST_CONFIGURE_ARGS \
33+
--host=powerpc64-unknown-linux-gnu,powerpc64le-unknown-linux-gnu
34+
ENV SCRIPT \
35+
python2.7 ../x.py dist \
36+
--host powerpc64-unknown-linux-gnu \
37+
--target powerpc64-unknown-linux-gnu \
38+
--host powerpc64le-unknown-linux-gnu \
39+
--target powerpc64le-unknown-linux-gnu

0 commit comments

Comments
 (0)