Skip to content

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

Merged
iainmcgin merged 1 commit intoanthropics:mainfrom
paikend:fix/ci-replace-apt-protoc-with-cached-action
Apr 16, 2026
Merged

ci: replace manual protoc install with arduino/setup-protoc action#52
iainmcgin merged 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

Copy link
Copy Markdown
Collaborator

@iainmcgin iainmcgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@iainmcgin iainmcgin enabled auto-merge (squash) April 12, 2026 23:59
- 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>
auto-merge was automatically disabled April 16, 2026 12:44

Head branch was pushed to by a user without write access

@paikend paikend force-pushed the fix/ci-replace-apt-protoc-with-cached-action branch from b3a8dd1 to d24022b Compare April 16, 2026 12:44
@paikend
Copy link
Copy Markdown
Contributor Author

paikend commented Apr 16, 2026

Rebased onto latest main and re-signed the commit with SSH key to satisfy the branch protection rule (required_signatures).

@paikend paikend requested a review from iainmcgin April 16, 2026 12:48
@iainmcgin iainmcgin merged commit 5fe8ed8 into anthropics:main Apr 16, 2026
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2026
@paikend paikend deleted the fix/ci-replace-apt-protoc-with-cached-action branch April 17, 2026 00:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: replace apt-get protoc with cached action

2 participants