Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated BESS protobuf files. #97

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout and build
- uses: actions/checkout@master
- uses: actions/checkout@main
- name: Build the Docker image
run: |
make docker-build

- name: Generate bess_pb
run: |
make pb

# Format the code
- name: Clang Format
run: |
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ RUN apt-get update && \

COPY --from=cpiface-build /bin/zmq-cpiface /bin

# Stage build bess golang pb
FROM golang AS protoc-gen
RUN go get github.com/golang/protobuf/protoc-gen-go

FROM bess-build AS go-pb
COPY --from=protoc-gen /go/bin/protoc-gen-go /bin
RUN mkdir /bess_pb && \
protoc -I /usr/include -I /protobuf/ \
/protobuf/*.proto /protobuf/ports/*.proto \
--go_out=plugins=grpc:/bess_pb

FROM golang AS pfcpiface-build
WORKDIR /pfcpiface
COPY pfcpiface .
Expand All @@ -131,3 +142,4 @@ COPY --from=bess /bin/bessd /
COPY --from=cpiface /bin/zmq-cpiface /
COPY --from=pfcpiface /bin/pfcpiface /
COPY --from=bess-build /protobuf /protobuf
COPY --from=go-pb /bess_pb /bess_pb
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,9 @@ output:
.;

# Golang grpc/protobuf generation
PROTOS += output/protobuf/*.proto
PROTOS += output/protobuf/ports/*.proto

PROTO_INC += -I /usr/include
PROTO_INC += -I output/protobuf/

BESS_PB_DIR ?= pfcpiface/bess_pb
BESS_PB_DIR ?= pfcpiface

pb: output
protoc ${PROTO_INC} ${PROTOS} --go_out=plugins=grpc:${BESS_PB_DIR}
cp -a output/bess_pb ${BESS_PB_DIR}

.PHONY: docker-build docker-push output pb
2 changes: 1 addition & 1 deletion pfcpiface/bess_pb/bess_msg.pb.go

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

2 changes: 1 addition & 1 deletion pfcpiface/bess_pb/error.pb.go

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

24 changes: 13 additions & 11 deletions pfcpiface/bess_pb/module_msg.pb.go

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

2 changes: 1 addition & 1 deletion pfcpiface/bess_pb/ports/port_msg.pb.go

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

2 changes: 1 addition & 1 deletion pfcpiface/bess_pb/service.pb.go

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

2 changes: 1 addition & 1 deletion pfcpiface/bess_pb/util_msg.pb.go

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