From 5bad1e7624fdf893d79af2553ff2b4ff09e96767 Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Thu, 27 Oct 2022 12:19:28 +0200 Subject: [PATCH] ci: Cache the cargo-deny binary --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5377f39..a4a876a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,11 +49,17 @@ cargo-deny: stage: lint image: rust:latest before_script: - - cargo install --locked cargo-deny + # The cargo deny binary is cached, so installing it errors if it was + # restored from cache. Ignore that error. + # Clear the cache to force a rebuild. + - cargo install --locked cargo-deny || true - *report-rust script: - cargo deny check - cache: [ ] + cache: + paths: + - cargo/bin/cargo-deny + key: "deny" cargo-clippy: stage: lint