From 71bb49fcecd1591cb57fa70dba44e20452686861 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sat, 29 Feb 2020 22:56:14 +0100 Subject: [PATCH] Try setup CI a bit more --- .gitlab-ci.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8475643..129c274 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,34 @@ # https://hub.docker.com/r/library/rust/tags/ image: "rust:latest" +stages: + - test + - build -# Use cargo to test the project -test:cargo: + # Use cargo to test the project +test: + stage: test script: - - rustc --version && cargo --version # Print version info for debugging - cargo test --all --verbose cache: + key: cargo_cache paths: - target/ + +build: + stage: build + only: + - master + - tags + script: + - cargo build --release + cache: + key: cargo_cache + paths: + - target/ + artifacts: + expire_in: 30 days + paths: + - target/release/summer + - target/release/summer.* +