go-nanoarch/.travis.yml
Jean-André Santoni 0093d5d0a3
Add travis file (#3)
* Add travis file

* Add dependencies for the travis build

* Fix libopenal dependency for travis

* Add OSX support and try to fix libglfw

* Add glfw3 ppa

* Try to use before_install for linux

* Add libX11-dev

* This may fix the linux build

* Try to add all sort of checks

* This should fix megacheck

* Remove the gofmt check that is broken for some reasons

* Test for go 1.9

* I removed a useful line

* Remove go 1.10 for now
2018-04-21 14:24:27 +07:00

28 lines
842 B
YAML

language: go
go:
- "1.9"
os:
- linux
- osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ppa:keithw/glfw3 -y; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -q; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libglfw3-dev libopenal-dev xorg-dev -y; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glfw openal-soft; fi
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/)
- go get github.com/golang/lint/golint
- go get honnef.co/go/tools/cmd/megacheck
- go get github.com/fzipp/gocyclo
script:
- go test -v -race ./...
- go vet ./...
- megacheck ./...
- gocyclo -over 19 $GO_FILES
- golint -set_exit_status $(go list ./...)