Bug 1237366 - Update rust-build docker source. r=dustin

Rename scripts to avoid confict with taskcluster infrastructure.

Matches contents of https://github.com/rillian/rust-build
commit 8eec0128c6787b5266192feb4b3b27713ae0068e
tag v0.1.0


--HG--
rename : testing/docker/rust-build/checkout-sources.sh => testing/docker/rust-build/fetch_rust.sh
This commit is contained in:
Ralph Giles 2016-01-21 14:33:24 -08:00
Родитель 9eb1f14de4
Коммит f78ce6ca82
6 изменённых файлов: 14 добавлений и 18 удалений

Просмотреть файл

@ -1,6 +1,10 @@
FROM quay.io/rillian/rust-buildbot
MAINTAINER Ralph Giles <giles@mozilla.com>
# Reset user/workdir from parent image so we can install software.
WORKDIR /
USER root
# Update base.
RUN yum upgrade -y
RUN yum clean all
@ -11,7 +15,7 @@ ADD https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
RUN chmod +rx /build/tooltool.py
# Add build scripts.
ADD checkout-sources.sh build.sh /build/
ADD fetch_rust.sh build_rust.sh /build/
RUN chmod +x /build/*
# Create user for doing the build.
@ -25,4 +29,4 @@ WORKDIR ${HOME}
# Invoke our build scripts by default, but allow other commands.
USER ${USER}
CMD /build/checkout-sources.sh && /build/build.sh
ENTRYPOINT /build/fetch_rust.sh && /build/build_rust.sh

Просмотреть файл

@ -1,2 +0,0 @@
all: Dockerfile checkout-sources.sh build.sh
docker build -t rust-build .

Просмотреть файл

@ -0,0 +1 @@
quay.io/rust

Просмотреть файл

@ -0,0 +1 @@
0.1.0

Просмотреть файл

@ -10,28 +10,20 @@ set -v
# Configure and build rust.
OPTIONS="--enable-rpath --enable-llvm-static-stdcpp --disable-docs"
M32="i686-unknown-linux-gnu"
M64="x86_64-unknown-linux-gnu"
x32="i686-unknown-linux-gnu"
x64="x86_64-unknown-linux-gnu"
arm="arm-linux-androideabi"
mkdir -p ${WORKSPACE}/rust-build
pushd ${WORKSPACE}/rust-build
mkdir -p ${M32}
pushd ${M32}
${WORKSPACE}/rust/configure --prefix=${PWD}/../rustc --build=${M32} ${OPTIONS}
make -j ${CORES}
popd
mkdir -p ${M64}
pushd ${M64}
${WORKSPACE}/rust/configure --prefix=${PWD}/../rustc --build=${M64} ${OPTIONS}
${WORKSPACE}/rust/configure --prefix=${WORKSPACE}/rustc \
--target=${x64},${x32} ${OPTIONS}
make -j ${CORES}
make install
popd
# Copy 32 bit stdlib into the install directory for cross support.
cp -r ${M32}/${M32}/stage2/lib/rustlib/${M32} rustc/lib/rustlib/
popd
# Package the toolchain for upload.
pushd ${WORKSPACE}/rust-build
pushd ${WORKSPACE}
tar cvJf rustc.tar.xz rustc/*
/build/tooltool.py add --visibility=public rustc.tar.xz
popd