refactor(build): 统一本地与 CI 构建入口及平台发布工具 #9

Merged
lingjhf merged 2 commits from refactor/unify-build-tooling into main 2026-10-06 16:14:48 +00:00
Owner

本地启动、构建脚本和 CI 原先分别选择 Flutter SDK、加载配置及执行构建,平台发布工具也存在重复编排。此变更统一 SDK 与环境加载、构建预设和平台公共逻辑。

  • 用 .fvmrc 固定 Flutter 3.47.5,本地通过项目 SDK 和共享 Dart 加载器读取 .env.local;CI 校验预装 SDK,并跳过本地配置。
  • 增加统一 Python 构建与检查入口,公共构建 API 一致传递项目根目录、SDK、配置和工作目录,CI 复用同一检查套件。
  • 将 macOS 构建、签名和 DMG 编排迁移为 Python,Windows 更新与 Gitea 打包复用公共进程调用、退出码和文件哈希。
  • 支持 Android 本地源码覆盖,统一 VS Code Debug/Profile/Release 启动配置,并更新开发与发布文档。
  • Flutter 跨进程测试直接使用当前 SDK 的原生 Dart 执行文件,避免 shell 启动器及无必要的包解析;字幕取消测试等待终止通知,消除固定延时带来的偶发失败。

验证:

  • Gitea CI #69 全部通过:代码与测试、Android/Windows 构建、Windows 审计打包及产物汇总校验。
    https://git.orangraph.com/lingjhf/cutdex/actions/runs/69
  • python tool/check.py --suite tools:151 项测试通过、3 项跳过;Python/Shell 语法、源码卫生与包边界检查通过。
  • python tool/check.py --suite flutter:969 项通过、7 项跳过,包括清空 Dart PATH 后的 MCP 功能测试。
  • 字幕取消测试调整后,字幕相关套件再次验证:
  • Gitea CI #69 全部通过:代码与测试、Android/Windows 构建、Windows 审计打包及产物汇总校验。
    https://git.orangraph.com/lingjhf/cutdex/actions/runs/6950 项通过、2 项跳过。
  • 独立临时项目验证 SDK、配置和工作目录切换;平台流程测试覆盖签名顺序、公证后的 ZIP 重建、失败清理和更新索引保护。
  • 严格 Dart 静态分析及提交差异检查通过。

当前验证宿主为 Windows,macOS 真实构建、签名、公证及 DMG 仍需在 Mac 上验证。

本地启动、构建脚本和 CI 原先分别选择 Flutter SDK、加载配置及执行构建,平台发布工具也存在重复编排。此变更统一 SDK 与环境加载、构建预设和平台公共逻辑。 - 用 `.fvmrc` 固定 Flutter 3.47.5,本地通过项目 SDK 和共享 Dart 加载器读取 `.env.local`;CI 校验预装 SDK,并跳过本地配置。 - 增加统一 Python 构建与检查入口,公共构建 API 一致传递项目根目录、SDK、配置和工作目录,CI 复用同一检查套件。 - 将 macOS 构建、签名和 DMG 编排迁移为 Python,Windows 更新与 Gitea 打包复用公共进程调用、退出码和文件哈希。 - 支持 Android 本地源码覆盖,统一 VS Code Debug/Profile/Release 启动配置,并更新开发与发布文档。 - Flutter 跨进程测试直接使用当前 SDK 的原生 Dart 执行文件,避免 shell 启动器及无必要的包解析;字幕取消测试等待终止通知,消除固定延时带来的偶发失败。 验证: - Gitea CI #69 全部通过:代码与测试、Android/Windows 构建、Windows 审计打包及产物汇总校验。 https://git.orangraph.com/lingjhf/cutdex/actions/runs/69 - `python tool/check.py --suite tools`:151 项测试通过、3 项跳过;Python/Shell 语法、源码卫生与包边界检查通过。 - `python tool/check.py --suite flutter`:969 项通过、7 项跳过,包括清空 Dart PATH 后的 MCP 功能测试。 - 字幕取消测试调整后,字幕相关套件再次验证: - Gitea CI #69 全部通过:代码与测试、Android/Windows 构建、Windows 审计打包及产物汇总校验。 https://git.orangraph.com/lingjhf/cutdex/actions/runs/6950 项通过、2 项跳过。 - 独立临时项目验证 SDK、配置和工作目录切换;平台流程测试覆盖签名顺序、公证后的 ZIP 重建、失败清理和更新索引保护。 - 严格 Dart 静态分析及提交差异检查通过。 当前验证宿主为 Windows,macOS 真实构建、签名、公证及 DMG 仍需在 Mac 上验证。
lingjhf added 2 commits 2026-10-06 15:36:04 +00:00
Pin Flutter with FVM and share local environment loading across IDE, Python, and Dart entrypoints. Keep CI on the verified preinstalled SDK and skip local overrides.

Extract common build presets, process execution, and file hashing. Propagate project roots through SDK selection and release commands, and migrate macOS release, signing, and DMG orchestration to Python.

Reuse local check suites in CI, support Android source overrides, and update documentation and regression tests.
fix(test): stabilize MCP startup and subtitle cancellation checks
Gitea CI / Check code and tests (pull_request) Successful in 6m16s
Gitea CI / Audit and package Windows x64 (pull_request) Successful in 1m31s
Gitea CI / Gitea CI passed (pull_request) Successful in 3s
Gitea CI / Build Android APK (pull_request) Successful in 5m13s
Gitea CI / Build Windows x64 app (pull_request) Successful in 19m20s
Gitea CI / Assemble and validate CI artifacts (pull_request) Successful in 1m1s
ab8f3f5bd3
Launch the standard-library MCP bridge directly with the Flutter SDK native Dart executable, without shell or pub startup. Verify it works without Dart on PATH and include stderr when its existing response deadline expires.

Share native Dart selection with generated-code checks and wait for subtitle workflow completion notifications instead of a fixed 10 ms delay.
lingjhf force-pushed refactor/unify-build-tooling from 152c051a29 to ab8f3f5bd3 2026-10-06 15:36:04 +00:00 Compare
lingjhf merged commit 4a759d81a6 into main 2026-10-06 16:14:48 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lingjhf/cutdex#9