image: "rust:latest"
stages:
- analysis
- test
- docs
format:
image: "rustlang/rust:nightly-slim"
stage: analysis
script:
- rustup component add rustfmt
- cargo fmt --version
- cargo fmt -- --check
only:
- tags
- master
- merge_requests
clippy:
stage: analysis
script:
- rustup component add clippy
- cargo clippy --version
- cargo clippy --all-targets --all-features
only:
- tags
- master
- merge_requests
minimum-rust-version:
image: "rust:1.32-slim"
stage: test
script:
- rustc --version
- cargo --version
- cargo test --all --all-features --verbose
only:
- tags
- master
- merge_requests
stable:
stage: test
script:
- rustc --version
- cargo --version
- cargo test --all --all-features --verbose
only:
- tags
- master
- merge_requests
nightly:
image: "rustlang/rust:nightly-slim"
stage: test
script:
- rustc --version
- cargo --version
- cargo test --all --all-features --verbose
allow_failure: true
only:
- tags
- master
- merge_requests
examples:
stage: docs
script:
- cargo build --examples
only:
- tags
- master
- merge_requests
pages:
stage: docs
script:
- cargo doc --no-deps
- mv target/doc public
- echo '<meta http-equiv="refresh" content="0; url=easy_error">' > public/index.html
artifacts:
paths:
- public
only:
- master
cache:
paths:
- target/