Skip to content

CI: conformance release build is 30-35s with warm cache - investigate #12

@iainmcgin

Description

@iainmcgin

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
  • sccache as a second layer (caches per-crate compile output, not
    just deps)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions