-
Vasili Novikov authoredVerifieddf76035e
This GitLab CI configuration is valid.
Learn more
#### The image base should be the same as in Dockerfile
#### UPDATE: not used for now
# image: 'rust:slim'
stages:
- test
- docs
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
# WARNING:
# Project currently uses a dirty work-around:
# it installs dependencies/components on GitLab shell runner,
# as opposed to doing it in a reproducible fashion
#
# - apt-get update -yq
# - apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y libsqlcipher-dev buildah
before_script:
- rustup component add rustfmt
- rustup component add clippy
rustfmt:
stage: test
script:
- cargo fmt --all -- --check
test:
stage: test
cache:
paths:
- cargo/
- target/
script:
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test
pages:
stage: docs
cache:
paths:
- cargo/
- target/
script:
- rm -rf target/doc 2>/dev/null || true
- cargo doc --no-deps
- mkdir -p public/rustdoc
- mv -T target/doc public/rustdoc
- echo '<a href="./rustdoc/pod">rustdoc</a>' > public/index.html
artifacts:
paths:
- public
only:
- master