Last active
December 16, 2020 16:47
-
-
Save zargony/de209b1a790c3cb2176c86405a51b33c to your computer and use it in GitHub Desktop.
CircleCI 2.0 configuration for Rust library crate project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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