🌱 Build/test fixes: Install protoc and protoc-gen-go (#2038)

* Install protoc in validate-projects step

The `validate-projects` Makefile target depends on compilation of all go
binaries, including the protobuf generated go binaries

* Makefile: Cron build relies on `make install` for tools deps

* Add an explicit dependency to the build-proto steps
* Remove sleep
This commit is contained in:
raghavkaul 2022-07-11 16:02:22 -04:00 committed by GitHub
parent 9fecf631c9
commit 90ed090448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -169,10 +169,6 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Sleep
run: sleep 10m # This is workaround to avoid the action failures for installing the protoc
shell: bash
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
@ -835,6 +831,10 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
version: ${{ env.PROTOC_VERSION }}
- name: Cache builds
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d #v2.1.7

View File

@ -104,9 +104,9 @@ build: $(build-targets)
build-proto: ## Compiles and generates all required protobufs
build-proto: cron/internal/data/request.pb.go cron/internal/data/metadata.pb.go
cron/internal/data/request.pb.go: cron/internal/data/request.proto | $(PROTOC)
cron/internal/data/request.pb.go: cron/internal/data/request.proto | $(PROTOC) install
protoc --go_out=../../../ cron/internal/data/request.proto
cron/internal/data/metadata.pb.go: cron/internal/data/metadata.proto | $(PROTOC)
cron/internal/data/metadata.pb.go: cron/internal/data/metadata.proto | $(PROTOC) install
protoc --go_out=../../../ cron/internal/data/metadata.proto
generate-mocks: ## Compiles and generates all mocks using mockgen.