Skip to content

Commit

Permalink
check for outdated protofiles
Browse files Browse the repository at this point in the history
  • Loading branch information
agbpatro committed Nov 16, 2023
1 parent d3cd146 commit 49ae499
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 68 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,36 @@ jobs:
with:
go-version: 1.20.3

- name: Format
- name: Set up protoc
run: |
make format
wget https://github.com/protocolbuffers/protobuf/releases/download/v25.0/protoc-25.0-linux-x86_64.zip
unzip protoc-25.0-linux-x86_64.zip
sudo mv bin/protoc /usr/local/bin/protoc
sudo mv include/* /usr/local/include/
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1

- name: Generated protofiles are up to date
run: |
make generate-golang
git diff --exit-code
changed_files=$(git diff --name-only)
if [ -n "$changed_files" ]; then
echo "The following protobuf files are not updated:"
echo "$changed_files"
exit 1
fi
- name: No formatting changes
run: |
make format
changed_files=$(git diff --name-only)
if [ -n "$changed_files" ]; then
echo "The following files are not formatted:"
echo "$changed_files"
exit 1
fi
- name: Install ZMQ
run: sudo apt update -y && sudo apt upgrade -y && sudo apt install libsodium-dev libzmq3-dev
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Prometheus or a StatsD interface supporting data store for metrics. This is requ
## Protos
Data is encapsulated into protobuf messages of different types. We do not recommend making changes, but if you need to recompile them you can always do so with:

1. Install protoc, currently on version 3.21.12: https://grpc.io/docs/protoc-installation/
1. Install protoc, currently on version 25.0: https://grpc.io/docs/protoc-installation/
2. Install protoc-gen-go: `go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28`
3. Run make command
```sh
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/gorilla/websocket v1.5.0
github.com/onsi/ginkgo/v2 v2.4.0
github.com/onsi/gomega v1.24.0
github.com/pebbe/zmq4 v1.2.10
github.com/prometheus/client_golang v1.14.0
github.com/sirupsen/logrus v1.9.0
github.com/smira/go-statsd v1.3.2
Expand All @@ -36,7 +37,6 @@ require (
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pebbe/zmq4 v1.2.10 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
Expand Down
25 changes: 13 additions & 12 deletions protos/python/vehicle_alert_pb2.py

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

41 changes: 21 additions & 20 deletions protos/python/vehicle_data_pb2.py

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

29 changes: 15 additions & 14 deletions protos/python/vehicle_error_pb2.py

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

Loading

0 comments on commit 49ae499

Please sign in to comment.