Files
Web_FreeCAD_Bitbybit/docs/ci-real-verification.zh-CN.md
wangdequan 2be18a511e
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled
feat: advance FreeCAD parity verification and runtime boundaries
2026-08-11 02:14:45 -04:00

28 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 真实验证 CI
`npm run verify` 负责检查仓库中已生成的证据和静态门禁它不应被误解为重新启动浏览器、FreeCAD 或 WASM。真实验证入口是
```bash
./npmw run ci:real -- --lane=chrome
./npmw run ci:real -- --lane=oracle
./npmw run ci:real -- --lane=wasm
```
Chrome 还提供显式的两阶段入口:`./npmw run ci:real:chrome` 只启动真实 Chrome harness 并生成报告,`./npmw run ci:check:chrome` 只读取并校验这些报告。CI 会按这两个步骤执行并上传 JSON/截图证据;因此历史报告检查不会被误认为重新执行了浏览器。随后 `test:browser-matrix` / `check:browser-matrix` 会用 Playwright 的 Firefox 和 WebKit 对生产构建执行 shell、OCCT canvas、COOP/COEP、SharedArrayBuffer 和持久化能力 smoke gateFirefox 强制 OPFSWebKit 缺少 OPFS 时必须明确报告 `memory-fallback`
`--lane=all` 会按 oracle、WASM、Chrome 顺序执行全部 lane。任一命令退出非零都会使整个 lane 失败;完整运行摘要写入 `.cache/ci/real-verification.json`,分阶段运行分别写入 `real-verification-execute.json``real-verification-check.json`,这些文件不作为仓库基线证据提交。
oracle lane 默认会重新抓取锁定的 FreeCAD commit 并初始化子模块。仅在本机已经具备该 commit、且需要离线复现时才可显式使用 `FREECAD_SOURCE_OFFLINE=1`;该模式会拒绝未锁定的 checkout并跳过网络相关子模块更新不会替代 CI 的真实 fetch。
## Runner 要求
工作流使用标签为 `self-hosted, linux, cad` 的 runner因为 FreeCAD 原生编译和外围 CAM harness 需要较大的本地工具链。runner 必须提供:
- Node `22.23.2`、CMake、Ninja、C/C++ 编译器和 Python
- Chrome/Chromium通过 `CHROME_BIN` 指定、Firefox 和 WebKit缓存版本不匹配时分别通过 `FIREFOX_BIN``WEBKIT_BIN` 指定)以及可用的无头模式;
- Emscripten通过 `EMSDK` 指定)和 OCCT 源码目录(通过 `OCCT_SOURCE_DIR` 指定);
- `CAMotics/``OpenCAMLib/``cnc_wams_gpt6/``working_ocl/` 外部工作树。它们不进入 Git版本由 `config/` 中的锁定清单和 drift check 校验;
- FreeCAD 构建所需的系统开发包。`ci:real -- --lane=oracle` 会重新抓取锁定的 FreeCAD 源码、配置、编译、安装并执行 oracle不接受旧报告代替。
工作流中的 `actions/checkout` 不会恢复被 `.gitignore` 忽略的外部工作树runner 镜像或预热步骤必须提前准备它们。缺少任一依赖时harness 应失败并暴露缺失项,而不是降级为读取历史 JSON。