Skip to content

Commit 0d5715e

Browse files
authored
ci+tests: mcpp 0.0.97 — 模块包转 workspace 成员,删除 smoke shell 例外通道(R6 落地) (#78)
* ci: mcpp 0.0.97 — drop the mcpp#232 index-refresh pre-step, retire per-package module smoke jobs 0.0.97 carries the default-namespace index redirect (R6), the synchronous nasm bootstrap (#232), obj-path disambiguation (#233), spacey-defines quoting (#234) and purview-include tracking (#235). The three module smoke jobs (imgui-module/ffmpeg-module/opencv-module) and the tinyhttps smoke step are deleted — the module packages are ordinary workspace members now (next commit), so 'workspace' is the single build/run channel. * feat(tests): public module packages as workspace members (zero shell) tinyhttps/imgui/ffmpeg/opencv consume their bare names from THIS checkout via a member-level '[indices] default = { path = "../../.." }' (mcpp >= 0.0.97). Test sources are line-for-line ports of the smoke consumers (assertions unchanged); ffmpeg/opencv/imgui members are cfg(linux)-gated to the CI-validated surface with no-op mains elsewhere. The four reseeding smoke shells are deleted. Notes: - exactly ONE [indices] entry per member: xlings fails silently with >1 project-scoped index repo (mcpp#238); root-level centralization (#224) is deferred until that lands. - the old smoke's llvm@20.1.7 pin for imgui is dropped: it predates gcc16 module support; imgui-m upstream CI builds with gcc@16.1.0 (verified locally: member passes with the workspace default toolchain). * docs: workspace-only testing — README, schema/CI reference, add-package skill, design doc Also retires two-generations-stale CI descriptions (detect/smoke-examples/ run_example.sh) from docs/repository-and-schema.md. * ci: gate the install()-form opencv member off windows fetch 'compat.opencv@4.13.0' fails deterministically (2/2) on the windows leg under mcpp 0.0.97. Not investigating: the install() CMake form is replaced wholesale by the source-build compat.opencv in the unification PR (#79); until then the member covers linux+macos.
1 parent 3497b86 commit 0d5715e

19 files changed

Lines changed: 323 additions & 574 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# workspace-only 模块包测试(mcpp 0.0.97 / R6 落地)
2+
3+
日期:2026-07-18 · PR:feat/mcpp-097-workspace-only-ci
4+
5+
## 背景
6+
7+
公开模块包(namespace = "",即内建 mcpplibs 默认命名空间:imgui/ffmpeg/opencv/
8+
tinyhttps)此前无法像 compat.* 一样经 `[indices] <ns> = { path }` 指回本仓 checkout
9+
——mcpp 没有重定向**默认命名空间**的语法。合并前验证只能走每包一个的 reseeding
10+
smoke shell(临时 MCPP_HOME + 物理拷贝 checkout 覆盖默认索引落盘位置)+ 专属 CI
11+
job,是 zero-shell 立仓哲学下唯一的例外通道。
12+
13+
mcpp 0.0.97 落地了 `[indices] default = { path = ... }`(亦接受 `""` 键;url 形式
14+
显式报错),并且根级 `[indices]` 的相对 path 按 **workspace 根**解析、成员自动继承
15+
(#224)。例外通道的存在理由消失。
16+
17+
## 变更
18+
19+
1. **mcpp pin 0.0.96 → 0.0.97**(env + 3 平台矩阵)。
20+
2. **成员级 default 重定向**(根级集中化被 mcpp#238 挡住,见下"过程发现"):
21+
每个成员保持/新增恰好一条 `[indices]`;模块包成员用
22+
`default = { path = "../../.." }`(V0 spike 实证:假版本号 999.0.0 只存在于
23+
本地副本仍可解析,`""`/`default` 两种键均可)。
24+
3. **4 个模块包 smoke → workspace 成员**:
25+
- tests/examples/tinyhttps(已有工程,登记成员;三平台描述符,不门控);
26+
- tests/examples/imgui-module(cfg(linux) 门控——描述符虽三平台,但只有
27+
linux 被 CI 验证过,按已验证面转换;老 smoke 的 llvm@20.1.7 钉不再携带:
28+
它早于 gcc16 模块支持,imgui-m 上游 CI 现以 gcc@16.1.0 构建模块层);
29+
- tests/examples/ffmpeg-module、tests/examples/opencv-module(包本身 linux-only,
30+
cfg(linux) 门控 + 非 linux no-op main)。
31+
测试源码逐行移植自对应 smoke 的消费工程(断言不变)。
32+
4. **删除**:tests/smoke_{tinyhttps,imgui,ffmpeg,opencv}_module.sh、validate.yml 的
33+
imgui-module/ffmpeg-module/opencv-module 三个 job 与 workspace job 里的 tinyhttps
34+
smoke 步骤、`mcpp index update` 前置步骤(#232 已修,V0 冷环境实证:无 PATH/apt
35+
nasm 时从沙箱同步解析)。
36+
5. **文档**:README 贡献段、docs/repository-and-schema.md(布局 + CI 行为两节,
37+
顺带清掉两代前的 detect/smoke-examples 残留描述)、add-mcpp-index-package skill
38+
(成员化流程、`mcpp test -p` 本地验证)。
39+
40+
## 过程发现:xlings 多项目级 repo 静默失败(mcpp#238)
41+
42+
首版实现走的是 #224 根级集中化(根一次声明 5 个命名空间、删全部 per-member
43+
块)。本地验证发现:成员沙箱 .xlings.json 一旦注册 ≥2 个项目级 index repo,
44+
`xlings interface install_packages` 对任意包静默 exit 1(无 error 事件)——与
45+
repo 名、URL 无关,纯数量触发。既有成员从未暴露(每成员恰好 1 条);根级继承让
46+
每个成员变成 5 条,全部未缓存安装即挂。已提 mcpp#238(含最小复现矩阵);本 PR
47+
退回单条声明形态,修复后再集中化。连带影响:模块成员的传递 compat 依赖
48+
(opencv → compat.opencv5)从**已发布**的全局 compat 索引解析,而非本 checkout
49+
(compat 描述符的合并前验证由其专属成员覆盖,见成员注释)。
50+
51+
## 语义差异(接受)
52+
53+
smoke 曾额外覆盖"物理重播默认索引"这一机制本身;成员形态覆盖的是我们真正关心的
54+
**合并前描述符正确性**,消费的仍是真实已发布 tarball(Form A 下载源不变)。
55+
选择性成员测试机制对新成员零配置生效(pkgs/<x>/<lib>.lua → grep 引用成员)。
56+
57+
## 效果
58+
59+
- CI job 数 8 → 5(lint、mirror-cn-reachable、workspace×3);模块包验证并入
60+
`mcpp test --workspace`,新模块包只需加成员目录,不再复制 shell。
61+
- 后续 compat.opencv 合一(B0)、opencv 0.0.3 升版等改动的回归 = 改一行 + CI。

.agents/skills/add-mcpp-index-package/SKILL.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,26 @@ description: Use when adding a new third-party library/package to the mcpp-index
6060
- `xpm` 须覆盖三平台(linux/macosx/windows),每个版本包含 `url = { GLOBAL=…, CN=… }``sha256`
6161
- 版本号采用**裸版本**(如 `"1.2.3"`),不含前导 `v`;下载 URL 中可保留上游的 `…/v1.2.3.tar.gz` 形式。
6262
5. **识别可门控的可选组件并实现 feature**(参见下文“feature 机制”)。feature 仅能门控 **sources**
63-
6. **编写最小工程** `tests/examples/<short>/`(`short` 为包名去除 `compat.`/`mcpplibs.` 前缀后的结果)。
64-
- 包含 `mcpp.toml`(其 `[indices].compat = { path = "../../.." }` 指回仓根)与一个 `src/main.*`,
65-
后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。
63+
6. **编写测试工程(workspace 成员)** `tests/examples/<short>/`(`short` 为包名去除 `compat.`/`mcpplibs.`
64+
前缀后的结果;公开模块包用 `<name>-module`),并把它加进仓根 `mcpp.toml``[workspace].members`
65+
- 包含 `mcpp.toml``tests/*.cpp`,后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。
66+
- 成员声明**恰好一条** `[indices] <ns> = { path = "../../.." }`,把所消费命名空间重定向到
67+
本 checkout(公开模块包用 `default`,即内建 mcpplibs 命名空间;mcpp ≥ 0.0.97)。
68+
单条是硬约束:xlings 对 >1 个项目级 index repo 静默失败(mcpp#238);根级集中化待其修复。
69+
- 非全平台包按 `[target.'cfg(...)'.dependencies]` 门控依赖,测试源码在被门控掉的平台上
70+
编译为 no-op `main`(`#ifdef __linux__ … #else int main(){return 0;} #endif` 模式)。
6671
- 如需测试 feature,依赖采用长式声明 `name = { version = "…", features = ["…"] }`
67-
7. **本地验证**(使用与 CI 相同版本的 mcpp,详见下文“本地验证”)。必须实际执行 `mcpp build``mcpp run` 并通过。
72+
7. **本地验证**(使用与 CI 相同版本的 mcpp,详见下文“本地验证”)。必须实际执行 `mcpp test -p <member>` 并通过。
6873
8. **更新 README**:在对应分类表中新增一条记录。
6974
9. **撰写设计文档** `.agents/docs/<YYYY-MM-DD>-add-<lib>-plan.md`,记录形态判定、镜像、feature 评估、验证结论
7075
与注意事项。
7176
10. **本地 lint**:在本地复现 `validate.yml` 的 lint 检查(语法、必填字段、无前导 v、镜像表校验)。详见
7277
[docs/repository-and-schema.md](../../../docs/repository-and-schema.md)
7378
11. **提交变更**:由 `main` 切出新分支,依次 commit、push、开 PR(不应直接推送 `main`)。PR 描述应载明形态、镜像、
7479
feature 与验证结论。
75-
12. **确认 CI 通过**:`detect` 应仅选中本库对应的 example(`smoke-full-linux``smoke-portable` 显示 `skipping`),
76-
`smoke-examples (<short>)` 通过,`mirror-cn-reachable` 覆盖新增 CN url。合并由维护者执行。
80+
12. **确认 CI 通过**:`workspace (linux|macos|windows)` 的选择性成员测试应仅选中本库对应成员并通过
81+
(日志中 `selected members: <member>`),`lint`(含 `mcpp xpkg parse`)与 `mirror-cn-reachable`
82+
覆盖新增描述符与 CN url。合并由维护者执行。
7783

7884
## feature 机制
7985

@@ -113,13 +119,13 @@ root="$PWD/mcpp-$MV-linux-x86_64"
113119
mkdir -p ~/.mcpp/registry && cp -a "$root/registry/." ~/.mcpp/registry/
114120
export MCPP="$root/bin/mcpp"
115121
export MCPP_VENDORED_XLINGS="$root/registry/bin/xlings"
116-
export MCPP_INDEX_MIRROR=GLOBAL # CI example 使用 GLOBAL;CN 由 mirror-cn-reachable 单独校验
117-
MCPP="$MCPP" bash tests/run_example.sh <short>
122+
export MCPP_INDEX_MIRROR=GLOBAL # CI 使用 GLOBAL;CN 由 mirror-cn-reachable 单独校验
123+
rm -rf "tests/examples/<member>/target" "tests/examples/<member>/.mcpp" # 冷验证:自干净状态走完整管线
124+
"$MCPP" test -p <member>
118125
```
119126

120-
- 输出末尾应包含断言行与 `OK: <short>`
121-
- `run_example.sh` 会执行 `rm -rf target .mcpp`,自干净状态走完整管线(fetch、generate、compile、link、run)。
122-
- 如需查看头文件或源码,解包结果位于 `tests/examples/<short>/.mcpp/.xlings/data/xpkgs/<idx>-x-<name>/<ver>/<wrap>/`
127+
- 输出末尾应为 `test result ok`(测试二进制退出码非 0 即失败)。
128+
- 如需查看头文件或源码,解包结果位于 `tests/examples/<member>/.mcpp/.xlings/data/xpkgs/<idx>-x-<name>/<ver>/<wrap>/`
123129

124130
## 常见错误与规避
125131

.github/workflows/validate.yml

Lines changed: 22 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ on:
66
push:
77
branches: [main]
88
schedule:
9-
# nightly full regression — exercises every smoke suite regardless of diff
9+
# nightly full regression — exercises every workspace member regardless of diff
1010
- cron: "0 6 * * *"
1111
workflow_dispatch:
1212

1313
env:
14-
# 0.0.96: carries the windows scanner symlink-escape crash fix (mcpp#230),
15-
# so all platforms ride the same version again. Older floors of note:
16-
# 0.0.94 fixed feature-gated `sources` under `mcpp test` (mcpp#218);
17-
# 0.0.91 added standard = "c++fly" to the resolver grammar, so c++fly
18-
# descriptors get the lint WARN below, not a hard grammar-parse rejection.
19-
MCPP_VERSION: "0.0.96"
14+
# 0.0.97: default-namespace index redirect (`[indices] default = { path }`),
15+
# which turned the public module packages (imgui/ffmpeg/opencv/tinyhttps)
16+
# into ordinary workspace members and retired the per-package reseeding
17+
# smoke shells + their dedicated jobs; also carries the synchronous nasm
18+
# bootstrap (mcpp#232 — the `mcpp index update` pre-step is gone), obj-path
19+
# disambiguation (#233), spacey-defines quoting (#234), and purview-include
20+
# depfile tracking (#235). Older floors of note: 0.0.96 fixed the windows
21+
# scanner symlink-escape crash (mcpp#230); 0.0.94 fixed feature-gated
22+
# `sources` under `mcpp test` (mcpp#218); 0.0.91 added standard = "c++fly"
23+
# to the resolver grammar, so c++fly descriptors get the lint WARN below,
24+
# not a hard grammar-parse rejection.
25+
MCPP_VERSION: "0.0.97"
2026

2127
jobs:
2228
lint:
@@ -156,21 +162,21 @@ jobs:
156162
ext: tar.gz
157163
mcpp: bin/mcpp
158164
xlings: registry/bin/xlings
159-
mcpp_version: "0.0.96" # keep in sync with env.MCPP_VERSION
165+
mcpp_version: "0.0.97" # keep in sync with env.MCPP_VERSION
160166
- platform: macos
161167
os: macos-15
162168
suffix: macosx-arm64
163169
ext: tar.gz
164170
mcpp: bin/mcpp
165171
xlings: registry/bin/xlings
166-
mcpp_version: "0.0.96" # keep in sync with env.MCPP_VERSION
172+
mcpp_version: "0.0.97" # keep in sync with env.MCPP_VERSION
167173
- platform: windows
168174
os: windows-latest
169175
suffix: windows-x86_64
170176
ext: zip
171177
mcpp: bin/mcpp.exe
172178
xlings: registry/bin/xlings.exe
173-
mcpp_version: "0.0.96" # keep in sync with env.MCPP_VERSION
179+
mcpp_version: "0.0.97" # keep in sync with env.MCPP_VERSION
174180
env:
175181
MCPP_EFFECTIVE: ${{ matrix.mcpp_version }}
176182
steps:
@@ -212,23 +218,12 @@ jobs:
212218
echo "MCPP_VENDORED_XLINGS=$root/${{ matrix.xlings }}" >> "$GITHUB_ENV"
213219
echo "$root/bin" >> "$GITHUB_PATH"
214220
fi
215-
# compat.ffmpeg carries NASM .asm sources. No host install needed:
216-
# mcpp >= 0.0.95 resolves nasm itself (PATH → sandbox → auto
217-
# `xlings install nasm`), lazily, only when the plan has .asm units —
218-
# same self-bootstrap contract as the llvm toolchain. The sandbox copy
219-
# lands in ~/.mcpp/registry, so the cache carries it across runs.
220-
# The refresh below is needed because release archives vendor an index
221-
# snapshot and the bootstrap is offline-first: 0.0.96 shipped with a
222-
# nasm.lua deployed engines can't resolve — it "installs" empty
223-
# (mcpp#232; fixed in xim-pkgindex#398 after the release was cut).
224-
# One `mcpp index update` (native wrapper over `xlings update` with
225-
# the sandbox env + transient-network retry) lets the bootstrap see
226-
# the fixed descriptor. Drop once a mcpp release vendors a post-#398
227-
# index snapshot.
228-
- name: Refresh sandbox package index (nasm bootstrap, mcpp#232)
229-
if: runner.os == 'Linux'
230-
shell: bash
231-
run: '"$MCPP" index update'
221+
# compat.ffmpeg / compat.opencv5 carry NASM .asm sources. No host
222+
# install and no index-refresh pre-step needed: mcpp >= 0.0.97
223+
# resolves nasm itself through the same synchronous gate as the
224+
# toolchain (index refresh + install + payload check BEFORE the build
225+
# plans, mcpp#232). The sandbox copy lands in ~/.mcpp/registry, so
226+
# the cache carries it across runs.
232227

233228
# ── Selective member testing ──────────────────────────────────────
234229
# `mcpp test --workspace` builds every member (opencv, ffmpeg, …) and
@@ -311,120 +306,4 @@ jobs:
311306
done
312307
exit $rc
313308
fi
314-
- name: tinyhttps module package smoke
315-
shell: bash
316-
env:
317-
MCPP_INDEX_MIRROR: GLOBAL
318-
run: bash tests/smoke_tinyhttps_module.sh
319-
320-
# ── Exception: the public `imgui` C++23-module package (namespace "") ──
321-
# Not yet a workspace member: its package has an empty namespace (the builtin
322-
# default index), which a workspace member can't point at a local path the way
323-
# namespaced compat.*/nlohmann packages can. Until mcpp can map the default
324-
# namespace to a local index, this one keeps a thin driver that reseeds the
325-
# default index from the repo. Tracked in the rearchitecture design doc.
326-
imgui-module:
327-
runs-on: ubuntu-latest
328-
timeout-minutes: 60
329-
env:
330-
MCPP_EFFECTIVE: "0.0.96" # keep in sync with env.MCPP_VERSION
331-
steps:
332-
- uses: actions/checkout@v4
333-
- name: Restore mcpp registry cache
334-
uses: actions/cache@v4
335-
with:
336-
path: ~/.mcpp/registry
337-
key: mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-${{ hashFiles('pkgs/**/*.lua', 'tests/**', '.github/workflows/validate.yml') }}
338-
restore-keys: |
339-
mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-
340-
- name: Download mcpp
341-
run: |
342-
curl -L -fsS -o mcpp.tar.gz \
343-
"https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-linux-x86_64.tar.gz"
344-
tar -xzf mcpp.tar.gz
345-
root="$PWD/mcpp-${MCPP_VERSION}-linux-x86_64"
346-
mkdir -p "$HOME/.mcpp/registry"
347-
cp -a "$root/registry/." "$HOME/.mcpp/registry/"
348-
echo "MCPP=$root/bin/mcpp" >> "$GITHUB_ENV"
349-
echo "MCPP_VENDORED_XLINGS=$root/registry/bin/xlings" >> "$GITHUB_ENV"
350-
echo "$root/bin" >> "$GITHUB_PATH"
351-
- name: imgui module package smoke
352-
env:
353-
MCPP_INDEX_MIRROR: GLOBAL
354-
run: |
355-
"$MCPP" --version
356-
timeout 1800 bash tests/smoke_imgui_module.sh
357309
358-
# ── Exception: the public `ffmpeg` C++23-module package (namespace "") ──
359-
# Same default-namespace limitation as imgui-module above — validated via a
360-
# reseeding smoke driver instead of a workspace member. Linux-only: its
361-
# compat.ffmpeg dependency ships a linux-x86_64 configure snapshot (macOS is
362-
# blocked on mcpp#229 dependency cfg-conditional sources).
363-
ffmpeg-module:
364-
runs-on: ubuntu-latest
365-
timeout-minutes: 60
366-
env:
367-
MCPP_EFFECTIVE: "0.0.96" # keep in sync with env.MCPP_VERSION
368-
steps:
369-
- uses: actions/checkout@v4
370-
- name: Restore mcpp registry cache
371-
uses: actions/cache@v4
372-
with:
373-
path: ~/.mcpp/registry
374-
key: mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-${{ hashFiles('pkgs/**/*.lua', 'tests/**', '.github/workflows/validate.yml') }}
375-
restore-keys: |
376-
mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-
377-
- name: Download mcpp
378-
run: |
379-
curl -L -fsS -o mcpp.tar.gz \
380-
"https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-linux-x86_64.tar.gz"
381-
tar -xzf mcpp.tar.gz
382-
root="$PWD/mcpp-${MCPP_VERSION}-linux-x86_64"
383-
mkdir -p "$HOME/.mcpp/registry"
384-
cp -a "$root/registry/." "$HOME/.mcpp/registry/"
385-
echo "MCPP=$root/bin/mcpp" >> "$GITHUB_ENV"
386-
echo "MCPP_VENDORED_XLINGS=$root/registry/bin/xlings" >> "$GITHUB_ENV"
387-
echo "$root/bin" >> "$GITHUB_PATH"
388-
- name: ffmpeg module package smoke
389-
env:
390-
MCPP_INDEX_MIRROR: GLOBAL
391-
run: |
392-
"$MCPP" --version
393-
timeout 2700 bash tests/smoke_ffmpeg_module.sh
394-
395-
# ── Exception: the public `opencv` C++23-module package (namespace "") ──
396-
# Same default-namespace limitation as imgui-module above — validated via a
397-
# reseeding smoke driver instead of a workspace member. Linux-only: its
398-
# compat.opencv5 dependency ships a linux-x86_64 config snapshot (macOS is
399-
# blocked on mcpp#229 dependency cfg-conditional sources).
400-
opencv-module:
401-
runs-on: ubuntu-latest
402-
timeout-minutes: 60
403-
env:
404-
MCPP_EFFECTIVE: "0.0.96" # keep in sync with env.MCPP_VERSION
405-
steps:
406-
- uses: actions/checkout@v4
407-
- name: Restore mcpp registry cache
408-
uses: actions/cache@v4
409-
with:
410-
path: ~/.mcpp/registry
411-
key: mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-${{ hashFiles('pkgs/**/*.lua', 'tests/**', '.github/workflows/validate.yml') }}
412-
restore-keys: |
413-
mcpp-registry-${{ runner.os }}-${{ env.MCPP_EFFECTIVE }}-
414-
- name: Download mcpp
415-
run: |
416-
curl -L -fsS -o mcpp.tar.gz \
417-
"https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-linux-x86_64.tar.gz"
418-
tar -xzf mcpp.tar.gz
419-
root="$PWD/mcpp-${MCPP_VERSION}-linux-x86_64"
420-
mkdir -p "$HOME/.mcpp/registry"
421-
cp -a "$root/registry/." "$HOME/.mcpp/registry/"
422-
echo "MCPP=$root/bin/mcpp" >> "$GITHUB_ENV"
423-
echo "MCPP_VENDORED_XLINGS=$root/registry/bin/xlings" >> "$GITHUB_ENV"
424-
echo "$root/bin" >> "$GITHUB_PATH"
425-
- name: opencv module package smoke
426-
env:
427-
MCPP_INDEX_MIRROR: GLOBAL
428-
run: |
429-
"$MCPP" --version
430-
timeout 2700 bash tests/smoke_opencv_module.sh

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ mcpp self config --mirror CN # 切换至国内镜像,默认使用 GLOBAL 上
4848
```text
4949
参考本仓 skill `.agents/skills/add-mcpp-index-package`,将 <库名 / 仓库URL> @<版本> 收录进 mcpp-index:
5050
判定形态;配置 CN 镜像(无 mcpp-res 权限时使用 plain-string 上游 url);编写 pkgs/<首字母>/<包名>.lua;
51-
添加 tests/examples/<库>/ 最小工程;使用与 CI 同版本的 mcpp 本地执行 `mcpp build && run` 进行验证;
52-
更新 README 与在线索引;提交 PR 并确认 CI 通过。
51+
添加 tests/examples/<库>/ 测试工程并登记为 workspace 成员;使用与 CI 同版本的 mcpp 本地执行
52+
`mcpp test -p <成员>` 进行验证;更新 README 与在线索引;提交 PR 并确认 CI 通过。
5353
```
5454

5555
细节文档位于 [`docs/`](docs/),供人工与 agent 共同使用:
@@ -59,7 +59,9 @@ mcpp self config --mirror CN # 切换至国内镜像,默认使用 GLOBAL 上
5959
- [仓库结构与 schema 与 CI](docs/repository-and-schema.md):字段速查、选跑机制与本地 lint。
6060
- 字段规范见 [mcpp 扩展字段文档](https://github.com/mcpp-community/mcpp/blob/main/docs/04-schema-xpkg-extension.md)
6161

62-
> 提交 PR 后,`validate` 自动执行 lint 并按改动库选跑示例;合并后,`deploy-site` 将其发布至在线浏览站。
62+
> 提交 PR 后,`validate` 自动执行 lint 并按改动库选跑对应 workspace 成员(整个测试面是一个 mcpp
63+
> workspace,公开模块包 `imgui`/`ffmpeg`/`opencv`/`tinyhttps` 也是普通成员——各成员经 `[indices]`
64+
> 把所消费命名空间重定向到 checkout,零 shell 驱动);合并后,`deploy-site` 将其发布至在线浏览站。
6365
6466
## 相关链接
6567

0 commit comments

Comments
 (0)