image: "rustlang/rust:nightly"
stages:
- verify
- build
- publish
verify:cargo:
stage: verify
cache:
key: "cache-test"
paths:
- ./target
script:
- rustc --version && cargo --version
- rustup component add rustfmt
- rustup component add clippy-preview
- cargo fmt --verbose
- cargo clippy --verbose
- cargo test --all --verbose
build:cargo:
stage: build
cache:
key: "cache-release"
paths:
- ./target
script:
- cargo build --release --verbose
artifacts:
paths:
- target/release/$CI_PROJECT_NAME
expire_in: 1 week
build:doc:
stage: build
script:
- cargo doc --no-deps --verbose
artifacts:
paths:
- target/doc
expire_in: 1 week