Skip to content

Instantly share code, notes, and snippets.

@zargony
Last active December 16, 2020 16:47
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zargony/de209b1a790c3cb2176c86405a51b33c to your computer and use it in GitHub Desktop.
Save zargony/de209b1a790c3cb2176c86405a51b33c to your computer and use it in GitHub Desktop.
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