Commit 6ccdf25
committed
ci(dylint): gate stale-cache invalidation on partial restore
Only delete `target/dylint` when `actions/cache` reported a primary-key
miss. The `cache-hit` output is `true` only when the exact `key`
matched, which means the cached `target/dylint/libraries/...so` was
built for the current `dylint.toml`. Any `restore-keys` fallback
(including the looser third entry that ignores `dylint.toml`) leaves
`cache-hit` as `false`, and that is the case where the cached `.so`
may not match the in-tree `dylint.toml`. Always running the cleanup
needlessly rebuilds the perfectionist library and its dependency
chain on every run, which makes the `target` portion of the cache
useless.1 parent 7310d32 commit 6ccdf25
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
0 commit comments