Skip to content

Commit

Permalink
going to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed Apr 25, 2016
1 parent 1cfc345 commit 97501c9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
env:
- PROTOBUF_VERSION=3.0.0-beta-2

before_install:
- ./install-protobuf.sh
- PATH=/home/travis/bin:$PATH protoc --version

script:
- PATH=/home/travis/bin:$PATH make buildserverall
- echo $TRAVIS_GO_VERSION
- if [ "$TRAVIS_GO_VERSION" == 1.6 ] && [[ "$PROTOBUF_VERSION" == 3.0.0* ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi

language: go

go:
- 1.6
29 changes: 29 additions & 0 deletions install-protobuf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -ex

die() {
echo "$@" >&2
exit 1
}

case "$PROTOBUF_VERSION" in
2*)
basename=protobuf-$PROTOBUF_VERSION
;;
3*)
basename=protobuf-cpp-$PROTOBUF_VERSION
;;
*)
die "unknown protobuf version: $PROTOBUF_VERSION"
;;
esac

cd /home/travis

wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz
tar xzf $basename.tar.gz

cd protobuf-$PROTOBUF_VERSION

./configure --prefix=/home/travis && make -j2 && make install

0 comments on commit 97501c9

Please sign in to comment.