From 6d6897a86e14b85c5d63e68ddb9312f127e18651 Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 28 Apr 2021 23:56:05 +1000 Subject: [PATCH 1/2] use separate caches for stable/msrv/nightly jobs --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55a5d2c..e920588 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,10 +62,14 @@ build-stable: build-msrv: extends: build-stable image: "rust:1.43.0" + cache: + key: msrv build-nightly: extends: build-stable image: "rustlang/rust:nightly" + cache: + key: nightly # TEST @@ -77,11 +81,15 @@ test-msrv: extends: test-stable image: "rust:1.43.0" needs: ["build-msrv"] + cache: + key: msrv test-nightly: extends: test-stable image: "rustlang/rust:nightly" needs: ["build-nightly"] + cache: + key: nightly # VERSION From 80f14085cf42c15bcb513ff69c325e22350da6b8 Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 29 Apr 2021 00:27:43 +1000 Subject: [PATCH 2/2] properly use separate caches for stable/msrv/nightly jobs --- .gitlab-ci.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e920588..40b56ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,8 +16,8 @@ default: stages: - lint - build - - test - version + - test # TEMPLATE .cargo-build: @@ -64,12 +64,26 @@ build-msrv: image: "rust:1.43.0" cache: key: msrv + paths: + - target + - .cargo build-nightly: extends: build-stable image: "rustlang/rust:nightly" cache: key: nightly + paths: + - target + - .cargo + +# VERSION + +fif-version: + stage: version + needs: ["build-stable"] + script: + cargo run -- -V # TEST @@ -83,6 +97,9 @@ test-msrv: needs: ["build-msrv"] cache: key: msrv + paths: + - target + - .cargo test-nightly: extends: test-stable @@ -90,11 +107,6 @@ test-nightly: needs: ["build-nightly"] cache: key: nightly - -# VERSION - -fif-version: - stage: version - needs: ["build-stable"] - script: - cargo run -- -V \ No newline at end of file + paths: + - target + - .cargo