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"
28 "`dirname "$script"`/$image"
36 if [ "$SCCACHE_BUCKET" != "" ]; then
37 args="$args --env SCCACHE_BUCKET=$SCCACHE_BUCKET"
38 args="$args --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID"
39 args="$args --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
40 args="$args --env SCCACHE_ERROR_LOG=/tmp/sccache/sccache.log"
41 args="$args --volume $objdir/tmp:/tmp/sccache"
43 mkdir -p $HOME/.cache/sccache
44 args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
49 --volume "$root_dir:/checkout:ro" \
50 --volume "$objdir:/checkout/obj" \
51 --workdir /checkout/obj \
54 --env CARGO_HOME=/cargo \
55 --env DEPLOY=$DEPLOY \
56 --env DEPLOY_ALT=$DEPLOY_ALT \
57 --env LOCAL_USER_ID=`id -u` \
58 --volume "$HOME/.cargo:/cargo" \
59 --volume "$HOME/rustsrc:$HOME/rustsrc" \
63 /checkout/src/ci/run.sh