2 # Copyright 2016 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.
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.
14 script=`cd $(dirname $0) && pwd`/`basename $0`
17 docker_dir="`dirname $script`"
18 ci_dir="`dirname $docker_dir`"
19 src_dir="`dirname $ci_dir`"
20 root_dir="`dirname $src_dir`"
22 source "$ci_dir/shared.sh"
24 if [ -f "$docker_dir/$image/Dockerfile" ]; then
29 -f "$docker_dir/$image/Dockerfile" \
31 elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
32 if [ -n "$TRAVIS_OS_NAME" ]; then
33 echo Cannot run disabled images on travis!
40 -f "$docker_dir/disabled/$image/Dockerfile" \
43 echo Invalid image: $image
53 if [ "$SCCACHE_BUCKET" != "" ]; then
54 args="$args --env SCCACHE_BUCKET=$SCCACHE_BUCKET"
55 args="$args --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID"
56 args="$args --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
57 args="$args --env SCCACHE_ERROR_LOG=/tmp/sccache/sccache.log"
58 args="$args --volume $objdir/tmp:/tmp/sccache"
60 mkdir -p $HOME/.cache/sccache
61 args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
66 --volume "$root_dir:/checkout:ro" \
67 --volume "$objdir:/checkout/obj" \
68 --workdir /checkout/obj \
71 --env CARGO_HOME=/cargo \
72 --env DEPLOY=$DEPLOY \
73 --env DEPLOY_ALT=$DEPLOY_ALT \
74 --env LOCAL_USER_ID=`id -u` \
75 --volume "$HOME/.cargo:/cargo" \
76 --volume "$HOME/rustsrc:$HOME/rustsrc" \
80 /checkout/src/ci/run.sh