perf(ci): stabilize Rust validation critical path - #1983
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本 PR 收敛现有 Rust CI 关键路径,不新增 workflow 或 job:
rust-build-check对完整前端构建的依赖。Rust check/test 仅创建 Tauri 代码生成所需的空dist与src/mobile-web/dist;真实前端产物仍由frontend-build和产品打包流程负责。cargo generate-lockfile,统一消费已提交的Cargo.lock,避免兼容版本发布自然改变 cache key 和 CI 解析结果。mainpush 可以写缓存,并允许可信 main 在后段测试失败时保存已完成的依赖编译产物。--lib或显式--testtarget,避免无关 test binary 进入编译图。check:github-config回归契约,并把长期规则合入既有 Rust 构建依赖边界文档。根因与架构边界
PR #1979 的 Windows 慢路径既包含冷缓存,也包含 Rust 矩阵被前端构建串行阻塞。此前每次重新生成 lockfile 还会让同一源码在上游兼容版本发布后得到新解析和新 cache key。Tauri 的 check/test 实际只要求配置路径存在,完整 Web 产物不是 Rust 编译 owner 的输入。
本 PR 保留三平台 workspace check、Core/Desktop 测试和现有平台敏感 suite,不用减少覆盖来换时间。Nightly 发布会先注入版本号,属于明确的 manifest 变更路径,本 PR 不修改该流程。
预期影响
Cargo.lock--locked本地验证--lib/--testtargetHosted runner 波动仍然存在;本 PR 不把单次耗时写成永久阈值。Core/Desktop 全量 test profile 仍是剩余主耗时,将在后续 owner/test-target 隔离 PR 中处理。
验证
pnpm run check:github-configcargo test --locked -p bitfun-ai-adapters --features subscription-auth --lib subscription_auth(48 passed)cargo test --locked -p bitfun-services-integrations --no-default-features --features file-watch --test file_watch_contracts(7 passed)cargo test --locked -p tool-runtime --lib search::(12 passed)dist与src/mobile-web/dist均为空时执行cargo check --locked -p bitfun-desktopgit diff --check gcwing/main...HEAD未在本地重复运行 workspace 全量 check/test;本 PR CI 保留这些跨平台验证。