Reduce the duration of the Rust unit tests in the CI

Abierto
#3,729 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Rust
Estrellas
155
Forks
52
Merge medio
3 d 9 h
PR fusionados (30 d)
33

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IntersectMBO/mithril

Todos los issues de IntersectMBO/mithril

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.