]> git.lizzy.rs Git - rust.git/commitdiff
ci: move musl install into their own scripts
authorVenkata Giri Reddy <venkatagirireddy@gmail.com>
Thu, 25 May 2017 17:01:55 +0000 (13:01 -0400)
committerVenkata Giri Reddy <venkatagirireddy@gmail.com>
Fri, 26 May 2017 16:50:52 +0000 (12:50 -0400)
src/ci/docker/cross/Dockerfile
src/ci/docker/cross/install-mips-musl.sh [new file with mode: 0755]
src/ci/docker/cross/install-mipsel-musl.sh [new file with mode: 0755]

index 1037067332b81c52c753435bc832ee829741cf0c..b4399a8d53ff0f6288d12dcb28950bb70712451d 100644 (file)
@@ -33,23 +33,11 @@ RUN ./build-rumprun.sh
 COPY cross/build-arm-musl.sh /tmp/
 RUN ./build-arm-musl.sh
 
-# originally from
-# 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
-RUN mkdir /usr/local/mips-linux-musl
-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 | \
-      tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
-RUN for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do \
-      ln -s $file /usr/local/bin/`basename $file`; \
-    done
+COPY cross/install-mips-musl.sh /tmp/
+RUN ./install-mips-musl.sh
 
-# Note that this originally came from:
-# 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
-RUN mkdir /usr/local/mipsel-linux-musl
-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 | \
-      tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
-RUN for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do \
-      ln -s $file /usr/local/bin/`basename $file`; \
-    done
+COPY cross/install-mipsel-musl.sh /tmp/
+RUN ./install-mipsel-musl.sh
 
 ENV TARGETS=asmjs-unknown-emscripten
 ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
diff --git a/src/ci/docker/cross/install-mips-musl.sh b/src/ci/docker/cross/install-mips-musl.sh
new file mode 100755 (executable)
index 0000000..416bb75
--- /dev/null
@@ -0,0 +1,24 @@
+# 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.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+mkdir /usr/local/mips-linux-musl
+
+# originally from
+# 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
+URL="https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror"
+FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2"
+curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
+
+for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do
+  ln -s $file /usr/local/bin/`basename $file`
+done
diff --git a/src/ci/docker/cross/install-mipsel-musl.sh b/src/ci/docker/cross/install-mipsel-musl.sh
new file mode 100755 (executable)
index 0000000..9744b24
--- /dev/null
@@ -0,0 +1,24 @@
+# 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.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+mkdir /usr/local/mipsel-linux-musl
+
+# Note that this originally came from:
+# 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
+URL="https://s3.amazonaws.com/rust-lang-ci/libc"
+FILE="OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2"
+curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
+
+for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do
+  ln -s $file /usr/local/bin/`basename $file`
+done