about summary refs log tree commit diff
path: root/src/ci/docker/scripts
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-13 08:06:11 +0000
committerbors <bors@rust-lang.org>2017-07-13 08:06:11 +0000
commit06ffdeb7816ae62175febdfa18534290bf5ad573 (patch)
tree09a50a2c77a0c846c5b833b29a222174eb94797c /src/ci/docker/scripts
parentcfd4c811881ac159b8604c47b8b0b63fe7d909bd (diff)
parent250346128b0083c8137171af503bda194c6124dd (diff)
downloadrust-06ffdeb7816ae62175febdfa18534290bf5ad573.tar.gz
rust-06ffdeb7816ae62175febdfa18534290bf5ad573.zip
Auto merge of #43129 - Ophirr33:master, r=alexcrichton
Updated docker images to share scripts

Attempts to resolve #42201. I managed to pull out five scripts (android-base-apt-get, ubuntu16-apt-get, make3, rustbuild-setup, and crosstool-ng). Let me know if there's more I can do or if I should change some names.
r? @malbarbo
Diffstat (limited to 'src/ci/docker/scripts')
-rw-r--r--src/ci/docker/scripts/android-base-apt-get.sh27
-rw-r--r--src/ci/docker/scripts/cross-apt-packages.sh36
-rw-r--r--src/ci/docker/scripts/crosstool-ng.sh20
-rw-r--r--src/ci/docker/scripts/make3.sh19
-rw-r--r--src/ci/docker/scripts/rustbuild-setup.sh14
5 files changed, 116 insertions, 0 deletions
diff --git a/src/ci/docker/scripts/android-base-apt-get.sh b/src/ci/docker/scripts/android-base-apt-get.sh
new file mode 100644
index 00000000000..7ae3bf39a38
--- /dev/null
+++ b/src/ci/docker/scripts/android-base-apt-get.sh
@@ -0,0 +1,27 @@
+# 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
+
+apt-get update
+apt-get install -y --no-install-recommends \
+  ca-certificates \
+  cmake \
+  curl \
+  file \
+  g++ \
+  git \
+  libssl-dev \
+  make \
+  pkg-config \
+  python2.7 \
+  sudo \
+  unzip \
+  xz-utils
diff --git a/src/ci/docker/scripts/cross-apt-packages.sh b/src/ci/docker/scripts/cross-apt-packages.sh
new file mode 100644
index 00000000000..f6c9cc960c5
--- /dev/null
+++ b/src/ci/docker/scripts/cross-apt-packages.sh
@@ -0,0 +1,36 @@
+# 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.
+
+apt-get update && apt-get install -y --no-install-recommends \
+  automake \
+  bison \
+  bzip2 \
+  ca-certificates \
+  cmake \
+  curl \
+  file \
+  flex \
+  g++ \
+  gawk \
+  gdb \
+  git \
+  gperf \
+  help2man \
+  libncurses-dev \
+  libssl-dev \
+  libtool-bin \
+  make \
+  patch \
+  pkg-config \
+  python2.7 \
+  sudo \
+  texinfo \
+  wget \
+  xz-utils
diff --git a/src/ci/docker/scripts/crosstool-ng.sh b/src/ci/docker/scripts/crosstool-ng.sh
new file mode 100644
index 00000000000..8b2747cf213
--- /dev/null
+++ b/src/ci/docker/scripts/crosstool-ng.sh
@@ -0,0 +1,20 @@
+# 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
+
+url="http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2"
+curl $url | tar xjf -
+cd crosstool-ng
+./configure --prefix=/usr/local
+make -j$(nproc)
+make install
+cd ..
+rm -rf crosstool-ng
diff --git a/src/ci/docker/scripts/make3.sh b/src/ci/docker/scripts/make3.sh
new file mode 100644
index 00000000000..8a7845cb8f3
--- /dev/null
+++ b/src/ci/docker/scripts/make3.sh
@@ -0,0 +1,19 @@
+# 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
+
+curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf -
+cd make-3.81
+./configure --prefix=/usr
+make
+make install
+cd ..
+rm -rf make-3.81
diff --git a/src/ci/docker/scripts/rustbuild-setup.sh b/src/ci/docker/scripts/rustbuild-setup.sh
new file mode 100644
index 00000000000..96efccfdff3
--- /dev/null
+++ b/src/ci/docker/scripts/rustbuild-setup.sh
@@ -0,0 +1,14 @@
+# 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
+
+groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
+mkdir /x-tools && chown rustbuild:rustbuild /x-tools