Skip to content

Commit 12e921d

Browse files
authored
Rollup merge of rust-lang#40998 - alexcrichton:split-dist, r=TimNN
travis: Split all dist builders in two Previously we would use one builder on Travis to produce two sets of host compilers for two different targets. Unfortunately though we've recently increased how much we're building for each target so this is starting to take unnecessarily long (rust-lang#40804). This commit splits the dist builders in two by ensuring that we only dist one target on each builder, which should take a much shorter amount of time. This should also unblock other work such as landing the RLS (rust-lang#40584).
2 parents 5309a3e + 541512b commit 12e921d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+996
-66
lines changed

Diff for: .travis.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ matrix:
1515
- env: IMAGE=arm-android
1616
- env: IMAGE=armhf-gnu
1717
- env: IMAGE=cross DEPLOY=1
18+
- env: IMAGE=dist-aarch64-linux DEPLOY=1
1819
- env: IMAGE=dist-android DEPLOY=1
1920
- env: IMAGE=dist-arm-linux DEPLOY=1
20-
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
21-
- env: IMAGE=dist-freebsd DEPLOY=1
22-
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
21+
- env: IMAGE=dist-armhf-linux DEPLOY=1
22+
- env: IMAGE=dist-armv7-linux DEPLOY=1
2323
- env: IMAGE=dist-fuchsia DEPLOY=1
24+
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
25+
- env: IMAGE=dist-i686-freebsd DEPLOY=1
26+
- env: IMAGE=dist-i686-linux DEPLOY=1
2427
- env: IMAGE=dist-mips-linux DEPLOY=1
2528
- env: IMAGE=dist-mips64-linux DEPLOY=1
29+
- env: IMAGE=dist-mips64el-linux DEPLOY=1
30+
- env: IMAGE=dist-mipsel-linux DEPLOY=1
2631
- env: IMAGE=dist-powerpc-linux DEPLOY=1
2732
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
28-
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
29-
- env: IMAGE=dist-x86-linux DEPLOY=1
33+
- env: IMAGE=dist-powerpc64le-linux DEPLOY=1
34+
- env: IMAGE=dist-s390x-linux DEPLOY=1
35+
- env: IMAGE=dist-x86_64-freebsd DEPLOY=1
36+
- env: IMAGE=dist-x86_64-linux DEPLOY=1
3037
- env: IMAGE=dist-x86_64-musl DEPLOY=1
38+
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1
3139
- env: IMAGE=emscripten
3240
- env: IMAGE=i686-gnu
3341
- env: IMAGE=i686-gnu-nopt

Diff for: src/ci/docker/dist-armv7-aarch64-linux/Dockerfile renamed to src/ci/docker/dist-aarch64-linux/Dockerfile

+3-9
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
5656
USER rustbuild
5757
WORKDIR /tmp
5858

59-
COPY armv7-linux-gnueabihf.config /tmp/
60-
COPY armv7-linux-gnueabihf.config aarch64-linux-gnu.config build-toolchains.sh /tmp/
59+
COPY aarch64-linux-gnu.config build-toolchains.sh /tmp/
6160
RUN ./build-toolchains.sh
6261

6362
USER root
@@ -67,17 +66,12 @@ RUN curl -o /usr/local/bin/sccache \
6766
chmod +x /usr/local/bin/sccache
6867

6968
ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin
70-
ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin
7169

7270
ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
7371
AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-ar \
74-
CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-g++ \
75-
CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
76-
AR_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-ar \
77-
CXX_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-g++
72+
CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-g++
7873

79-
ENV HOSTS=armv7-unknown-linux-gnueabihf
80-
ENV HOSTS=$HOSTS,aarch64-unknown-linux-gnu
74+
ENV HOSTS=aarch64-unknown-linux-gnu
8175

8276
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
8377
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-aarch64-linux/build-toolchains.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
hide_output() {
15+
set +x
16+
on_err="
17+
echo ERROR: An error was encountered with the build.
18+
cat /tmp/build.log
19+
exit 1
20+
"
21+
trap "$on_err" ERR
22+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23+
PING_LOOP_PID=$!
24+
$@ &> /tmp/build.log
25+
rm /tmp/build.log
26+
trap - ERR
27+
kill $PING_LOOP_PID
28+
set -x
29+
}
30+
31+
mkdir build
32+
cd build
33+
cp ../aarch64-linux-gnu.config .config
34+
ct-ng oldconfig
35+
hide_output ct-ng build
36+
cd ..
37+
rm -rf build

Diff for: src/ci/docker/dist-arm-linux/Dockerfile

+2-7
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
5656
USER rustbuild
5757
WORKDIR /tmp
5858

59-
COPY arm-linux-gnueabihf.config arm-linux-gnueabi.config build-toolchains.sh /tmp/
59+
COPY arm-linux-gnueabi.config build-toolchains.sh /tmp/
6060
RUN ./build-toolchains.sh
6161

6262
USER root
@@ -66,17 +66,12 @@ RUN curl -o /usr/local/bin/sccache \
6666
chmod +x /usr/local/bin/sccache
6767

6868
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabi/bin
69-
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin
7069

7170
ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
7271
AR_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-ar \
73-
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++ \
74-
CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
75-
AR_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-ar \
76-
CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++
72+
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++
7773

7874
ENV HOSTS=arm-unknown-linux-gnueabi
79-
ENV HOSTS=$HOSTS,arm-unknown-linux-gnueabihf
8075

8176
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
8277
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-arm-linux/build-toolchains.sh

-8
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,3 @@ ct-ng oldconfig
3535
hide_output ct-ng build
3636
cd ..
3737
rm -rf build
38-
39-
mkdir build
40-
cd build
41-
cp ../arm-linux-gnueabihf.config .config
42-
ct-ng oldconfig
43-
hide_output ct-ng build
44-
cd ..
45-
rm -rf build

Diff for: src/ci/docker/dist-armhf-linux/Dockerfile

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
automake \
5+
bison \
6+
bzip2 \
7+
ca-certificates \
8+
cmake \
9+
curl \
10+
file \
11+
flex \
12+
g++ \
13+
gawk \
14+
gdb \
15+
git \
16+
gperf \
17+
help2man \
18+
libncurses-dev \
19+
libtool-bin \
20+
make \
21+
patch \
22+
python2.7 \
23+
sudo \
24+
texinfo \
25+
wget \
26+
xz-utils \
27+
libssl-dev \
28+
pkg-config
29+
30+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
31+
dpkg -i dumb-init_*.deb && \
32+
rm dumb-init_*.deb
33+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
34+
35+
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
36+
# toolchains we build below chokes on that, so go back to make 3
37+
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
38+
cd make-3.81 && \
39+
./configure --prefix=/usr && \
40+
make && \
41+
make install && \
42+
cd .. && \
43+
rm -rf make-3.81
44+
45+
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
46+
tar xjf - && \
47+
cd crosstool-ng && \
48+
./configure --prefix=/usr/local && \
49+
make -j$(nproc) && \
50+
make install && \
51+
cd .. && \
52+
rm -rf crosstool-ng
53+
54+
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
55+
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
56+
USER rustbuild
57+
WORKDIR /tmp
58+
59+
COPY arm-linux-gnueabihf.config build-toolchains.sh /tmp/
60+
RUN ./build-toolchains.sh
61+
62+
USER root
63+
64+
RUN curl -o /usr/local/bin/sccache \
65+
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-unknown-linux-musl && \
66+
chmod +x /usr/local/bin/sccache
67+
68+
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin
69+
70+
ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
71+
AR_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-ar \
72+
CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++
73+
74+
ENV HOSTS=arm-unknown-linux-gnueabihf
75+
76+
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
77+
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-armhf-linux/build-toolchains.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
set -ex
13+
14+
hide_output() {
15+
set +x
16+
on_err="
17+
echo ERROR: An error was encountered with the build.
18+
cat /tmp/build.log
19+
exit 1
20+
"
21+
trap "$on_err" ERR
22+
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23+
PING_LOOP_PID=$!
24+
$@ &> /tmp/build.log
25+
rm /tmp/build.log
26+
trap - ERR
27+
kill $PING_LOOP_PID
28+
set -x
29+
}
30+
31+
mkdir build
32+
cd build
33+
cp ../arm-linux-gnueabihf.config .config
34+
ct-ng oldconfig
35+
hide_output ct-ng build
36+
cd ..
37+
rm -rf build

Diff for: src/ci/docker/dist-armv7-linux/Dockerfile

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
automake \
5+
bison \
6+
bzip2 \
7+
ca-certificates \
8+
cmake \
9+
curl \
10+
file \
11+
flex \
12+
g++ \
13+
gawk \
14+
gdb \
15+
git \
16+
gperf \
17+
help2man \
18+
libncurses-dev \
19+
libtool-bin \
20+
make \
21+
patch \
22+
python2.7 \
23+
sudo \
24+
texinfo \
25+
wget \
26+
xz-utils \
27+
libssl-dev \
28+
pkg-config
29+
30+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
31+
dpkg -i dumb-init_*.deb && \
32+
rm dumb-init_*.deb
33+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
34+
35+
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
36+
# toolchains we build below chokes on that, so go back to make 3
37+
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
38+
cd make-3.81 && \
39+
./configure --prefix=/usr && \
40+
make && \
41+
make install && \
42+
cd .. && \
43+
rm -rf make-3.81
44+
45+
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
46+
tar xjf - && \
47+
cd crosstool-ng && \
48+
./configure --prefix=/usr/local && \
49+
make -j$(nproc) && \
50+
make install && \
51+
cd .. && \
52+
rm -rf crosstool-ng
53+
54+
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
55+
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
56+
USER rustbuild
57+
WORKDIR /tmp
58+
59+
COPY build-toolchains.sh armv7-linux-gnueabihf.config /tmp/
60+
RUN ./build-toolchains.sh
61+
62+
USER root
63+
64+
RUN curl -o /usr/local/bin/sccache \
65+
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-unknown-linux-musl && \
66+
chmod +x /usr/local/bin/sccache
67+
68+
ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin
69+
70+
ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
71+
AR_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-ar \
72+
CXX_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-g++
73+
74+
ENV HOSTS=armv7-unknown-linux-gnueabihf
75+
76+
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
77+
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh renamed to src/ci/docker/dist-armv7-linux/build-toolchains.sh

-8
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,3 @@ ct-ng oldconfig
3535
hide_output ct-ng build
3636
cd ..
3737
rm -rf build
38-
39-
mkdir build
40-
cd build
41-
cp ../aarch64-linux-gnu.config .config
42-
ct-ng oldconfig
43-
hide_output ct-ng build
44-
cd ..
45-
rm -rf build

Diff for: src/ci/docker/dist-freebsd/Dockerfile renamed to src/ci/docker/dist-i686-freebsd/Dockerfile

+1-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
pkg-config
1818

1919
COPY build-toolchain.sh /tmp/
20-
RUN /tmp/build-toolchain.sh x86_64
2120
RUN /tmp/build-toolchain.sh i686
2221

2322
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
@@ -30,15 +29,11 @@ RUN curl -o /usr/local/bin/sccache \
3029
chmod +x /usr/local/bin/sccache
3130

3231
ENV \
33-
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
34-
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
35-
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++ \
3632
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
3733
CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \
3834
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++
3935

40-
ENV HOSTS=x86_64-unknown-freebsd
41-
ENV HOSTS=$HOSTS,i686-unknown-freebsd
36+
ENV HOSTS=i686-unknown-freebsd
4237

4338
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
4439
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

Diff for: src/ci/docker/dist-x86-linux/Dockerfile renamed to src/ci/docker/dist-i686-linux/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ RUN curl -o /usr/local/bin/sccache \
8080
chmod +x /usr/local/bin/sccache
8181

8282
ENV HOSTS=i686-unknown-linux-gnu
83-
ENV HOSTS=$HOSTS,x86_64-unknown-linux-gnu
8483

8584
ENV RUST_CONFIGURE_ARGS \
8685
--host=$HOSTS \
File renamed without changes.

Diff for: src/ci/docker/dist-mips-linux/Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1313
gdb \
1414
xz-utils \
1515
g++-mips-linux-gnu \
16-
g++-mipsel-linux-gnu \
1716
libssl-dev \
1817
pkg-config
1918

@@ -27,7 +26,6 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
2726
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
2827

2928
ENV HOSTS=mips-unknown-linux-gnu
30-
ENV HOSTS=$HOSTS,mipsel-unknown-linux-gnu
3129

3230
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
3331
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

0 commit comments

Comments
 (0)