Skip to content

Commit d9e8a15

Browse files
committed
Auto merge of #81 - japaric:cache, r=<try>
cache Cargo artifacts notable changes in the docker-based testing infrastructure - the docker containers can now modify $CARGO_HOME, to re-use the outer Cargo registry, and the target directory to re-use build artifacts. - the docker containers are removed when their execution finishes because it's no longer necessary to re-start them to inspect them because all the interesting output is in the outer target directory r? @alexcrichton Let's see if this actually reduces test times ...
2 parents e34a605 + 43e019d commit d9e8a15

File tree

19 files changed

+30
-32
lines changed

19 files changed

+30
-32
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cache: cargo
12
dist: trusty
23
language: rust
34
services: docker
@@ -45,14 +46,16 @@ install:
4546
script:
4647
- cargo generate-lockfile
4748
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
48-
sudo apt-get remove -y qemu-user-static &&
49-
sudo apt-get install -y qemu-user-static &&
5049
sh ci/run-docker.sh $TARGET;
5150
else
5251
cargo test --target $TARGET &&
5352
cargo test --target $TARGET --release;
5453
fi
5554

55+
after_success:
56+
# Travis can't cache files that are not readable by "others"
57+
- chmod -R a+r /home/travis/.cargo
58+
5659
branches:
5760
only:
5861
- auto

ci/docker/aarch64-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ RUN apt-get install -y --no-install-recommends \
55
gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
66
qemu-user-static
77
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
8-
PATH=$PATH:/rust/bin \
98
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
109
RUST_TEST_THREADS=1

ci/docker/arm-unknown-linux-gnueabi/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ RUN apt-get install -y --no-install-recommends \
44
gcc libc6-dev ca-certificates \
55
gcc-arm-linux-gnueabi libc6-dev-armel-cross qemu-user-static
66
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
7-
PATH=$PATH:/rust/bin \
87
QEMU_LD_PREFIX=/usr/arm-linux-gnueabi \
98
RUST_TEST_THREADS=1
109

ci/docker/arm-unknown-linux-gnueabihf/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ RUN apt-get install -y --no-install-recommends \
44
gcc libc6-dev ca-certificates \
55
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
66
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
7-
PATH=$PATH:/rust/bin \
87
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
98
RUST_TEST_THREADS=1

ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ RUN apt-get install -y --no-install-recommends \
44
gcc libc6-dev ca-certificates \
55
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
66
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
7-
PATH=$PATH:/rust/bin \
87
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \
98
RUST_TEST_THREADS=1

ci/docker/i586-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ FROM ubuntu:16.04
22
RUN apt-get update
33
RUN apt-get install -y --no-install-recommends \
44
gcc-multilib libc6-dev ca-certificates
5-
ENV PATH=$PATH:/rust/bin

ci/docker/i686-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ FROM ubuntu:16.04
22
RUN apt-get update
33
RUN apt-get install -y --no-install-recommends \
44
gcc-multilib libc6-dev ca-certificates
5-
ENV PATH=$PATH:/rust/bin

ci/docker/mips-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ RUN apt-get install -y --no-install-recommends \
77
binfmt-support qemu-user-static qemu-system-mips
88

99
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
10-
PATH=$PATH:/rust/bin \
1110
QEMU_LD_PREFIX=/usr/mips-linux-gnu \
1211
RUST_TEST_THREADS=1

ci/docker/mipsel-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ RUN apt-get install -y --no-install-recommends \
77
binfmt-support qemu-user-static
88

99
ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc \
10-
PATH=$PATH:/rust/bin \
1110
QEMU_LD_PREFIX=/usr/mipsel-linux-gnu \
1211
RUST_TEST_THREADS=1

ci/docker/powerpc-unknown-linux-gnu/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ RUN apt-get install -y --no-install-recommends \
77
qemu-system-ppc
88

99
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
10-
PATH=$PATH:/rust/bin \
1110
QEMU_LD_PREFIX=/usr/powerpc-linux-gnu \
1211
RUST_TEST_THREADS=1

0 commit comments

Comments
 (0)