diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 0036992c1b..a96d055a7f 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,4 +1,3 @@ -# protobuf runs `make proto-lint` and `make proto-gen`. name: protobuf on: pull_request: @@ -32,10 +31,9 @@ jobs: fi # yamllint enable - # add this back when we start using versioning - # breakage: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - name: check-breakage - # run: make proto-check-breaking + proto-check-breaking: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: proto-check-breaking + run: make proto-check-breaking diff --git a/Makefile b/Makefile index ea12d8a2d6..54a313c499 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bu IMAGE := ghcr.io/tendermint/docker-build-proto:latest DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspace $(IMAGE) PROJECTNAME=$(shell basename "$(PWD)") +HTTPS_GIT := https://github.com/celestiaorg/celestia-app.git # process linker flags ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=celestia-app \ @@ -57,6 +58,12 @@ proto-lint: @$(DOCKER_BUF) lint --error-format=json .PHONY: proto-lint +## proto-check-breaking: Check if there are any breaking change to protobuf definitions. +proto-check-breaking: + @echo "--> Checking if Protobuf definitions have any breaking changes" + @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main +.PHONY: proto-check-breaking + ## proto-format: Format protobuf files. Requires docker. proto-format: @echo "--> Formatting Protobuf files"