Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

update proto generation and testing pipelines #358

Merged
merged 22 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
Language: Proto
BasedOnStyle: Google
IndentWidth: 2
ColumnLimit: 0
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
SpacesInSquareBrackets: true
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
24 changes: 12 additions & 12 deletions proto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# This Dockerfile defines a toolbox for use in linting, formatting, and compiling the Tendermint protos.

williambanfield marked this conversation as resolved.
Show resolved Hide resolved
FROM bufbuild/buf:latest as buf

FROM golang:1.16-alpine3.14 as builder
FROM alpine:3.14

# Install a commonly used set of programs for use with our protos.
# clang-extra-tools is included here because it provides clang-format, the program used for formatting the protos.
williambanfield marked this conversation as resolved.
Show resolved Hide resolved
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
williambanfield marked this conversation as resolved.
Show resolved Hide resolved
apk add --update --no-cache build-base clang-extra-tools curl git go && \
rm -rf /var/cache/apk/*

ENV GOLANG_PROTOBUF_VERSION=1.3.1 \
GOGO_PROTOBUF_VERSION=1.3.2

# Retrieve the go protoc programs and copy them into the PATH
RUN GO111MODULE=on go get \
github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} && \
mv /go/bin/protoc-gen-go* /usr/local/bin/


FROM alpine:3.14

RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
apk add --update --no-cache build-base clang-extra-tools curl git && \
rm -rf /var/cache/apk/*

WORKDIR /work
mv $(go env | grep GOPATH | sed 's/GOPATH="\(.*\)"/\1/g')/bin/* /usr/local/bin/
williambanfield marked this conversation as resolved.
Show resolved Hide resolved

COPY --from=builder /usr/local/bin/* /usr/local/bin/
# Copy the 'buf' program out of the buildbuf/buf container.
COPY --from=buf /usr/local/bin/* /usr/local/bin/