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
Unknown Object (File)
Fri, Nov 29, 3:43 PM
Unknown Object (File)
Tue, Nov 26, 3:36 AM
Unknown Object (File)
Sat, Nov 9, 7:37 PM
Unknown Object (File)
Sat, Nov 9, 7:37 PM
Unknown Object (File)
Sat, Nov 9, 7:37 PM
Unknown Object (File)
Fri, Nov 8, 8:34 AM
Unknown Object (File)
Tue, Nov 5, 2:07 AM
Unknown Object (File)
Nov 1 2024, 2:29 AM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.