-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use container-based infrastructure of Travis * Avoid building protoc every time * Avoid building `go tool vet`
- Loading branch information
Showing
2 changed files
with
38 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh -eu | ||
protoc_version=$1 | ||
if test -z "${protoc_version}"; then | ||
echo "Usage: .travis.build-protoc.sh protoc-version" | ||
exit 1 | ||
fi | ||
if ! $HOME/local/bin/protoc-${protoc_version} --version 2>/dev/null; then | ||
rm -rf $HOME/local | ||
|
||
wget https://github.com/google/protobuf/archive/v${protoc_version}.tar.gz | ||
tar xvzf v${protoc_version}.tar.gz | ||
cd protobuf-${protoc_version} | ||
./autogen.sh | ||
./configure --prefix=$HOME/local --program-suffix=-${protoc_version} | ||
make -j 4 | ||
make install | ||
fi | ||
ln -sf $HOME/local/bin/protoc-${protoc_version} $HOME/local/bin/protoc | ||
|
||
echo \$ $HOME/local/bin/protoc --version | ||
$HOME/local/bin/protoc --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
branches: | ||
only: | ||
- master | ||
language: go | ||
|
||
sudo: false | ||
go: | ||
- 1.3 | ||
- tip | ||
cache: | ||
directories: | ||
- $HOME/local | ||
before_install: | ||
- cd /tmp | ||
- wget https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | ||
- tar xvzf v3.0.0-alpha-2.tar.gz | ||
- cd protobuf-3.0.0-alpha-2 | ||
- ./autogen.sh | ||
- ./configure | ||
- make | ||
- sudo make install | ||
- ./.travis.build-protoc.sh 3.0.0-alpha-2 | ||
- go get github.com/golang/lint/golint | ||
- go get golang.org/x/tools/cmd/vet | ||
install: | ||
- go get github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway | ||
script: | ||
- make examples | ||
- test -z "$(git -C $GOPATH/src/github.com/gengo/grpc-gateway status --porcelain)" | ||
- go test -v github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway/... --logtostderr | ||
- golint github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway | ||
- golint github.com/gengo/grpc-gateway/runtime | ||
- go tool vet $GOPATH/src/github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway | ||
- go tool vet $GOPATH/src/github.com/gengo/grpc-gateway/runtime | ||
- golint github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway/... | ||
- golint github.com/gengo/grpc-gateway/runtime/... | ||
- golint github.com/gengo/grpc-gateway/utilities/... | ||
- go vet github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway/... | ||
- go vet github.com/gengo/grpc-gateway/runtime/... | ||
- go vet github.com/gengo/grpc-gateway/utilities/... | ||
env: | ||
global: | ||
- "PATH=$PATH:$HOME/local/bin" |