From 57df9277a7fbe5c3cd0ed85ea8d606e3777fc6e0 Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Tue, 24 Oct 2023 14:52:45 -0700 Subject: [PATCH] ci: add protoc on build 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. --- .github/workflows/build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 491a35a218..b9e53780df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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/protoc-gen-go@v1.3.5 + - name: Install go modules if: steps.go.outputs.cache-hit != 'true' run: go mod download