Add caching for build target directory
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Alex Mikhalev 2020-08-18 12:02:10 -06:00
parent 168be29263
commit 780f4fffe3

View File

@ -3,6 +3,16 @@ type: docker
name: default
steps:
- name: restore-target-cache
image: drillster/drone-volume-cache
volumes:
- name: target-cache
path: /cache
settings:
restore: true
mount:
- ./target
- name: test
image: rust:1
volumes:
@ -12,7 +22,20 @@ steps:
- cargo build --verbose --all
- cargo test --verbose --all
- name: rebuild-target-cache
image: drillster/drone-volume-cache
volumes:
- name: target-cache
path: /cache
settings:
rebuild: true
mount:
- ./target
volumes:
- name: cargo-registry
host:
path: /var/lib/drone/sprinklers_rs/cargo-registry
path: /var/lib/drone/sprinklers_rs/cargo-registry
- name: target-cache
host:
path: /var/lib/drone/sprinklers_rs/target-cache