Skip to content

Commit f3ace5e

Browse files
committed
build: use shared target dir
1 parent abafec5 commit f3ace5e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

ci/base-tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -ex
33

4+
# for faster build, share target dir between subcrates
5+
CARGO_TARGET_DIR=$(pwd)/target/
6+
export CARGO_TARGET_DIR
7+
48
echo "Running clippy base tests"
59

610
PATH=$PATH:./node_modules/.bin
@@ -10,9 +14,7 @@ fi
1014
# build clippy in debug mode and run tests
1115
cargo build --features "debugging deny-warnings"
1216
cargo test --features "debugging deny-warnings"
13-
# for faster build, share target dir between subcrates
14-
CARGO_TARGET_DIR=$(pwd)/target/
15-
export CARGO_TARGET_DIR
17+
1618
(cd clippy_lints && cargo test)
1719
(cd rustc_tools_util && cargo test)
1820
(cd clippy_dev && cargo test)

ci/integration-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if [[ -z "$INTEGRATION" ]]; then
55
exit 0
66
fi
77

8+
CARGO_TARGET_DIR=$(pwd)/target/
9+
export CARGO_TARGET_DIR
10+
811
rm ~/.cargo/bin/cargo-clippy
912
cargo install --force --debug --path .
1013

util/dev

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/sh
2+
CARGO_TARGET_DIR=$(pwd)/target/
3+
export CARGO_TARGET_DIR
24

3-
cd clippy_dev && cargo run -- $@
5+
cd clippy_dev && cargo run -- "$@"

0 commit comments

Comments
 (0)