Merge #3416
3416: Clean xtask partial artifacts in `xtask pre-cache` r=matklad a=CAD97 Confirmed that these aren't getting deleted locally. This won't actually change what's cached until the cache key changes. Co-authored-by: Christopher Durham <cad97@cad97.com>
This commit is contained in:
commit
b358fe19d7
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 New Issue
Block a user