Reduce the duration of the Rust unit tests in the CI

オープン
#3,729 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
33

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntersectMBO/mithril のほかの issue

IntersectMBO/mithril の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。