diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-10-18 11:10:15 +0700 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-10-22 16:16:01 +0700 |
| commit | f3ace5e71d9e1c9b41c6fe4da6b39af241829f59 (patch) | |
| tree | 36ba9a9bf3d1c6a2ddce30e5773e6dde10dfa472 | |
| parent | abafec5640082f8a9792d2b591631a52004c0643 (diff) | |
| download | rust-f3ace5e71d9e1c9b41c6fe4da6b39af241829f59.tar.gz rust-f3ace5e71d9e1c9b41c6fe4da6b39af241829f59.zip | |
build: use shared target dir
| -rwxr-xr-x | ci/base-tests.sh | 8 | ||||
| -rwxr-xr-x | ci/integration-tests.sh | 3 | ||||
| -rwxr-xr-x | util/dev | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 3fe0f174535..df53b6b5044 100755 --- a/ci/base-tests.sh +++ b/ci/base-tests.sh @@ -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) diff --git a/ci/integration-tests.sh b/ci/integration-tests.sh index 6ba9a284c50..651710b83ec 100755 --- a/ci/integration-tests.sh +++ b/ci/integration-tests.sh @@ -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 . diff --git a/util/dev b/util/dev index 4fa6e69b752..8e3ed97f98d 100755 --- a/util/dev +++ b/util/dev @@ -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 -- "$@" |
