gitlabci: Cache cargo for the clippy job.

This commit is contained in:
Jordan Petridis
2018-05-16 20:59:54 +03:00
parent 41073615e9
commit 79239a2e01
+13 -10
View File
@@ -6,6 +6,16 @@ stages:
variables:
BUNDLE: "hammond-dev.flatpak"
.cargo_cache_template: &cargo_cache
cache:
# JOB_NAME - Each job will have it's own cache
# COMMIT_REF_SLUG = Lowercase name of the branch
# ^ Keep diffrerent caches for each branch
key: "$CI_JOB_NAME"
paths:
- target/
- .cargo_cache/
.cargo_test_template: &cargo_test
stage: test
@@ -29,15 +39,7 @@ variables:
- cargo build
- cargo test -- --test-threads=1
- cargo test -- --test-threads=1 --ignored
cache:
# JOB_NAME - Each job will have it's own cache
# COMMIT_REF_SLUG = Lowercase name of the branch
# ^ Keep diffrerent caches for each branch
key: "$CI_JOB_NAME"
paths:
- target/
- .cargo_cache/
<<: *cargo_cache
.rust:stable:
# https://hub.docker.com/_/rust/
@@ -137,4 +139,5 @@ clippy:
- cargo clippy --version
# Force regeneration of gresources regardless of artifacts chage
- cd hammond-gtk/resources/ && glib-compile-resources --generate resources.xml && cd ../../
- cargo clippy --all
- cargo clippy --all
<<: *cargo_cache