Skip to content

Commit

Permalink
Set CARGO_HOME for CI so deps arent redownloaded (#1497)
Browse files Browse the repository at this point in the history
* Set CARGO_HOME for CI so deps arent redownloaded

* run find on x86

* fix path

* cleanup

* try again

* use mv
  • Loading branch information
Nutomic committed Mar 18, 2021
1 parent db4fe80 commit 33a3268
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ steps:

- name: cargo clippy
image: ekidd/rust-musl-builder:1.50.0
environment:
CARGO_HOME: /drone/src/.cargo
commands:
- whoami
- ls -la ~/.cargo
- mv ~/.cargo .
- ls -la .cargo
- cargo clippy --workspace --tests --all-targets --all-features -- -D warnings -D deprecated -D clippy::perf -D clippy::complexity -D clippy::dbg_macro
- cargo clippy --workspace -- -D clippy::unwrap_used

Expand All @@ -30,13 +36,16 @@ steps:
environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
RUST_BACKTRACE: 1
CARGO_HOME: /drone/src/.cargo
commands:
- sudo apt-get update
- sudo apt-get -y install --no-install-recommends espeak postgresql-client
- cargo test --workspace --no-fail-fast

- name: cargo build
image: ekidd/rust-musl-builder:1.50.0
environment:
CARGO_HOME: /drone/src/.cargo
commands:
- cargo build
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
Expand Down Expand Up @@ -107,6 +116,7 @@ steps:
environment:
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
RUST_BACKTRACE: 1
CARGO_HOME: /drone/src/.cargo
commands:
- apt-get update
- apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
Expand All @@ -116,6 +126,8 @@ steps:
# Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
- name: cargo build
image: rust:1.50-slim-buster
environment:
CARGO_HOME: /drone/src/.cargo
commands:
- apt-get update
- apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
Expand Down

0 comments on commit 33a3268

Please sign in to comment.