Skip to content

Commit

Permalink
Problem: proto-gen fails in CI (#1392)
Browse files Browse the repository at this point in the history
* Problem: proto-gen fails in CI

* Apply suggestions from code review
  • Loading branch information
mmsqe authored Apr 17, 2024
1 parent cae2cd5 commit 39a0261
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
with:
PATTERNS: |
**/**.proto
- name: proto-gen
- name: proto-gen-ci
if: env.GIT_DIFF
run: |
make proto-gen # proto-swagger-gen FIXME swagger-gen result is not reproducible in CI
make proto-gen-ci # proto-swagger-gen FIXME swagger-gen result is not reproducible in CI
git checkout -- go.mod go.sum docs/api/proto-docs.md # FIXME doc gen not reproducible in CI
- name: check working directory is clean
uses: numtide/clean-git-action@main
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ endif
HTTPS_GIT := https://github.com/crypto-org-chain/cronos.git
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImageCi=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user root $(protoImageName)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

# ------
Expand All @@ -280,6 +281,10 @@ protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(pro
#
proto-all: proto-format proto-lint proto-gen

proto-gen-ci:
@echo "Generating Protobuf files"
$(protoImageCi) sh ./scripts/protocgen.sh

proto-gen:
@echo "Generating Protobuf files"
$(protoImage) sh ./scripts/protocgen.sh
Expand Down

0 comments on commit 39a0261

Please sign in to comment.