Commit 5b7a68e
authored
fix(ci): key the registry cache off the git index; add English README/docs as the default (#137)
* fix(ci): compute the registry cache key from the git index, not hashFiles
The windows leg of run 30433315359 went red after every one of its 42
workspace members passed:
The template is not valid. .github/workflows/validate.yml (Line: 272,
Col: 16): hashFiles('pkgs/**/*.lua, tests/**,
.github/workflows/validate.yml') couldn't finish within 120 seconds
hashFiles() globs the WORKING TREE, and actions/cache re-evaluates its
`key` in the post (save) step — i.e. AFTER the build. By then `tests/**`
no longer matches the 82 tracked sources but the build output under
tests/examples/*/target and .mcpp: 42k files / 2.1 GB in a local run,
since .gitignore does not apply to hashFiles. Hashing that blew past the
runner's 120s template-evaluation cap on the slowest filesystem, which is
why only windows failed while linux and macos squeaked under it.
Compute the key once, before anything builds, from `git ls-files -s`: it
reads the INDEX, so it sees exactly the tracked inputs and never build
output, and it reports blob SHAs git already holds rather than reading
file content (~50ms). Freezing it in the job env also guarantees the save
step keys on the same string the restore step used.
Also add README.zh-CN.md to the PR trigger paths, alongside README.md.
* docs: add English README/docs and make English the default
README.md and docs/ were Chinese-only. Adopt the layout mcpp upstream
already uses — English at the canonical path, Chinese one level down:
README.md (English, default) README.zh-CN.md
docs/*.md (English, default) docs/zh/*.md
The Chinese files move with `git mv`, so history follows them, and every
page carries a language switcher at the top.
Follow-through so nothing dangles:
- .agents/skills/add-mcpp-index-package/SKILL.md is Chinese, so its
reference links now point at docs/zh/, and its "update the README" step
names both files.
- publish_mcpp_index.sh ships README.zh-CN.md next to README.md, or the
unpacked artifact's language switch would point at nothing.
- Both language versions of docs/repository-and-schema.md document the
new cache-key step and the corrected CI trigger list.1 parent b9905a9 commit 5b7a68e
13 files changed
Lines changed: 1040 additions & 337 deletions
File tree
- .agents/skills/add-mcpp-index-package
- .github/workflows
- docs
- zh
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
266 | 290 | | |
267 | 291 | | |
268 | 292 | | |
269 | 293 | | |
270 | 294 | | |
271 | 295 | | |
272 | | - | |
| 296 | + | |
273 | 297 | | |
274 | 298 | | |
275 | 299 | | |
| |||
0 commit comments