Skip to content

Commit dda53f3

Browse files
committedNov 1, 2020
add test of compiling protobuf file
1 parent 79b8742 commit dda53f3

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed
 

Diff for: ‎.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
# paxoskv/impl.go:12:2: no required module provides package golang.org/x/net/context; try 'go mod tidy' to add it
1313
allow_failures:
1414
- go: tip
15-
15+
install:
16+
- ./install-protoc.sh
17+
- go get github.com/golang/protobuf/protoc-gen-go
1618
script:
19+
- make gen
1720
- go test ./...

Diff for: ‎Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
gen: gen-go
23

34
gen-go:

Diff for: ‎install-protoc.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
PROTOBUF_VERSION=3.10.0
4+
PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
5+
6+
(
7+
8+
cd /home/travis
9+
10+
wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$PROTOC_FILENAME
11+
unzip $PROTOC_FILENAME
12+
bin/protoc --version
13+
14+
)

0 commit comments

Comments
 (0)
Please sign in to comment.