Skip to content

Commit cb7dbd5

Browse files
committed
ci: move musl install into their own scripts
1 parent 5ce2eb1 commit cb7dbd5

File tree

3 files changed

+52
-16
lines changed

3 files changed

+52
-16
lines changed

src/ci/docker/cross/Dockerfile

+4-16
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,11 @@ RUN ./build-rumprun.sh
3333
COPY cross/build-arm-musl.sh /tmp/
3434
RUN ./build-arm-musl.sh
3535

36-
# originally from
37-
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
38-
RUN mkdir /usr/local/mips-linux-musl
39-
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2 | \
40-
tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
41-
RUN for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do \
42-
ln -s $file /usr/local/bin/`basename $file`; \
43-
done
36+
COPY cross/install-mips-musl.sh /tmp/
37+
RUN ./install-mips-musl.sh
4438

45-
# Note that this originally came from:
46-
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
47-
RUN mkdir /usr/local/mipsel-linux-musl
48-
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
49-
tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
50-
RUN for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do \
51-
ln -s $file /usr/local/bin/`basename $file`; \
52-
done
39+
COPY cross/install-mipsel-musl.sh /tmp/
40+
RUN ./install-mipsel-musl.sh
5341

5442
ENV TARGETS=asmjs-unknown-emscripten
5543
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
11+
set -ex
12+
13+
mkdir /usr/local/mips-linux-musl
14+
15+
# originally from
16+
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/
17+
# OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
18+
URL="https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror"
19+
FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2"
20+
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
21+
22+
for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do
23+
ln -s $file /usr/local/bin/`basename $file`
24+
done
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
11+
set -ex
12+
13+
mkdir /usr/local/mipsel-linux-musl
14+
15+
# Note that this originally came from:
16+
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/
17+
# OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
18+
URL="https://s3.amazonaws.com/rust-lang-ci/libc"
19+
FILE="OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2"
20+
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
21+
22+
for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do
23+
ln -s $file /usr/local/bin/`basename $file`
24+
done

0 commit comments

Comments
 (0)