Page MenuHomePhabricator

[GH Actions] Include `brew install protobuf` step in iOS build workflow
ClosedPublic

Authored by varun on Sep 14 2022, 7:48 AM.
Tags
None
Referenced Files
F3119599: D5133.id16665.diff
Fri, Nov 1, 2:29 AM
F3119596: D5133.id16666.diff
Fri, Nov 1, 2:28 AM
F3119589: D5133.id16671.diff
Fri, Nov 1, 2:26 AM
F3118509: D5133.diff
Fri, Nov 1, 12:19 AM
Unknown Object (File)
Sat, Oct 5, 2:09 PM
Unknown Object (File)
Sat, Oct 5, 2:09 PM
Unknown Object (File)
Sat, Oct 5, 2:09 PM
Unknown Object (File)
Sat, Oct 5, 2:09 PM

Details

Summary

The GH Actions iOS build workflow was failing because the prost_build crate requires protoc.

Since the GH Actions macOS runners are x86 machines, brew will install protoc in usr/local/bin so we shouldn't need to do any symlinking in order for protoc to be picked up by xcodebuild.

Test Plan

See what happens (usually can test changes to workflows on a fork, but it's particularly annoying for iOS builds)

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

include step for all iOS workflows

atul requested review of this revision.Sep 14 2022, 8:02 AM

I thought there was some reason we couldn't use Homebrew's protobuf in the dev environment installation instructions... I think it had a different version, and it led to incompatiblities in the codegenned files. This is why we have devs compile protobuf from scratch, and why we have this line in the doc:

In the event that Homebrew installs Protobuf anyway, run brew unlink protobuf and protoc --version to ensure it matches the version above.

Not sure if this is relevant in the CI scenario, though. Worst case we can revisit if we have issues.

This revision is now accepted and ready to land.Sep 14 2022, 8:47 AM
This revision now requires review to proceed.Sep 14 2022, 8:47 AM
This revision is now accepted and ready to land.Sep 14 2022, 8:47 AM

This will likely install protobuf 3.21; in which case, you will get compilation errors unless you regenerate all of the protobuf files.

From previous discussion with @varun it seems like installing this version of protobuf is fine to appease the prost_build crate but I haven’t looked too closely.

I can put up a later diff to install the same version and keep things consistent, but things build for now with this version.

yeah, homebrew will install a version that works for the rust library, but won't work for our C++ gRPC codegen. this is fine for now, since CI doesn't do any C++ codegen. the right solution long-term is to install protobuf following the dev env setup instructions

varun edited reviewers, added: atul; removed: varun.