Skip to content
Snippets Groups Projects
Unverified Commit 783ddd8e authored by Yuki Okushi's avatar Yuki Okushi Committed by GitHub
Browse files

Merge pull request #1706 from cpu/cpu-run-docker-sh-custom-cargohome

ci: allow overriding run-docker.sh CARGO_HOME.
parents d2963c22 20cd6255
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,13 @@
set -ex
# Default to assuming the CARGO_HOME is one directory up (to account for a `bin`
# subdir) from where the `cargo` binary in `$PATH` lives.
DEFAULT_CARGO_HOME="$(dirname "$(dirname "$(command -v cargo)")")"
# If the CARGO_HOME env var is already set, use that. If it isn't set use the
# default.
CARGO_HOME="${CARGO_HOME:-$DEFAULT_CARGO_HOME}"
echo "${HOME}"
pwd
......@@ -26,7 +33,7 @@ run() {
--env LIBC_CI \
--env CARGO_HOME=/cargo \
--env CARGO_TARGET_DIR=/checkout/target \
--volume "$(dirname "$(dirname "$(command -v cargo)")")":/cargo \
--volume "$CARGO_HOME":/cargo \
--volume "$(rustc --print sysroot)":/rust:ro \
--volume "$(pwd)":/checkout:ro \
--volume "$(pwd)"/target:/checkout/target \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment