gitlabci: Cache cargo for the clippy job.

This commit is contained in:
Jordan Petridis 2018-05-16 20:56:35 +03:00
parent 41073615e9
commit 79239a2e01
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

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