summaryrefslogtreecommitdiff
path: root/ci/run-docker.sh
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-05-28 19:10:23 +0200
committergnzlbg <gonzalobg88@gmail.com>2019-07-27 13:25:22 +0200
commit6ca5bfaea17f5c48843abb46dc22771fbe5fda2d (patch)
tree6079f64dfa00bef2da5db182239a5b85ffe5a8b7 /ci/run-docker.sh
parent7c8e397c0cc463e60345183d77de8b66431d7316 (diff)
downloadrust-libc-6ca5bfaea17f5c48843abb46dc22771fbe5fda2d.tar.gz
Setup Azure Pipelines
Diffstat (limited to 'ci/run-docker.sh')
-rwxr-xr-xci/run-docker.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/ci/run-docker.sh b/ci/run-docker.sh
index c656f5904d..5fd0061446 100755
--- a/ci/run-docker.sh
+++ b/ci/run-docker.sh
@@ -5,6 +5,9 @@
set -ex
+echo "${HOME}"
+pwd
+
run() {
echo "Building docker container for target ${1}"
@@ -18,19 +21,19 @@ run() {
fi
docker run \
- --user "$(id -u)":"$(id -g)" \
--rm \
- --init \
- --volume "${HOME}/.cargo":/cargo \
- $kvm \
+ --user "$(id -u)":"$(id -g)" \
--env CARGO_HOME=/cargo \
+ --env CARGO_TARGET_DIR=/checkout/target \
+ --volume "$(dirname "$(dirname "$(command -v cargo)")")":/cargo \
--volume "$(rustc --print sysroot)":/rust:ro \
--volume "$(pwd)":/checkout:ro \
--volume "$(pwd)"/target:/checkout/target \
- --env CARGO_TARGET_DIR=/checkout/target \
+ $kvm \
+ --init \
--workdir /checkout \
libc \
- ci/run.sh "${1}"
+ sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/run.sh ${1}"
}
if [ -z "${1}" ]; then