build: use shared target dir

This commit is contained in:
Lzu Tao 2019-10-18 11:10:15 +07:00
parent abafec5640
commit f3ace5e71d
3 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash
set -ex
# for faster build, share target dir between subcrates
CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR
echo "Running clippy base tests"
PATH=$PATH:./node_modules/.bin
@ -10,9 +14,7 @@ fi
# build clippy in debug mode and run tests
cargo build --features "debugging deny-warnings"
cargo test --features "debugging deny-warnings"
# for faster build, share target dir between subcrates
CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR
(cd clippy_lints && cargo test)
(cd rustc_tools_util && cargo test)
(cd clippy_dev && cargo test)

View File

@ -5,6 +5,9 @@ if [[ -z "$INTEGRATION" ]]; then
exit 0
fi
CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR
rm ~/.cargo/bin/cargo-clippy
cargo install --force --debug --path .

View File

@ -1,3 +1,5 @@
#!/bin/sh
CARGO_TARGET_DIR=$(pwd)/target/
export CARGO_TARGET_DIR
cd clippy_dev && cargo run -- $@
cd clippy_dev && cargo run -- "$@"