Save/restore target/ directory between builds
This commit is contained in:
parent
0b878eccf8
commit
fba494343f
|
@ -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
|
||||||
|
)
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || exit 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# Restore target/ from the previous CI build on this machine
|
||||||
|
#
|
||||||
|
(
|
||||||
|
d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME"
|
||||||
|
mkdir -p $d/target
|
||||||
|
set -x
|
||||||
|
rsync -a --delete $d/target .
|
||||||
|
)
|
|
@ -1,15 +1,21 @@
|
||||||
steps:
|
steps:
|
||||||
- command: "ci/docker-run.sh rust ci/test-stable.sh"
|
- command: "ci/docker-run.sh rust ci/test-stable.sh"
|
||||||
name: "stable [public]"
|
name: "stable [public]"
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_CACHE_NAME: "stable"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
- command: "ci/shellcheck.sh"
|
- command: "ci/shellcheck.sh"
|
||||||
name: "shellcheck [public]"
|
name: "shellcheck [public]"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh"
|
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh"
|
||||||
name: "nightly [public]"
|
name: "nightly [public]"
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||||
timeout_in_minutes: 30
|
timeout_in_minutes: 30
|
||||||
- command: "ci/test-stable-perf.sh"
|
- command: "ci/test-stable-perf.sh"
|
||||||
name: "stable-perf [public]"
|
name: "stable-perf [public]"
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_CACHE_NAME: "stable-perf"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
retry:
|
retry:
|
||||||
automatic:
|
automatic:
|
||||||
|
|
Loading…
Reference in New Issue