Commit ab8907a
committed
CI: pin XDG_CACHE_HOME=/runner/root/.cache on self-hosted runners
The self-hosted Linux runner's work dir lives on /runner, which is a
separate filesystem from /root. uv's default cache lives under
$HOME/.cache/uv (or $XDG_CACHE_HOME/uv if set) and uv hard-links from
the cache into the venv — hard-links can't cross filesystem
boundaries, so uv silently falls back to copying every dep, adding
tens of seconds to every ``uv sync`` / ``uv venv``.
Pin XDG_CACHE_HOME to a path on /runner (same fs as the work dir) so
uv keeps its cache there and hard-linking succeeds. Wrapped in
``if: runner.environment == 'self-hosted'`` so GitHub-hosted runs
(which don't have /runner and run as unprivileged ``runner`` user)
aren't affected.
Added to every job that runs uv: precheck, discover-standard-tests,
build, discover-live-tests, live-integration, deploy-pages build,
release-state.1 parent 1134af0 commit ab8907a
3 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | 83 | | |
| |||
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
114 | 132 | | |
115 | 133 | | |
116 | 134 | | |
117 | 135 | | |
118 | | - | |
| 136 | + | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| |||
240 | 258 | | |
241 | 259 | | |
242 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
243 | 265 | | |
244 | 266 | | |
245 | 267 | | |
| |||
290 | 312 | | |
291 | 313 | | |
292 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
293 | 319 | | |
294 | 320 | | |
295 | 321 | | |
| |||
0 commit comments