Skip to content

Commit

Permalink
ci: add protoc on build
Browse files Browse the repository at this point in the history
So... this shouldn't be necessary. `protoc` is needed to build the files
in `net` like `net/lp_rpc.pb.go`. Those files are committed to the repo;
`make` shouldn't be rebuilding them. And yet, every so often, we get an
error on build that [looks like this](https://github.com/livepeer/go-livepeer/actions/runs/6630250258/job/18011282601?pr=2886):

```
protoc -I=. --go_out=plugins=grpc:. net/lp_rpc.proto
/bin/bash: line 1: protoc: command not found
make: *** [Makefile:7: net/lp_rpc.pb.go] Error 127
Error: Process completed with exit code 2.
```

I don't know why that happens. It doesn't happen once you rebuild. But...
regenerating those files is harmless, I guess, so this will stop that
for everybody forever. IDK.
  • Loading branch information
iameli committed Oct 24, 2023
1 parent d116a4c commit 57df927
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ jobs:
&& apt update \
&& apt -yqq install \
clang-12 clang-tools-12 lld-12 build-essential pkg-config autoconf git python \
gcc-multilib gcc-mingw-w64 libgcc-9-dev-arm64-cross mingw-w64-tools gcc-mingw-w64-x86-64
gcc-multilib gcc-mingw-w64 libgcc-9-dev-arm64-cross mingw-w64-tools gcc-mingw-w64-x86-64 \
protobuf-compiler
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 30 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 30 \
&& update-alternatives --install /usr/bin/ld ld /usr/bin/lld-12 30
go install github.com/golang/protobuf/[email protected]
- name: Install go modules
if: steps.go.outputs.cache-hit != 'true'
run: go mod download
Expand Down

0 comments on commit 57df927

Please sign in to comment.