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

Đang mở
#67,303 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, javascript
Lĩnh vực
ci-cd

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
124k
Fork
38k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
266

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node

Tất cả issue của nodejs/node

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.