Remove CARGO_TARGET_CACHE_NAME, use BUILDKITE_LABEL

This commit is contained in:
Michael Vines
2018-12-16 21:58:09 -08:00
parent cc111941bb
commit 9a5195e79e
3 changed files with 11 additions and 24 deletions

View File

@@ -3,15 +3,14 @@
#
# Save target/ for the next CI build on this machine
#
if [[ -n $CARGO_TARGET_CACHE_NAME ]]; then
(
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
mkdir -p "$d"
set -x
rsync -a --delete --link-dest="$PWD" target "$d"
du -hs "$d"
)
fi
(
set -x
d=$HOME/cargo-target-cache/"$BUILDKITE_LABEL"
mkdir -p "$d"
set -x
rsync -a --delete --link-dest="$PWD" target "$d"
du -hs "$d"
)
#
# Add job_stats data point

View File

@@ -11,8 +11,9 @@ export PS4="++"
#
# Restore target/ from the previous CI build on this machine
#
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || (
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
(
set -x
d=$HOME/cargo-target-cache/"$BUILDKITE_LABEL"
if [[ -d $d ]]; then
du -hs "$d"
@@ -24,6 +25,5 @@ export PS4="++"
fi
mkdir -p "$d"/target
set -x
rsync -a --delete --link-dest="$d" "$d"/target .
)