Skip to content

Commit a3d9c36

Browse files
committed
Use scripts to reduce code size
1 parent 9a76934 commit a3d9c36

File tree

3 files changed

+23
-33
lines changed

3 files changed

+23
-33
lines changed

src/ci/docker/cross/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1919
bzip2 \
2020
patch \
2121
libssl-dev \
22-
pkg-config \
23-
software-properties-common \
24-
apt-transport-https
22+
pkg-config
2523

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

src/ci/docker/cross/install-x86_64-redox.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
23
# file at the top-level directory of this distribution and at
34
# http://rust-lang.org/COPYRIGHT.
@@ -8,9 +9,15 @@
89
# option. This file may not be copied, modified, or distributed
910
# except according to those terms.
1011

12+
# ignore-tidy-linelength
13+
1114
set -ex
1215

16+
apt-get update
17+
apt-get install -y --no-install-recommends software-properties-common apt-transport-https
18+
1319
apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
1420
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /'
21+
1522
apt-get update
1623
apt-get install -y x86-64-unknown-redox-gcc

src/ci/docker/dist-x86_64-redox/Dockerfile

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,22 @@
11
FROM ubuntu:16.04
22

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-
bzip2 \
14-
xz-utils \
15-
wget \
16-
libssl-dev \
17-
pkg-config \
18-
software-properties-common \
19-
apt-transport-https
20-
21-
# Install the cross compiler
22-
RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F && \
23-
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /' && \
24-
apt-get update && \
25-
apt-get install -y x86-64-unknown-redox-gcc
26-
27-
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
28-
dpkg -i dumb-init_*.deb && \
29-
rm dumb-init_*.deb
3+
COPY scripts/cross-apt-packages.sh /scripts/
4+
RUN sh /scripts/cross-apt-packages.sh
5+
6+
COPY scripts/dumb-init.sh /scripts/
7+
RUN sh /scripts/dumb-init.sh
8+
309
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
3110

32-
RUN curl -o /usr/local/bin/sccache \
33-
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl && \
34-
chmod +x /usr/local/bin/sccache
11+
COPY scripts/crosstool-ng.sh /scripts/
12+
RUN sh /scripts/crosstool-ng.sh
13+
14+
WORKDIR /tmp
15+
COPY cross/install-x86_64-redox.sh /tmp/
16+
RUN ./install-x86_64-redox.sh
17+
18+
COPY scripts/sccache.sh /scripts/
19+
RUN sh /scripts/sccache.sh
3520

3621
ENV \
3722
AR_x86_64_unknown_redox=x86_64-unknown-redox-ar \

0 commit comments

Comments
 (0)