Save/restore target/ directory between builds

This commit is contained in:
Michael Vines
2018-06-30 21:51:15 -07:00
committed by Grimes
parent 0b878eccf8
commit fba494343f
3 changed files with 33 additions and 0 deletions

14
.buildkite/hooks/post-command Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || exit 0
#
# Save target/ for the next CI build on this machine
#
(
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
mkdir -p $d
set -x
rsync -a --delete target $d
du -hs $d
)