test-shared: use ccache for V8 to avoid up to 6h macOS rebuilds

Abierto
#67,303 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

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
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, javascript
Área
ci-cd

Línea de trabajo

Start with the test-shared.yml workflow and the linked v8-ccache.nix example; the issue says the remaining branch changes are measurement scaffolding. Check how the Darwin jobs fetch V8 from Cachix and compare that setup with the ccache approach. The requested outcome is an acceptable way to cache V8 builds for test-shared, including fork PRs; full macOS timings are still pending.

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

Descripción

build tools

Since #61860, the darwin jobs in test-shared.yml get V8 from Cachix. When a commit changes one of V8's build inputs (e.g. configure.py, common.gypi, deps/v8), they rebuild it from source instead.

This now takes 3–6h, compared with 20–50 min on a cache hit. On #66823 the aarch64-darwin job took 5h44m, close to the 6h limit. Fork PRs can't push to Cachix, so every push pays this cost again.

This isn't rare: 129 of the 1638 commits on main in the last 90 days touched one of these inputs.

On my fork I tried building V8 with ccache, stored as a single actions/cache entry so it doesn't run into the cache rate limit. Caches saved on main are readable from PRs, so fork PRs would benefit too.
Results on aarch64-linux:

  • cold: 73 min, 111 MB cache
  • with the configure.py change from that PR: 100% cache hits, rebuilt in under a minute
  • output byte-identical to the V8 in Cachix

The setup also works on both macOS runners. The full macOS timings are still running, and I'll post them here. The core of the change is small: v8-ccache.nix (the rest of that branch is measurement scaffolding).

Would something like this be acceptable for test-shared?

This is just one possible approach. Suggestions for simpler or better solutions are welcome, and anyone can take this forward.

Lenguaje dominante
JavaScript
Estrellas
124k
Forks
38k
Merge medio
4 d 2 h
PR fusionados (30 d)
266

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 nodejs/node

Todos los issues de nodejs/node

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.