stages:
- build
nightly:
image: "rustlang/rust:nightly"
stage: build
variables:
CARGO_HOME: "cargohome"
cache:
paths:
- target
- cargohome
key: build_nightly_cache
before_script:
- mkdir -p $CARGO_HOME && echo "using $CARGO_HOME to cache cargo deps"
script:
- env RUST_BACKTRACE=1 cargo test --all-features
only:
changes:
- .gitlab-ci.yml
- Cargo.toml
- src/**/*
- tests/**/*
- benches/**/*
- examples/**/*
allow_failure: true
compatibility_1_70:
image: "rust:1.70.0"
stage: build
variables:
CARGO_HOME: "cargohome"
cache:
paths:
- target
- cargohome
key: build_70_cache
before_script:
- mkdir -p $CARGO_HOME && echo "using $CARGO_HOME to cache cargo deps"
script:
- rustc --version && cargo --version - cargo test --all-features
only:
changes:
- .gitlab-ci.yml
- Cargo.toml
- src/**/*
- tests/**/*
- benches/**/*
- examples/**/*
build:
image: "rust:latest"
stage: build
variables:
CARGO_HOME: "cargohome"
cache:
paths:
- target
- cargohome
key: build_cache
before_script:
- mkdir -p $CARGO_HOME && echo "using $CARGO_HOME to cache cargo deps"
- cargo install cargo-tarpaulin
script:
- rustc --version && cargo --version - cargo tarpaulin --all-features --out lcov
- bash <(curl -s https://codecov.io/bash) -Z
only:
changes:
- Cargo.toml
- .gitlab-ci.yml
- src/**/*
- tests/**/*
- benches/**/*
- examples/**/*