Skip to content

ci: replace manual protoc install with arduino/setup-protoc action#52

Open
paikend wants to merge 1 commit intoanthropics:mainfrom
paikend:fix/ci-replace-apt-protoc-with-cached-action
Open

ci: replace manual protoc install with arduino/setup-protoc action#52
paikend wants to merge 1 commit intoanthropics:mainfrom
paikend:fix/ci-replace-apt-protoc-with-cached-action

Conversation

@paikend
Copy link
Copy Markdown
Contributor

@paikend paikend commented Apr 4, 2026

Summary

  • Replace the repeated curl + unzip protoc installation with arduino/setup-protoc@v3 across 6 CI jobs (check, msrv-check, test, clippy, doc, wasm), gaining built-in caching across workflow runs
  • Remove protoc installation from the examples job entirely — multiservice-example uses checked-in generated code and does not invoke protoc at build time
  • Update the PROTOC_VERSION env comment to reflect the new setup

Motivation

As noted in #11, every CI job was independently downloading protoc on each run. arduino/setup-protoc caches the binary via @actions/tool-cache, so subsequent runs skip the download entirely.

The examples job was installing protoc unnecessarily — multiservice-example has no build.rs and include!s pre-generated code, so protoc is not required. Verified locally with cargo build -p multiservice-example without protoc installed.

Changes

Job Before After
check, msrv-check, test, clippy, doc, wasm 4-line curl + unzip + protoc --version arduino/setup-protoc@v3 (2 lines)
examples Same curl+unzip block Removed (not needed)

Net: -38 lines, +21 lines in ci.yml.

Test plan

  • YAML lint passes
  • arduino/setup-protoc@v3 supports exact version pinning ("33.5") per README
  • cargo build -p multiservice-example succeeds without protoc installed
  • CI jobs pass on this PR

Closes #11

🤖 Generated with Claude Code

- Replace curl+unzip protoc installation with arduino/setup-protoc@v3
  across 6 jobs (check, msrv-check, test, clippy, doc, wasm), gaining
  built-in caching across runs
- Remove protoc install from examples job entirely — multiservice
  uses checked-in generated code and does not need protoc
- Update env comment to reflect the new setup

Closes anthropics#11

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: replace apt-get protoc with cached action

1 participant