Add GitLab CI

This commit is contained in:
Paul van Tilburg 2019-06-10 10:41:27 +02:00
parent 5e7e4c658e
commit d88f970107
1 changed files with 26 additions and 0 deletions

26
.gitlab-ci.yml Normal file
View File

@ -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