File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 17
17
- name : Run license check
18
18
run : |
19
19
./dev/license-check.sh
20
+
21
+ check-generated-code :
22
+ name : Check generated code
23
+ runs-on : ubuntu-latest
24
+ container :
25
+ image : swift:latest
26
+ steps :
27
+ - name : Checkout repository
28
+ uses : actions/checkout@v4
29
+ with :
30
+ persist-credentials : false
31
+ - name : Mark the workspace as safe
32
+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
33
+ - name : Install protoc
34
+ run : apt update && apt install -y protobuf-compiler
35
+ - name : Check generated code
36
+ run : |
37
+ ./dev/check-generated-code.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # # Copyright 2024, gRPC Authors All rights reserved.
3
+ # #
4
+ # # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # # you may not use this file except in compliance with the License.
6
+ # # You may obtain a copy of the License at
7
+ # #
8
+ # # http://www.apache.org/licenses/LICENSE-2.0
9
+ # #
10
+ # # Unless required by applicable law or agreed to in writing, software
11
+ # # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # # See the License for the specific language governing permissions and
14
+ # # limitations under the License.
15
+
16
+ set -euo pipefail
17
+
18
+ log () { printf -- " ** %s\n" " $* " >&2 ; }
19
+ error () { printf -- " ** ERROR: %s\n" " $* " >&2 ; }
20
+ fatal () { error " $@ " ; exit 1; }
21
+
22
+ here=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
23
+
24
+ # Re-generate everything.
25
+ log " Regenerating protos..."
26
+ " $here " /protos/generate.sh
27
+
28
+ # Check for changes.
29
+ GIT_PAGER=' ' git diff --exit-code ' *.swift'
30
+
31
+ log " Generated code is up-to-date"
You can’t perform that action at this time.
0 commit comments