-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The conformance CI jobs spend 30-35s on cargo build --release --bin ...
even with Swatinem/rust-cache@v2 restoring in 3-5s and the post-step
skipping save (meaning: cache hit, nothing new to write back).
From the PR #6 merge run:
| Job | Cache restore | Build | Cache save |
|---|---|---|---|
| Conformance (server) | 3s | 30s | 0s |
| Conformance (client) | 5s | 35s | 0s |
This was ~50s before #5 switched from building the whole
connectrpc-conformance package to --bin ${{ matrix.bin }}.
Hypothesis
Swatinem/rust-cache caches target/*/deps/ but not the final crate
artifacts - so dependencies are warm but connectrpc-conformance
itself recompiles from scratch every time. The conformance crate is
large (includes all the checked-in generated protobuf code), so 30s
of release-mode compile for the leaf crate might just be the floor.
If that's the answer, there's no fix - this is working as designed.
Filing this to record that someone should confirm it rather than
assume.
Possible levers if it's not the floor
- Check if LTO is on for the workspace release profile (slow link)
- Check if the codegen units setting is working against parallelism
sccacheas a second layer (caches per-crate compile output, not
just deps)