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 +