From de70a03c11abd7b1a8ddd4f5f746e00c6e3631eb Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Tue, 2 Apr 2019 16:11:43 +0200 Subject: [PATCH] Cache the Cargo dir and build artifacts --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 777c6be..510793e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,16 @@ # Use Rust docker image, see: https://hub.docker.com/_/rust/ image: rust:latest +# Set the Cargo dir manually so it can be cached +variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + +# Cache the Cargo dir and build artifacts +cache: + paths: + - cargo/ + - target/ + # Add the thumbv7em-none-eabihf target for Rust before_script: - rustup target add thumbv7em-none-eabihf