Skip to content

CI: replace apt-get protoc with cached action #11

@iainmcgin

Description

@iainmcgin

Five CI jobs run sudo apt-get install -y protobuf-compiler, ~14s each.

Four of them (check, test, clippy, doc) genuinely need protoc:
they build --workspace, which includes tests/streaming, which has a
connectrpc-build build.rs. The fifth (examples) runs
./examples/multiservice/test.sh, which only builds
-p multiservice-example - checked-in generated code, no protoc
required.

The conformance job had the same unnecessary install removed in #5.

Proposed fix

  • Drop the apt-get from examples - pure dead weight.
  • For the four jobs that need protoc, switch from apt-get to
    arduino/setup-protoc@v3. It downloads the release zip and caches
    across runs - first hit ~2s, cache hits near-instant. apt-get pulls
    a pile of transitive deb packages every time.

~14s saved per job on the critical path. Not huge, but it's the same
14s four times for every PR.

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