about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-15 13:33:05 +0000
committerbors <bors@rust-lang.org>2017-08-15 13:33:05 +0000
commit1b08e0f231cd30719c25a5992f1d9bb27ea02b61 (patch)
tree136298fb12dd847ca761467a302c49d892642f38 /src
parentc774c9591959edc9aa098e5ff7fc4be2e4a12c09 (diff)
parent727b473e5c5d26b3f35259723101ba384e1a5502 (diff)
downloadrust-1b08e0f231cd30719c25a5992f1d9bb27ea02b61.tar.gz
rust-1b08e0f231cd30719c25a5992f1d9bb27ea02b61.zip
Auto merge of #43303 - redox-os:redox_docker, r=alexcrichton
Add Redox Dockerfile and Travis Environment

This adds Redox to the Travis build. This is an example implementation of https://github.com/rust-lang/rust/issues/43206
Diffstat (limited to 'src')
-rw-r--r--src/ci/docker/cross/Dockerfile7
-rwxr-xr-xsrc/ci/docker/cross/install-x86_64-redox.sh23
-rw-r--r--src/ci/docker/disabled/dist-x86_64-redox/Dockerfile27
3 files changed, 56 insertions, 1 deletions
diff --git a/src/ci/docker/cross/Dockerfile b/src/ci/docker/cross/Dockerfile
index 70dfbb53da2..0579d2397c8 100644
--- a/src/ci/docker/cross/Dockerfile
+++ b/src/ci/docker/cross/Dockerfile
@@ -38,6 +38,9 @@ RUN ./install-mips-musl.sh
 COPY cross/install-mipsel-musl.sh /tmp/
 RUN ./install-mipsel-musl.sh
 
+COPY cross/install-x86_64-redox.sh /tmp/
+RUN ./install-x86_64-redox.sh
+
 ENV TARGETS=asmjs-unknown-emscripten
 ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
 ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
@@ -47,10 +50,12 @@ ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
 ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
 ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
 ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
+ENV TARGETS=$TARGETS,x86_64-unknown-redox
 
 ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
     CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
-    CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
+    CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
+    CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
 
 # Suppress some warnings in the openwrt toolchains we downloaded
 ENV STAGING_DIR=/tmp
diff --git a/src/ci/docker/cross/install-x86_64-redox.sh b/src/ci/docker/cross/install-x86_64-redox.sh
new file mode 100755
index 00000000000..8e052c4acd2
--- /dev/null
+++ b/src/ci/docker/cross/install-x86_64-redox.sh
@@ -0,0 +1,23 @@
+#!/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.
+#
+# 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.
+
+# 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
diff --git a/src/ci/docker/disabled/dist-x86_64-redox/Dockerfile b/src/ci/docker/disabled/dist-x86_64-redox/Dockerfile
new file mode 100644
index 00000000000..852ae058373
--- /dev/null
+++ b/src/ci/docker/disabled/dist-x86_64-redox/Dockerfile
@@ -0,0 +1,27 @@
+FROM ubuntu:16.04
+
+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", "--"]
+
+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 \
+    CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
+    CXX_x86_64_unknown_redox=x86_64-unknown-redox-g++
+
+ENV RUST_CONFIGURE_ARGS --target=x86_64-unknown-redox --enable-extended
+ENV SCRIPT python2.7 ../x.py dist --target x86_64-unknown-redox