Move off the old cross builder where possible

Many of the toolchains in the old cross builder came from upstream Ubuntu
packages, so just use those but in their own separate container we assemble
locally. No need to download multi-gigabyte docker images when all we need is
one toolchain!
This commit is contained in:
Alex Crichton
2017-08-12 08:40:46 -07:00
parent 4342f7269b
commit 3e99a693a3
10 changed files with 95 additions and 16 deletions

View File

@@ -15,6 +15,7 @@ matrix:
env: TARGET=x86_64-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-dist:2015-10-20b
NO_ADD=1
ALLOW_PR=1
# Cross builds happen in the `rust-slave-linux-cross` image to ensure that
# we use the right cross compilers for these targets. That image should
@@ -49,31 +50,31 @@ matrix:
SKIP_TESTS=1
- os: linux
env: TARGET=powerpc64-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=powerpc64-unknown-linux-gnu
SKIP_TESTS=1
- os: linux
env: TARGET=powerpc64le-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=powerpc64le-unknown-linux-gnu
SKIP_TESTS=1
- os: linux
env: TARGET=mips-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=mips-unknown-linux-gnu
SKIP_TESTS=1
- os: linux
env: TARGET=mipsel-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=mipsel-unknown-linux-gnu
SKIP_TESTS=1
- os: linux
env: TARGET=mips64-unknown-linux-gnuabi64
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=mips64-unknown-linux-gnuabi64
SKIP_TESTS=1
- os: linux
env: TARGET=mips64el-unknown-linux-gnuabi64
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=mips64el-unknown-linux-gnuabi64
SKIP_TESTS=1
- os: linux
env: TARGET=s390x-unknown-linux-gnu
DOCKER=alexcrichton/rust-slave-linux-cross:2016-11-11
DOCKER=s390x-unknown-linux-gnu
SKIP_TESTS=1
# Android use a local docker image

View File

@@ -14,13 +14,14 @@ fi
docker run \
--entrypoint bash \
-u `id -u`:`id -g` \
-v $HOME/rust:/travis-rust:ro \
-v `pwd`:/buildslave:ro \
-v `pwd`/target:/buildslave/target \
-e TARGET=$TARGET \
-e SKIP_TESTS=$SKIP_TESTS \
-it $DOCKER \
--user `id -u`:`id -g` \
--volume `rustc --print sysroot`:/travis-rust:ro \
--volume `pwd`:/src:ro \
--volume `pwd`/target:/src/target \
--workdir /src \
--env TARGET=$TARGET \
--env SKIP_TESTS=$SKIP_TESTS \
$DOCKER \
ci/run-docker.sh
# check that rustup-init was built with ssl support

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-mips-linux-gnu \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_mips_unknown_linux_gnu=mips-linux-gnu-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-mips64-linux-gnuabi64 \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-mips64el-linux-gnuabi64 \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-mipsel-linux-gnu \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-powerpc64-linux-gnu \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_powerpc64_unknown_linux_gnu=powerpc64-linux-gnu-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-powerpc64le-linux-gnu \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc

View File

@@ -0,0 +1,11 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
gcc-s390x-linux-gnu \
curl \
ca-certificates \
perl \
make \
gcc
ENV CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc

View File

@@ -112,7 +112,7 @@ case $TARGET in
;;
powerpc64-*-linux-*)
OPENSSL_OS=linux-ppc64
OPENSSL_CC=powerpc64-linux-gnu-gcc-5
OPENSSL_CC=powerpc64-linux-gnu-gcc
OPENSSL_AR=powerpc64-linux-gnu-ar
OPENSSL_CFLAGS=-m64
;;
@@ -179,7 +179,7 @@ else
# Travis will cache the parent directory. That's fine, but want a way of marking the
# install "complete". In this setup, if the build fails there will be no -final and
# the whole thing starts again (which is fine).
# the whole thing starts again (which is fine).
# The same reasoning is why to cache the install-target directory rather than
# the build directory in the first place (make should be able to sort itself out in
# that case, but that's relying on intuitive timestamps in the presence of caching etc)