[Android] Add script to install protoc for CI
Summary:
Add protobuf install script to make installation of the protoc
command easy for CI.
The intent is to use a more recent version of protobuf which doesn't fail
immediately when "optional" is present in a protobuf file. Ubuntu still uses
3.12 which deprecated optional, but 3.15 added usage of optional back.
https://linear.app/comm/issue/ENG-2404
Test Plan:
$ docker run -it --rm -v $PWD:/comm reactnativecommunity/react-native-android:latest /bin/bash # apt update # apt install -y autoconf libtool build-essential cmake git libgtest-dev libssl-dev zlib1g-dev # ./comm/native/android/scripts/install_protobuf.sh # protoc --version libprotoc 3.15.8
Example run (just asserts that protobuf was installed correctly, not that it was used):
https://buildkite.com/comm/android-ci-plus-protoc-install/builds/1#01850bfd-2572-4257-b2fe-afbd13f48d04
Reviewers: atul, max, varun
Reviewed By: max
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D5861