File tree 6 files changed +24
-21
lines changed
6 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 21
21
# Breaking changes are managed by the rpcchainvm protocol version.
22
22
breaking : false
23
23
token : ${{ secrets.BUF_TOKEN }}
24
+ # This version should match the version installed in the nix dev shell
24
25
version : 1.47.2
Original file line number Diff line number Diff line change @@ -150,18 +150,17 @@ jobs:
150
150
# which is never desirable for this job. The buf-push job is
151
151
# responsible for pushes.
152
152
push : false
153
+ # This version should match the version installed in the nix dev shell
153
154
version : 1.47.2
154
155
check_generated_protobuf :
155
156
name : Up-to-date protobuf
156
157
runs-on : ubuntu-latest
157
158
steps :
158
159
- uses : actions/checkout@v4
159
160
- uses : ./.github/actions/setup-go-for-project
160
- - uses : bufbuild/buf-action@1b8e0a0e793562b7850d7e6ff0228b5c0b16111c # v1.1.0
161
- with :
162
- setup_only : true
163
- version : 1.47.2
164
- - shell : bash
161
+ # Use the dev shell instead of bufbuild/buf-action to ensure the dev shell provides the expected versions
162
+ - uses : ./.github/actions/install-nix
163
+ - shell : nix develop --command bash -x {0}
165
164
run : scripts/protobuf_codegen.sh
166
165
- shell : bash
167
166
run : .github/workflows/check-clean-branch.sh
Original file line number Diff line number Diff line change 8
8
9
9
# Flake inputs
10
10
inputs = {
11
- nixpkgs . url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405 .*.tar.gz" ;
11
+ nixpkgs . url = "https://flakehub.com/f/NixOS/nixpkgs/0.2411 .*.tar.gz" ;
12
12
} ;
13
13
14
14
# Flake outputs
45
45
46
46
# Linters
47
47
shellcheck
48
+
49
+ # Protobuf
50
+ buf
51
+ protoc-gen-go
52
+ protoc-gen-go-grpc
48
53
] ++ lib . optionals stdenv . isDarwin [
49
54
# macOS-specific frameworks
50
55
darwin . apple_sdk . frameworks . Security
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ breaking:
9
9
use :
10
10
- FILE
11
11
deps :
12
- - buf.build/prometheus/client-model
12
+ - buf.build/prometheus/client-model
13
13
lint :
14
14
use :
15
- - DEFAULT
15
+ - STANDARD
16
16
except :
17
17
- SERVICE_SUFFIX # service requirement of <name>+Service
18
18
- RPC_REQUEST_STANDARD_NAME # explicit <rpc>+Request naming
24
24
- aliasreader/aliasreader.proto
25
25
- net/conn/conn.proto
26
26
# allows RPC requests or responses to be google.protobuf.Empty messages. This can be set if you
27
- # want to allow messages to be void forever, that is they will never take any parameters.
27
+ # want to allow messages to be void forever, that is they will never take any parameters.
28
28
rpc_allow_google_protobuf_empty_requests : true
29
29
rpc_allow_google_protobuf_empty_responses : true
30
30
# allows the same message type to be used for a single RPC's request and response type.
Original file line number Diff line number Diff line change @@ -7,27 +7,25 @@ if ! [[ "$0" =~ scripts/protobuf_codegen.sh ]]; then
7
7
exit 255
8
8
fi
9
9
10
+ # the versions here should match those of the binaries installed in the nix dev shell
11
+
10
12
# # ensure the correct version of "buf" is installed
11
13
BUF_VERSION=' 1.47.2'
12
14
if [[ $( buf --version | cut -f2 -d' ' ) != " ${BUF_VERSION} " ]]; then
13
15
echo " could not find buf ${BUF_VERSION} , is it installed + in PATH?"
14
16
exit 255
15
17
fi
16
18
17
- # # install "protoc-gen-go"
19
+ # # ensure the correct version of "protoc-gen-go" is installed
18
20
PROTOC_GEN_GO_VERSION=' v1.35.1'
19
- go install -v google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION}
20
21
if [[ $( protoc-gen-go --version | cut -f2 -d' ' ) != " ${PROTOC_GEN_GO_VERSION} " ]]; then
21
- # e.g., protoc-gen-go v1.28.1
22
22
echo " could not find protoc-gen-go ${PROTOC_GEN_GO_VERSION} , is it installed + in PATH?"
23
23
exit 255
24
24
fi
25
25
26
- # ## install "protoc-gen-go-grpc"
26
+ # # ensure the correct version of "protoc-gen-go-grpc" is installed
27
27
PROTOC_GEN_GO_GRPC_VERSION=' 1.3.0'
28
- go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION}
29
28
if [[ $( protoc-gen-go-grpc --version | cut -f2 -d' ' ) != " ${PROTOC_GEN_GO_GRPC_VERSION} " ]]; then
30
- # e.g., protoc-gen-go-grpc 1.3.0
31
29
echo " could not find protoc-gen-go-grpc ${PROTOC_GEN_GO_GRPC_VERSION} , is it installed + in PATH?"
32
30
exit 255
33
31
fi
You can’t perform that action at this time.
0 commit comments