From 780f4fffe378d316e5f5d2db22e3572237fef838 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Tue, 18 Aug 2020 12:02:10 -0600 Subject: [PATCH] Add caching for build target directory --- .drone.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8b8effe..8899614 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 \ No newline at end of file + path: /var/lib/drone/sprinklers_rs/cargo-registry +- name: target-cache + host: + path: /var/lib/drone/sprinklers_rs/target-cache \ No newline at end of file