From d88f970107722d5278ed92df700694f2832cfb4b Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Mon, 10 Jun 2019 10:41:27 +0200 Subject: [PATCH] Add GitLab CI --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..692d082 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +# Use Rust nightly docker image, see: https://hub.docker.com/r/rustlang/rust/ +image: rustlang/rust:nightly + +# 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/ + +# Defines stages which are to be executed +stages: + - build + +# Run `cargo build` for the project with nightly Rust +run-build: + stage: build + image: rustlang/rust:nightly + script: + - rustc --version && cargo --version + - cargo build --release --jobs 1 + - cargo test -- --test-threads 1 +