-
Vasili Novikov authoredVerified53c532b4
This GitLab CI configuration is valid.
Learn more
image: 'rust:latest'
stages:
- test
- docs
- build
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
before_script:
- apt-get update -yq
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y openssl
test:
stage: test
script:
- rustc --version
- cargo --version
- cargo test --verbose
pages:
stage: docs
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> <br /><a href="./openapi-html/">OpenAPI (html)</a> <br /><a href="./openapi-html2/">OpenAPI (html2)</a>' > public/index.html
artifacts:
paths:
- public
only:
- master
cache:
paths:
- apt/
- cargo/
- target/