protobuf/.travis.yml
Tim Swast 7e31c4d930 Add a Go language example.
This follows the other examples so that it can be used as a tutorial,
such as the ones at:
  https://developers.google.com/protocol-buffers/docs/tutorials

Even though Go generally does not use Makefiles, I added targets for the
Go examples to be consistent with the other languages.

Edit:

Fix Travis run. Change to use $HOME instead of ~. Add protoc to path.
GOPATH entry cannot start with shell metacharacter '~': "~/gocode"

Edit(2):

Fix Go code style to address comments.
2015-11-25 10:46:35 -08:00

75 lines
2.1 KiB
YAML

sudo: required
# Note: travis currently does not support listing more than one language so
# this cheats and claims to only be cpp. If they add multiple language
# support, this should probably get updated to install steps and/or
# rvm/gemfile/jdk/etc. entries rather than manually doing the work.
language: cpp
os:
- linux
- osx
# The Objective C build needs Xcode 6.4 or later.
osx_image: xcode7.1
script:
- ./travis.sh $CONFIG
env:
- CONFIG=cpp
- CONFIG=cpp_distcheck
- CONFIG=csharp
- CONFIG=golang
- CONFIG=java_jdk6
- CONFIG=java_jdk7
- CONFIG=java_oracle7
- CONFIG=javanano_jdk6
- CONFIG=javanano_jdk7
- CONFIG=javanano_oracle7
- CONFIG=python
- CONFIG=python_cpp
- CONFIG=ruby19
- CONFIG=ruby20
- CONFIG=ruby21
- CONFIG=ruby22
- CONFIG=jruby
matrix:
exclude:
# It's nontrivial to programmatically install a new JDK from the command
# line on OS X, so we rely on testing on Linux for Java code.
- os: osx
env: CONFIG=java_jdk6
- os: osx
env: CONFIG=java_jdk7
- os: osx
env: CONFIG=java_oracle7
- os: osx
env: CONFIG=javanano_jdk6
- os: osx
env: CONFIG=javanano_jdk7
- os: osx
env: CONFIG=javanano_oracle7
# Requires installing mono, currently travis.sh is doing that with apt-get
# which doesn't work on OS X.
- os: osx
env: CONFIG=csharp
# Requires installing golang, currently travis.sh is doing that with apt-get
# which doesn't work on OS X.
- os: osx
env: CONFIG=golang
# Add into the matrix OS X tests of Objective C (needs Xcode, so it won't
# work on other platforms). These are split so it doesn't take as long to run.
include:
- os: osx
env: CONFIG=objectivec_ios
- os: osx
env: CONFIG=objectivec_osx
allow_failures:
# These currently do not work on OS X but are being worked on by @haberman.
- os: osx
env: CONFIG=ruby22
- os: osx
env: CONFIG=jruby
# Travis seems be flaky in letting the iOS simulator launch, so keep that
# flake from failing builds by marking that build as an allowed failure.
- os: osx
env: CONFIG=objectivec_ios
notifications:
email: false