Skip to content

Commit 1b08e0f

Browse files
committed
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 #43206
2 parents c774c95 + 727b473 commit 1b08e0f

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

src/ci/docker/cross/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ RUN ./install-mips-musl.sh
3838
COPY cross/install-mipsel-musl.sh /tmp/
3939
RUN ./install-mipsel-musl.sh
4040

41+
COPY cross/install-x86_64-redox.sh /tmp/
42+
RUN ./install-x86_64-redox.sh
43+
4144
ENV TARGETS=asmjs-unknown-emscripten
4245
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
4346
ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
@@ -47,10 +50,12 @@ ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
4750
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
4851
ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
4952
ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
53+
ENV TARGETS=$TARGETS,x86_64-unknown-redox
5054

5155
ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
5256
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
53-
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
57+
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
58+
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
5459

5560
# Suppress some warnings in the openwrt toolchains we downloaded
5661
ENV STAGING_DIR=/tmp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
11+
12+
# ignore-tidy-linelength
13+
14+
set -ex
15+
16+
apt-get update
17+
apt-get install -y --no-install-recommends software-properties-common apt-transport-https
18+
19+
apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
20+
add-apt-repository -y 'deb https://static.redox-os.org/toolchain/apt /'
21+
22+
apt-get update
23+
apt-get install -y x86-64-unknown-redox-gcc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:16.04
2+
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+
9+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
10+
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
20+
21+
ENV \
22+
AR_x86_64_unknown_redox=x86_64-unknown-redox-ar \
23+
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
24+
CXX_x86_64_unknown_redox=x86_64-unknown-redox-g++
25+
26+
ENV RUST_CONFIGURE_ARGS --target=x86_64-unknown-redox --enable-extended
27+
ENV SCRIPT python2.7 ../x.py dist --target x86_64-unknown-redox

0 commit comments

Comments
 (0)