Problem
CI wall-clock time is 28-40 minutes, dominated by two bottlenecks that aren't actual test/build work.
Step-level breakdown (from run 24310718017)
macOS jobs (the overall bottleneck)
| Step |
rs-artifacts |
rs-test |
| Nix cache restore |
1069s (18m) |
1178s (20m) |
| sol-prelude |
174s (3m) |
188s (3m) |
| actual work |
365s (6m) |
187s (3m) |
| checkout |
118s (2m) |
88s (1.5m) |
| total |
1753s (29m) |
1671s (28m) |
Ubuntu jobs (for comparison)
| Step |
rs-artifacts |
sol-test |
rs-test |
| Nix cache restore |
34s |
39s |
36s |
| sol-prelude |
551s (9m) |
554s (9m) |
563s (9m) |
| actual work |
403s (7m) |
137s (2m) |
197s (3m) |
| checkout |
64s |
88s |
79s |
| total |
1071s (18m) |
837s (14m) |
895s (15m) |
Key findings
1. macOS Nix cache restore: 18-20min vs ubuntu 34s (30-50x slower)
The Nix cache restore on macOS takes 18-20 minutes — that's 61-71% of the macOS job time. On ubuntu the same step takes 34-39 seconds. The actual test work on macOS is only 3-6 minutes.
2. sol-prelude (forge compile) runs identically in all 8 jobs
Every single job runs rainix-sol-prelude independently — 9 minutes each on ubuntu, 3 minutes on macOS. This is the same compilation producing the same artifacts 8 times. Could be factored into a shared dependency job whose artifacts are downloaded by downstream jobs.
3. Actual test/build work is fast
| Job |
Actual work |
| sol-test |
2m 17s |
| sol-static |
22s |
| rs-test (ubuntu) |
3m 17s |
| rs-test (macos) |
3m 7s |
| rs-artifacts (ubuntu) |
6m 43s |
| rs-artifacts (macos) |
6m 5s |
| rs-static |
2m 1s |
| wasm-build |
1m 27s |
Potential improvements
- Fix macOS Nix cache — investigate why cache restore is 30-50x slower than ubuntu. This alone would cut macOS jobs from ~30m to ~10m.
- Share sol-prelude — run it once as a dependency job and pass artifacts to downstream jobs. Saves ~9min per ubuntu job (currently wasted on redundant compiles).
- Question macOS necessity — if macOS jobs exist only for Rust cross-compilation, consider whether that can be done on ubuntu instead.
Problem
CI wall-clock time is 28-40 minutes, dominated by two bottlenecks that aren't actual test/build work.
Step-level breakdown (from run 24310718017)
macOS jobs (the overall bottleneck)
Ubuntu jobs (for comparison)
Key findings
1. macOS Nix cache restore: 18-20min vs ubuntu 34s (30-50x slower)
The Nix cache restore on macOS takes 18-20 minutes — that's 61-71% of the macOS job time. On ubuntu the same step takes 34-39 seconds. The actual test work on macOS is only 3-6 minutes.
2. sol-prelude (forge compile) runs identically in all 8 jobs
Every single job runs
rainix-sol-preludeindependently — 9 minutes each on ubuntu, 3 minutes on macOS. This is the same compilation producing the same artifacts 8 times. Could be factored into a shared dependency job whose artifacts are downloaded by downstream jobs.3. Actual test/build work is fast
Potential improvements