From e0031edb5ea41dd188da7f781509e450da12f21d Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sat, 4 Dec 2021 14:25:46 +0100 Subject: [PATCH 1/3] Add cargo caching --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 1c679d7..798255c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,6 +5,8 @@ name: default steps: - name: test image: rust:1.56 + environment: + - CARGO_HOME: ./.cargo_home commands: - cargo build --verbose --all - cargo test --verbose --all -- 2.44.1 From 1418f18cab5f2164672630244a6985a578b1bcb0 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sat, 4 Dec 2021 14:26:30 +0100 Subject: [PATCH 2/3] Fix ci config --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 798255c..fbad27b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: test image: rust:1.56 environment: - - CARGO_HOME: ./.cargo_home + CARGO_HOME: ./.cargo_home commands: - cargo build --verbose --all - cargo test --verbose --all -- 2.44.1 From eddcca849cd292f75477ebff1b46947d8b6782d5 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sat, 4 Dec 2021 14:34:05 +0100 Subject: [PATCH 3/3] Add drone caching --- .drone.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fbad27b..76f6df6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,10 +3,48 @@ type: kubernetes name: default steps: + - name: restore + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + restore: true + - name: test image: rust:1.56 environment: - CARGO_HOME: ./.cargo_home + CARGO_HOME: .cargo_home commands: - cargo build --verbose --all - cargo test --verbose --all + + - name: rebuild + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + rebuild: true + mount: + - .cargo_home + when: + event: push + + - name: flush + image: plugins/s3-cache + settings: + pull: true + endpoint: https://s3.voidcorp.nl + access_key: + from_secret: s3accesskey + secret_key: + from_secret: s3secretkey + flush: true + flush_age: 14 -- 2.44.1