Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: regenerate proto files for v3 #1673

Merged
merged 16 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
# lint:
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - uses: bufbuild/[email protected]
# - uses: bufbuild/buf-lint-action@v1
# with:
# input: "proto"

break-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto"

validate-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.20.5

- name: export PATH
run: export PATH=$PATH:/go:/go/bin:$(go env GOPATH)/bin:/usr/local:`pwd`:/home/runner/work/lava/lava/
- name: export GOPATH
run: export GOPATH=$GOPATH:$(go env GOPATH):/go:/go/lava:/usr/local:`pwd`

- name: install grpc gateway
run: |
git clone https://github.com/grpc-ecosystem/grpc-gateway -b v1.16.0
cd grpc-gateway
go mod download
go install \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
github.com/golang/protobuf/protoc-gen-go
cd ..
rm -rf grpc-gateway

- name: install buf
run: |
BIN="/usr/local/bin" && \
VERSION="1.25.0" && \
curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" \
-o "${BIN}/buf" && \
chmod +x "${BIN}/buf"

- name: install proto cosmos
run: |
git clone https://github.com/cosmos/gogoproto.git -b v1.4.9
cd gogoproto
go mod download
make install
cd ..
rm -rf gogoproto

- name: generate proto
run: |
./scripts/protocgen.sh

- name: Check for differences
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Error: The generated .pb.go files are not up to date."
git diff
exit 1
fi
shell: bash



14 changes: 13 additions & 1 deletion scripts/init_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ if ! $jq_installed; then
fi

############################# BUF INSTALLATION ######################################
if ! command_exists protoc-gen-grpc-gateway; then
git clone https://github.com/grpc-ecosystem/grpc-gateway -b v1.16.0
cd grpc-gateway
go mod download
go install \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
github.com/golang/protobuf/protoc-gen-go
cd ..
rm -rf grpc-gateway
fi


if ! command_exists buf; then
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down Expand Up @@ -73,7 +85,7 @@ else
fi

if ! command_exists protoc-gen-gocosmos; then
git clone https://github.com/cosmos/gogoproto.git
git clone https://github.com/cosmos/gogoproto.git -b v1.4.9
cd gogoproto
go mod download
make install
Expand Down
48 changes: 24 additions & 24 deletions x/conflict/types/conflict_data.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 27 additions & 27 deletions x/conflict/types/conflict_vote.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/conflict/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/conflict/types/params.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions x/conflict/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading