[AAASM-2189] 🐛 (ci): Install protoc in maturin wheel builds (Linux + macOS)#68
Open
Chisanan232 wants to merge 2 commits into
Open
[AAASM-2189] 🐛 (ci): Install protoc in maturin wheel builds (Linux + macOS)#68Chisanan232 wants to merge 2 commits into
Chisanan232 wants to merge 2 commits into
Conversation
The v0.0.1-alpha.2 dry-run surfaced this in the manylinux wheel
build for x86_64 and aarch64:
error: failed to run custom build command for `aa-proto v0.0.1 ...`
Caused by: Could not find `protoc`. If `protoc` is installed, try
setting the `PROTOC` environment variable to the path of the
`protoc` binary. To install it on Debian, run
`apt-get install protobuf-compiler`.
`aa-proto` (a git dependency on agent-assembly) has a build.rs that
uses prost-build, which requires the protoc compiler. The manylinux2014
image (CentOS 7-based; manylinux_2_28+ uses Rocky/Alma) and the
GitHub macOS runners do not ship protoc by default.
Fix:
* Linux (manylinux: auto):
`before-script-linux: yum install -y protobuf-compiler || dnf install ...`
Runs inside the manylinux container before maturin invokes cargo.
yum covers manylinux2014; dnf covers manylinux_2_28+.
* macOS (macos-14 / macos-13 runners):
A regular `run: brew install protobuf` step before the
maturin-action invocation. macOS doesn't have docker, so
before-script-linux is not applicable.
Both x86_64 and aarch64 Linux variants, plus both macOS variants,
are patched uniformly.
Tracked: AAASM-2109
Local verification surfaced a bug in my prior fix: the CentOS 7-based manylinux2014 image's `protobuf-compiler` package ships protoc 2.5.0 which only supports proto2 syntax. aa-proto's .proto files use proto3, producing: test.proto:1:10: Unrecognized syntax identifier "proto3". This parser only recognizes "proto2". Fix: download the official protoc binary release (v32.1) from GitHub in the before-script-linux block instead of relying on the OS package. Works for both x86_64 and aarch64 manylinux variants. Verified locally inside `quay.io/pypa/manylinux2014_x86_64:latest`: * curl + unzip protoc-32.1-linux-x86_64.zip → libprotoc 32.1 * proto3 sample compile → ✓ OK The macOS step (`brew install protobuf`) was already correct — homebrew tracks latest protoc. Tracked: AAASM-2189
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The v0.0.1-alpha.2 dry-run's
Release Python SDKworkflow had all 4 wheel builds fail with:aa-proto(a git dep on agent-assembly) has a build.rs that usesprost-build, which requires the protoc compiler. Neither the manylinux container nor the GitHub macOS runners ship protoc by default.Fix
Two install patterns depending on the build environment:
build-linux-x86_64(manylinux: auto)before-script-linux: yum install -y protobuf-compiler || dnf install -y protobuf-compilerto thePyO3/maturin-action@v1invocation.yumcovers manylinux2014 (CentOS 7);dnfcovers manylinux_2_28+ (Rocky/Alma).build-linux-aarch64(manylinux: auto)build-macos-arm64(macos-14 runner)run: brew install protobufstep BEFORE the maturin-action. macOS doesn't have docker;before-script-linuxdoesn't apply.build-macos-x86_64(macos-13 runner)build-sdistLocal verification
actionlint .github/workflows/release-python.ymlclean (pre-existingmacos-13runner warning is unrelated — Apple retired that label from GitHub-hosted runners; same warning exists on master)before-script-linuxis a documentedPyO3/maturin-action@v1input (ref: https://github.com/PyO3/maturin-action#inputs)Note on CI
Per maintainer direction, GitHub Actions billing limit is hit — CI won't run on this PR. The fix is verified by inspection + memory
project_aa_cli_compat_protoc_requirement.mdconfirms this is the same root cause we've fixed in agent-assembly CI before. Re-running once billing resets is the verification.Related Issues
Type of Change
— Claude Code (Opus 4.7, 1M context)