Skip to content

Commit

Permalink
Run Protobuild on GitHub Actions
Browse files Browse the repository at this point in the history
containerd is planning to migrate off from github.com/gogo/protobuf
which will affect hcsshim.

Before that, this commit runs Protobuild in GitHub Actions to
make sure all generated files are reproducible from .proto files.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
  • Loading branch information
kzys committed Feb 22, 2022
1 parent 12b02a1 commit 543c127
Show file tree
Hide file tree
Showing 11 changed files with 3,700 additions and 3,732 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ env:
GOPROXY: off

jobs:
proto:
runs-on: 'windows-2019'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.15.0'

# TODO install protoc-gen-gogoctrd
- name: Run Protobuild
shell: bash
run: |
go install github.com/containerd/protobuild@7e5ee24bc1f70e9e289fef15e2631eb3491320bf
protobuild $(go list ./... | grep -v /vendor/)
git diff --exit-code
lint:
runs-on: 'windows-2019'
steps:
Expand Down
6 changes: 1 addition & 5 deletions Protobuild.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
version = "unstable"
version = "1"
generator = "gogoctrd"
plugins = ["grpc", "fieldpath"]

# Control protoc include paths. Below are usually some good defaults, but feel
# free to try it without them if it works for your project.
[includes]
# Include paths that will be added before all others. Typically, you want to
# treat the root of the project as an include, but this may not be necessary.
before = ["./protobuf"]

# Paths that should be treated as include roots in relation to the vendor
# directory. These will be calculated with the vendor directory nearest the
# target package.
Expand Down
Loading

0 comments on commit 543c127

Please sign in to comment.