language: go

go:
  - 1.4
  - tip

before_install:
  - mkdir -p $HOME/gopath/src/sourcegraph.com/sourcegraph
  - mv $TRAVIS_BUILD_DIR $HOME/gopath/src/sourcegraph.com/sourcegraph/go-sourcegraph
  - export TRAVIS_BUILD_DIR=$HOME/gopath/src/sourcegraph.com/sourcegraph/go-sourcegraph

install:
  - go get -t -d -v ./... && go build -v ./...

language: go

go:
  - 1.5
  - tip

matrix:
  allow_failures:
    - go: tip
  fast_finish: true

before_install:
  - mkdir -p $HOME/gopath/src/sourcegraph.com/sourcegraph
  - mv $TRAVIS_BUILD_DIR $HOME/gopath/src/sourcegraph.com/sourcegraph/go-sourcegraph
  - export TRAVIS_BUILD_DIR=$HOME/gopath/src/sourcegraph.com/sourcegraph/go-sourcegraph

install:
  - go get -t -d -v ./...

script:
  - go build -v ./...

Use Go 1.5; make tip allowed failure with fast finish.
Travis: Use Go 1.5; make tip allowed failure with fast finish.

Move build step into script; keep downloading dependencies as an install step. This means if a dependency fails to be installed, the build will be classified as an build error. But if building the library itself fails, that's classified as a build failure.