mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Clean xtask partial artifacts in xtask pre-cache
This commit is contained in:
parent
ce5684216e
commit
e070553cef
2 changed files with 6 additions and 3 deletions
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
@ -87,7 +87,7 @@ jobs:
|
|||
|
||||
- name: Prepare cache 2
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: Remove-Item ./target/debug/xtask.exe
|
||||
run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
|
||||
|
||||
typescript:
|
||||
name: TypeScript
|
||||
|
|
|
@ -139,12 +139,15 @@ pub fn run_pre_cache() -> Result<()> {
|
|||
}
|
||||
|
||||
fs2::remove_file("./target/.rustc_info.json")?;
|
||||
let to_delete = ["ra_", "heavy_test"];
|
||||
let to_delete = ["ra_", "heavy_test", "xtask"];
|
||||
for &dir in ["./target/debug/deps", "target/debug/.fingerprint"].iter() {
|
||||
for entry in Path::new(dir).read_dir()? {
|
||||
let entry = entry?;
|
||||
if to_delete.iter().any(|&it| entry.path().display().to_string().contains(it)) {
|
||||
rm_rf(&entry.path())?
|
||||
// Can't delete yourself on windows :-(
|
||||
if !entry.path().ends_with("xtask.exe") {
|
||||
rm_rf(&entry.path())?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue