Skip to content

Commit e621cd1

Browse files
author
Kazuyoshi Kato
committed
Run Protobuild in GitHub Actions
Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 35cd240 commit e621cd1

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,55 @@ jobs:
7575
- name: Codecov
7676
run: bash <(curl -s https://codecov.io/bash)
7777
working-directory: src/github.com/containerd/ttrpc
78+
79+
protobuild:
80+
name: Run Protobuild
81+
runs-on: ubuntu-20.04
82+
timeout-minutes: 5
83+
steps:
84+
85+
- name: Set up Go 1.17
86+
uses: actions/setup-go@v2
87+
with:
88+
go-version: 1.17
89+
id: go
90+
91+
- name: Setup Go binary path
92+
shell: bash
93+
run: |
94+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
95+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
96+
97+
- name: Check out code
98+
uses: actions/checkout@v2
99+
with:
100+
path: src/github.com/containerd/ttrpc
101+
fetch-depth: 25
102+
103+
- name: Install protoc
104+
run: |
105+
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.5.0/protoc-3.5.0-linux-x86_64.zip
106+
sudo unzip -x protoc-3.5.0-linux-x86_64.zip -d /usr/local
107+
sudo chmod -R go+rX /usr/local/include
108+
sudo chmod go+x /usr/local/bin/protoc
109+
110+
- name: Install gogo/protobuf
111+
run: |
112+
cd $GOPATH/src
113+
mkdir -p github.com/gogo
114+
cd github.com/gogo
115+
git clone --depth 1 --branch v1.3.2 https://github.com/gogo/protobuf
116+
117+
- name: Build protoc-gen-gogottrpc
118+
working-directory: src/github.com/containerd/ttrpc
119+
run: |
120+
go build ./cmd/protoc-gen-gogottrpc
121+
122+
- name: Run Protobuild
123+
working-directory: src/github.com/containerd/ttrpc
124+
run: |
125+
export PATH=$GOPATH/bin:$PWD:$PATH
126+
go install github.com/containerd/protobuild@7e5ee24bc1f70e9e289fef15e2631eb3491320bf
127+
cd example
128+
protobuild
129+
git diff --exit-code

0 commit comments

Comments
 (0)