diff options
author | Feng Xiao <xiaofeng@google.com> | 2015-11-30 13:43:56 -0800 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2015-11-30 13:43:56 -0800 |
commit | 1a59a715dc5fa584340197aac0811ba3de9850b5 (patch) | |
tree | 054a47a347534b6bdb31dcf08b24f7cc07f5669e /travis.sh | |
parent | f4e4be638634b74cbc9be10150bd8bf7a6cb4e8d (diff) | |
parent | 7e31c4d930efa3f80d0f03c93e788ba73b847fd8 (diff) | |
download | protobuf-1a59a715dc5fa584340197aac0811ba3de9850b5.tar.gz protobuf-1a59a715dc5fa584340197aac0811ba3de9850b5.tar.bz2 protobuf-1a59a715dc5fa584340197aac0811ba3de9850b5.zip |
Merge pull request #998 from tswast/goexample
Add a Go language example.
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -47,6 +47,24 @@ build_csharp() { cd conformance && make test_csharp && cd .. } +build_golang() { + # Go build needs `protoc`. + internal_build_cpp + # Add protoc to the path so that the examples build finds it. + export PATH="`pwd`/src:$PATH" + + # Install Go and the Go protobuf compiler plugin. + sudo apt-get update -qq + sudo apt-get install -qq golang + export GOPATH="$HOME/gocode" + mkdir -p "$GOPATH/src/github.com/google" + ln -s "`pwd`" "$GOPATH/src/github.com/google/protobuf" + export PATH="$GOPATH/bin:$PATH" + go get github.com/golang/protobuf/protoc-gen-go + + cd examples && make gotest && cd .. +} + use_java() { version=$1 case "$version" in |