Skip to content

Commit

Permalink
Test the c-system feature in CI as well
Browse files Browse the repository at this point in the history
  • Loading branch information
infinity0 committed Sep 13, 2019
1 parent e4384f6 commit ca5aece
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 9 deletions.
18 changes: 16 additions & 2 deletions ci/docker/aarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
FROM ubuntu:18.04
RUN apt-get update && \
RUN dpkg --add-architecture arm64 && \
sed -e "\,security.ubuntu.com/ubuntu,p;s,security.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-e "\,archive.ubuntu.com/ubuntu,p;s,archive.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-i /etc/apt/sources.list && \
sed -e "\,security.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,archive.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,ports.ubuntu.com/ubuntu-ports,s.^deb .deb [ arch=arm64 ] .g" \
-i /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
qemu-user-static
clang xz-utils \
qemu-user-static && \
cd /tmp && \
apt-get download libclang-common-6.0-dev:arm64 && \
ar xf libclang-common-6.0-dev_*_arm64.deb && \
tar -C/ -xf data.tar.xz ."$(dirname $(clang -rtlib=compiler-rt --print-libgcc-file-name))"
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=qemu-aarch64-static \
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
CLANG=clang \
RUST_TEST_THREADS=1
19 changes: 17 additions & 2 deletions ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
FROM ubuntu:18.04
RUN apt-get update && \
RUN dpkg --add-architecture armhf && \
sed -e "\,security.ubuntu.com/ubuntu,p;s,security.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-e "\,archive.ubuntu.com/ubuntu,p;s,archive.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-i /etc/apt/sources.list && \
sed -e "\,security.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,archive.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,ports.ubuntu.com/ubuntu-ports,s.^deb .deb [ arch=armhf ] .g" \
-i /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross \
clang xz-utils \
qemu-user-static && \
cd /tmp && \
apt-get download libclang-common-6.0-dev:armhf && \
ar xf libclang-common-6.0-dev_*_armhf.deb && \
tar -C/ -xf data.tar.xz ."$(dirname $(clang -rtlib=compiler-rt --print-libgcc-file-name))"
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm-static \
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
CLANG=clang \
RUST_TEST_THREADS=1
4 changes: 3 additions & 1 deletion ci/docker/i686-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev ca-certificates
gcc-multilib libc6-dev ca-certificates \
clang
ENV CLANG=clang
20 changes: 17 additions & 3 deletions ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
FROM ubuntu:18.04

RUN apt-get update && \
RUN dpkg --add-architecture ppc64el && \
sed -e "\,security.ubuntu.com/ubuntu,p;s,security.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-e "\,archive.ubuntu.com/ubuntu,p;s,archive.ubuntu.com/ubuntu,ports.ubuntu.com/ubuntu-ports,g" \
-i /etc/apt/sources.list && \
sed -e "\,security.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,archive.ubuntu.com/ubuntu,s.^deb .deb [ arch=amd64,i386 ] .g" \
-e "\,ports.ubuntu.com/ubuntu-ports,s.^deb .deb [ arch=ppc64el ] .g" \
-i /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user-static ca-certificates \
gcc libc6-dev ca-certificates \
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
qemu-system-ppc
clang xz-utils \
qemu-user-static qemu-system-ppc && \
cd /tmp && \
apt-get download libclang-common-6.0-dev:ppc64el && \
ar xf libclang-common-6.0-dev_*_ppc64el.deb && \
tar -C/ -xf data.tar.xz ."$(dirname $(clang -rtlib=compiler-rt --print-libgcc-file-name))"

ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc \
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER=qemu-ppc64le-static \
QEMU_CPU=POWER8 \
QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu \
CLANG=clang \
RUST_TEST_THREADS=1
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates
gcc libc6-dev ca-certificates clang
8 changes: 8 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cargo build --target $1
cargo build --target $1 --release
cargo build --target $1 --features c
cargo build --target $1 --release --features c
if [ -n "$CLANG" -o -n "$LLVM_CONFIG" ]; then
cargo build --target $1 --features c-system
cargo build --target $1 --release --features c-system
fi

PREFIX=$(echo $1 | sed -e 's/unknown-//')-
case $1 in
Expand Down Expand Up @@ -77,6 +81,10 @@ RUSTFLAGS="-C debug-assertions=no" $build_intrinsics
RUSTFLAGS="-C debug-assertions=no" $build_intrinsics --release
RUSTFLAGS="-C debug-assertions=no" $build_intrinsics --features c
RUSTFLAGS="-C debug-assertions=no" $build_intrinsics --features c --release
if [ -n "$CLANG" -o -n "$LLVM_CONFIG" ]; then
RUSTFLAGS="-C debug-assertions=no" $build_intrinsics --features c-system
RUSTFLAGS="-C debug-assertions=no" $build_intrinsics --features c-system --release
fi

# Verify that there are no undefined symbols to `panic` within our
# implementations
Expand Down

0 comments on commit ca5aece

Please sign in to comment.