Skip to content

Commit 90ed090

Browse files
author
raghavkaul
authored
🌱 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
1 parent 9fecf63 commit 90ed090

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ jobs:
169169
with:
170170
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
171171

172-
- name: Sleep
173-
run: sleep 10m # This is workaround to avoid the action failures for installing the protoc
174-
shell: bash
175-
176172
- name: Install Protoc
177173
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
178174
with:
@@ -835,6 +831,10 @@ jobs:
835831
with:
836832
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
837833

834+
- name: Install Protoc
835+
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
836+
with:
837+
version: ${{ env.PROTOC_VERSION }}
838838
- name: Cache builds
839839
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
840840
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d #v2.1.7

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ build: $(build-targets)
104104

105105
build-proto: ## Compiles and generates all required protobufs
106106
build-proto: cron/internal/data/request.pb.go cron/internal/data/metadata.pb.go
107-
cron/internal/data/request.pb.go: cron/internal/data/request.proto | $(PROTOC)
107+
cron/internal/data/request.pb.go: cron/internal/data/request.proto | $(PROTOC) install
108108
protoc --go_out=../../../ cron/internal/data/request.proto
109-
cron/internal/data/metadata.pb.go: cron/internal/data/metadata.proto | $(PROTOC)
109+
cron/internal/data/metadata.pb.go: cron/internal/data/metadata.proto | $(PROTOC) install
110110
protoc --go_out=../../../ cron/internal/data/metadata.proto
111111

112112
generate-mocks: ## Compiles and generates all mocks using mockgen.

0 commit comments

Comments
 (0)