Set CARGO_HOME for CI so deps arent redownloaded (#1497)
* Set CARGO_HOME for CI so deps arent redownloaded * run find on x86 * fix path * cleanup * try again * use mv
This commit is contained in:
parent
db4fe8031c
commit
33a326854a
1 changed files with 12 additions and 0 deletions
12
.drone.yml
12
.drone.yml
|
@ -21,7 +21,13 @@ steps:
|
||||||
|
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
image: ekidd/rust-musl-builder:1.50.0
|
image: ekidd/rust-musl-builder:1.50.0
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/src/.cargo
|
||||||
commands:
|
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 --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
|
- cargo clippy --workspace -- -D clippy::unwrap_used
|
||||||
|
|
||||||
|
@ -30,6 +36,7 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
CARGO_HOME: /drone/src/.cargo
|
||||||
commands:
|
commands:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get -y install --no-install-recommends espeak postgresql-client
|
- sudo apt-get -y install --no-install-recommends espeak postgresql-client
|
||||||
|
@ -37,6 +44,8 @@ steps:
|
||||||
|
|
||||||
- name: cargo build
|
- name: cargo build
|
||||||
image: ekidd/rust-musl-builder:1.50.0
|
image: ekidd/rust-musl-builder:1.50.0
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/src/.cargo
|
||||||
commands:
|
commands:
|
||||||
- cargo build
|
- cargo build
|
||||||
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
|
- mv target/x86_64-unknown-linux-musl/debug/lemmy_server target/lemmy_server
|
||||||
|
@ -107,6 +116,7 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
LEMMY_DATABASE_URL: postgres://lemmy:password@database:5432/lemmy
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
CARGO_HOME: /drone/src/.cargo
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
|
- apt-get -y install --no-install-recommends espeak postgresql-client libssl-dev pkg-config libpq-dev
|
||||||
|
@ -116,6 +126,8 @@ steps:
|
||||||
# Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
|
# Using Debian here because there seems to be no official Alpine-based Rust docker image for ARM.
|
||||||
- name: cargo build
|
- name: cargo build
|
||||||
image: rust:1.50-slim-buster
|
image: rust:1.50-slim-buster
|
||||||
|
environment:
|
||||||
|
CARGO_HOME: /drone/src/.cargo
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
|
- apt-get -y install --no-install-recommends libssl-dev pkg-config libpq-dev
|
||||||
|
|
Loading…
Reference in a new issue