From c2a3ce5096d1467318e8546c98d208b8cc18b3bd Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 19 Mar 2018 07:43:04 +0200 Subject: [PATCH] Why the hell you do not cache cargo. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43f98d6..1f1f70c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ stages: - test - lint - .cargo_test_template: &cargo_test stage: test @@ -17,7 +16,7 @@ stages: - mkdir -p .cargo_cache # Only stuff inside the repo directory can be cached # Override the CARGO_HOME variable to force it location - - export CARGO_HOME=".cargo_cache" + - export CARGO_HOME="${PWD}/.cargo_cache" script: - rustc -Vv && cargo -Vv # Force regeneration of gresources regardless of artifacts chage @@ -26,14 +25,15 @@ stages: - 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/ + - target/ + - .cargo_cache/ stable:test: # https://hub.docker.com/_/rust/