Skip to content

Commit

Permalink
[Circle CI] Ensure that dependencies are sorted as a lint check.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind authored and aptos-bot committed May 10, 2022
1 parent dae89e8 commit db9637c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
- run: cargo x lint
- run: cargo xclippy --workspace --all-targets
- run: cargo xfmt --check
# TODO(joshlind): turn this on for all workspace dependencies! We only do one now as a proof of concept.
- run: cargo sort --grouped --check state-sync/aptos-data-client/
e2e-test:
executor: ubuntu-2xl
steps:
Expand Down Expand Up @@ -344,6 +346,7 @@ commands:
- run: sudo apt-get install build-essential ca-certificates clang curl git libpq-dev libssl-dev pkg-config --no-install-recommends --assume-yes
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
- run: cat $HOME/.cargo/env >> $BASH_ENV
- run: cargo install cargo-sort
deploy-setup:
steps:
- kubernetes/install-kubectl:
Expand Down
7 changes: 7 additions & 0 deletions scripts/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@ function install_cargo_guppy {
fi
}

function install_cargo_sort {
if ! command -v cargo-sort &> /dev/null; then
cargo install cargo-sort
fi
}

function install_grcov {
if ! command -v grcov &> /dev/null; then
cargo install grcov --version="${GRCOV_VERSION}" --locked
Expand Down Expand Up @@ -865,6 +871,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then
rustup component add clippy

install_cargo_guppy
install_cargo_sort
install_sccache
install_grcov
install_postgres
Expand Down
6 changes: 3 additions & 3 deletions state-sync/aptos-data-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ aptos-types = { path = "../../types" }
aptos-workspace-hack = { path = "../../crates/aptos-workspace-hack" }
network = { path = "../../network" }
storage-service-client = { path = "../storage-service/client" }
storage-service-types = { path = "../storage-service/types" }
storage-service-server = { path = "../storage-service/server" }
storage-service-types = { path = "../storage-service/types" }

[dev-dependencies]
bcs = "0.1.3"
claim = "0.5.0"
maplit = "1.0.2"
tokio = { version = "1.8.1", features = ["rt", "macros"], default-features = false }

bcs = "0.1.3"
channel = { path = "../../crates/channel" }
aptos-time-service = { path = "../../crates/aptos-time-service", features = ["async", "testing"] }
channel = { path = "../../crates/channel" }
network = { path = "../../network", features = ["fuzzing"] }

0 comments on commit db9637c

Please sign in to comment.