diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..cbfbc8d1e29d04e178263d4318f2fa4915b0e503 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +stages: + - lint + - build + - test + +variables: + CARGO_HOME: $CI_PROJECT_DIR/cargo + RUST_BACKTRACE: FULL + # Faster caching :) + FF_USE_FASTZIP: "true" + CACHE_COMPRESSION_LEVEL: "fastest" + +# Linting +cargo-fmt: + stage: lint + image: rust:latest + script: + - rustup component add rustfmt + - cargo fmt -- --check + +clippy: + stage: lint + image: rust:latest + script: + - rustup component add clippy + - cargo clippy -- -D warnings # Turn all warnings into errors + +# Building +rust-stable: + stage: build + image: rust:stable + script: + - rustc --version && cargo --version + - cargo build --verbose + +# Testing +test: + stage: test + image: rust:stable + script: + - rustc --version && cargo --version + - cargo test --verbose