Skip to content

Commit

Permalink
Use scripts to reduce code size
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Aug 14, 2017
1 parent 9a76934 commit a3d9c36
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 33 deletions.
4 changes: 1 addition & 3 deletions src/ci/docker/cross/Dockerfile
Expand Up @@ -19,9 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
patch \
libssl-dev \
pkg-config \
software-properties-common \
apt-transport-https
pkg-config

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh
Expand Down
7 changes: 7 additions & 0 deletions src/ci/docker/cross/install-x86_64-redox.sh
@@ -1,3 +1,4 @@
#!/bin/bash
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
Expand All @@ -8,9 +9,15 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

# ignore-tidy-linelength

set -ex

apt-get update
apt-get install -y --no-install-recommends software-properties-common apt-transport-https

apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /'

apt-get update
apt-get install -y x86-64-unknown-redox-gcc
45 changes: 15 additions & 30 deletions src/ci/docker/dist-x86_64-redox/Dockerfile
@@ -1,37 +1,22 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
file \
curl \
ca-certificates \
python2.7 \
git \
cmake \
sudo \
bzip2 \
xz-utils \
wget \
libssl-dev \
pkg-config \
software-properties-common \
apt-transport-https

# Install the cross compiler
RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F && \
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /' && \
apt-get update && \
apt-get install -y x86-64-unknown-redox-gcc

RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && \
rm dumb-init_*.deb
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/dumb-init.sh /scripts/
RUN sh /scripts/dumb-init.sh

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

RUN curl -o /usr/local/bin/sccache \
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl && \
chmod +x /usr/local/bin/sccache
COPY scripts/crosstool-ng.sh /scripts/
RUN sh /scripts/crosstool-ng.sh

WORKDIR /tmp
COPY cross/install-x86_64-redox.sh /tmp/
RUN ./install-x86_64-redox.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV \
AR_x86_64_unknown_redox=x86_64-unknown-redox-ar \
Expand Down

0 comments on commit a3d9c36

Please sign in to comment.