Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set cargo home in ci to avoid redownloading deps between steps #2587

Merged
merged 3 commits into from
Nov 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ steps:
# when adding new clippy lints, make sure to also add them in scripts/fix-clippy.sh
- name: cargo clippy
image: rust:1.65-buster
environment:
CARGO_HOME: .cargo
commands:
- apt-get update
- apt-get -y install protobuf-compiler libprotobuf-dev
- rustup component add clippy
- cargo clippy --workspace --tests --all-targets --all-features --
-D warnings -D deprecated -D clippy::perf -D clippy::complexity
Expand All @@ -47,19 +47,24 @@ steps:
LEMMY_CONFIG_LOCATION: ../../config/config.hjson
RUST_BACKTRACE: 1
RUST_TEST_THREADS: 1
CARGO_HOME: .cargo
commands:
- apt-get update
- apt-get -y install --no-install-recommends postgresql-client protobuf-compiler libprotobuf-dev
- cargo test --workspace --no-fail-fast --all-features

- name: check defaults.hjson updated
image: clux/muslrust:1.64.0
environment:
CARGO_HOME: .cargo
commands:
- ./scripts/update_config_defaults.sh config/defaults_current.hjson
- diff config/defaults.hjson config/defaults_current.hjson

- name: check with different features
image: clux/muslrust:1.64.0
environment:
CARGO_HOME: .cargo
commands:
- cargo install cargo-workspaces
- cargo workspaces exec cargo check --no-default-features
Expand All @@ -72,6 +77,8 @@ steps:

- name: cargo build
image: clux/muslrust:1.64.0
environment:
CARGO_HOME: .cargo
commands:
- cargo build
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
Expand Down