about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-12-30 09:26:25 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-12-30 09:36:23 -0800
commit4781eb315b7bcf11682d68aafac2ce4739bfe166 (patch)
treef8d07d19fb07c907686eebcc645d878476ce3386 /src/ci
parentd0881eaec7d1300566607bb465acf614ce073b75 (diff)
downloadrust-4781eb315b7bcf11682d68aafac2ce4739bfe166.tar.gz
rust-4781eb315b7bcf11682d68aafac2ce4739bfe166.zip
travis: Add a distcheck target
This commit adds a new entry to the Travis matrix which performs a "distcheck",
which basically means that we create a tarball, extract that tarball, and then
build/test inside there. This ensures that the tarballs we produce are actually
able to be built/tested!

Along the way this also updates the rustbuild distcheck definition to propagate
the configure args from the top-level invocation.

Closes #38691
Diffstat (limited to 'src/ci')
-rw-r--r--src/ci/docker/x86_64-gnu-distcheck/Dockerfile26
-rwxr-xr-xsrc/ci/run.sh14
2 files changed, 35 insertions, 5 deletions
diff --git a/src/ci/docker/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/x86_64-gnu-distcheck/Dockerfile
new file mode 100644
index 00000000000..880c70866b0
--- /dev/null
+++ b/src/ci/docker/x86_64-gnu-distcheck/Dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  g++ \
+  make \
+  file \
+  curl \
+  ca-certificates \
+  python2.7 \
+  git \
+  cmake \
+  sudo \
+  gdb \
+  xz-utils
+
+ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
+RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
+      tar xJf - -C /usr/local/bin --strip-components=1
+
+RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
+    dpkg -i dumb-init_*.deb && \
+    rm dumb-init_*.deb
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
+
+ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
+ENV XPY_RUN test distcheck
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 152694346aa..3dc3cf91501 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -43,10 +43,14 @@ else
     ncpus=$(nproc)
 fi
 
-make -j $ncpus tidy
-make -j $ncpus
-if [ ! -z "$XPY_CHECK" ]; then
-  exec python2.7 $SRC/x.py $XPY_CHECK
+if [ ! -z "$XPY_RUN" ]; then
+  exec python2.7 $SRC/x.py $XPY_RUN
 else
-  exec make $RUST_CHECK_TARGET -j $ncpus
+  make -j $ncpus tidy
+  make -j $ncpus
+  if [ ! -z "$XPY_CHECK" ]; then
+    exec python2.7 $SRC/x.py $XPY_CHECK
+  else
+    exec make $RUST_CHECK_TARGET -j $ncpus
+  fi
 fi