Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
Switch to using cargo-metadata
Browse files Browse the repository at this point in the history
This both makes the crate compile way faster and avoids having to touch
tons of unstable, undocumented cargo internals. This requires Rust 1.41
(the current beta) for some cargo-metadata features.

There are some subtle differences in the new output (particularly in
handling dependencies between crates in workspaces), but they're pretty
minor.

Closes #73
Closes #69
Closes #66
Closes #65
Closes #63
Closes #61
Closes #57
Closes #20
  • Loading branch information
sfackler committed Dec 30, 2019
1 parent de50a9d commit 9dc0346
Show file tree
Hide file tree
Showing 9 changed files with 717 additions and 1,704 deletions.
46 changes: 15 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
deps_key: &DEPS_KEY
key: dependencies-1.40-{{ checksum "Cargo.lock" }}

restore_registry: &RESTORE_REGISTRY
restore_cache:
key: registry

save_registry: &SAVE_REGISTRY
save_cache:
key: registry-{{ .BuildNum }}
paths:
- ~/.cargo/registry/index

restore_deps: &RESTORE_DEPS
restore_cache:
<<: *DEPS_KEY

save_deps: &SAVE_DEPS
save_cache:
<<: *DEPS_KEY
paths:
- target
- ~/.cargo/registry/cache

version: 2
jobs:
build:
docker:
- image: rust:1.40.0
- image: rustlang/rust:nightly
steps:
- checkout
- run: apt-get update
- run: apt-get install -y --no-install-recommends cmake zlib1g-dev
- <<: *RESTORE_REGISTRY
- <<: *RESTORE_DEPS
- run: rustc --version > ~/rust-version
- restore_cache:
key: registry
- restore_cache:
key: dependencies-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }}
- run: cargo build --locked
- run: cargo run --locked -- tree
- <<: *SAVE_REGISTRY
- <<: *SAVE_DEPS
- save_cache:
key: registry-{{ .BuildNum }}
paths:
- /usr/local/cargo/registry/index
- save_cache:
key: dependencies-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }}
paths:
- target
- /usr/local/cargo/registry/cache
Loading

0 comments on commit 9dc0346

Please sign in to comment.