-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: regenerate proto files for v3 (#1673)
* regenerate proto files for v3 * add proto workflow * on every pr * temp * remove branch * move folder * remove lint * use specific tag * add tag * more * more * add go path * done * test * undo test * fix init_install --------- Co-authored-by: Yarom Swisa <[email protected] git config --global user.name Yarom>
- Loading branch information
Showing
77 changed files
with
1,642 additions
and
1,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.