CircleCI 2.0 configuration for Rust library crate project
version: 2 | |
jobs: | |
test: | |
docker: | |
- image: rust:1 | |
steps: | |
- checkout | |
- run: | |
name: Version information | |
command: rustc --version; cargo --version; rustup --version | |
- run: | |
name: Calculate dependencies | |
command: cargo generate-lockfile | |
- restore_cache: | |
keys: | |
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | |
- run: | |
name: Build all targets | |
command: cargo build --all --all-targets | |
- save_cache: | |
paths: | |
- /usr/local/cargo/registry | |
- target/debug/.fingerprint | |
- target/debug/build | |
- target/debug/deps | |
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | |
- run: | |
name: Run all tests | |
command: cargo test --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment