Reduce the duration of the Rust unit tests in the CI

未关闭
#3,729 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, rust
领域
ci-cd, performance

调研方向

Start by reading the CI cargo profile configuration and the test-rust job, then identify which dependencies dominate the test time. Compare cached CI runs after a cache cleanup to weigh build time against test time. Also locate the certificate chain tests that use CertificateChainBuilder and assess where pre-built certificates and chains can replace generated fixtures; done means the Rust test jobs approach their previous duration.

由索引模型根据 Issue 内容生成。

描述

CI/CD :factory:

Why

Since the snark feature is enabled by default (https://github.com/IntersectMBO/mithril/pull/3650), the Rust test jobs of the CI are about twice as slow on every runner (for example 6m 9s to 10m 15s on ubuntu-24.04 and 4m 36s to 10m 57s on ubuntu-24.04-arm), and they now hold back the later stages of the CI (Docker builds and infrastructure deployment tests).

What

Bring the test-rust job times back close to what they were before snark was enabled by default, mainly by making the certificate chain fixtures cheaper and by tuning how the dependencies are optimized in the CI cargo profiles.

How

  • Tune the optimization of the dependencies in the CI cargo profiles
    • Apply opt-level = 3 only to the dependencies that dominate the test time, instead of all dependencies ([profile.ci-tests-snark.package."*"])
    • Decide whether the workspace jobs use this profile, comparing the build time increase with the test time reduction after a CI cache cleanup
  • Create test assets (pre-built certificates and certificate chains) for the certificate chain tests, used in place of CertificateChainBuilder where real fixture generation is not needed
主要语言
Rust
星标
155
派生
52
平均合并
3 天 9 小时
30 天内合并 PR
33

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IntersectMBO/mithril 的其他 Issue

查看 IntersectMBO/mithril 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。