.cargo_lint_template: &cargo_lint
stage: lint
script:
- cargo clippy
.cargo_test_template: &cargo_test
stage: test
script:
- cargo test --all --verbose
.cargo_test_nightly: &cargo_test_nightly
stage: test
script:
- cargo test --all --verbose
- cargo bench --features nightly_features
stages:
- lint
- test
- deploy
.stable:cargo:
image: rustdocker/rust:stable
<<: *cargo_test
.beta:cargo:
image: rustdocker/rust:beta
<<: *cargo_test
nightly:cargo:
image: rustdocker/rust:nightly
<<: *cargo_test_nightly
clippy:cargo:
image: rustdocker/rustfmt_clippy:nightly
<<: *cargo_lint
.pages:
image: rustdocker/rust:stable
stage: deploy
only:
- master
script:
- cargo doc
- rm -rf public
- mkdir public
- cp -R target/doc/* public
artifacts:
paths:
- public