From 636769b83dcceafef0d21274b41a87ff3586a16b Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 03:27:16 +0900 Subject: [PATCH 1/9] Add .travis.yml --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f39380e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: go +go: + - 1.3 +env: + - "PATH=/home/travis/gopath/bin:$PATH" +before_install: + - go get github.com/mitchellh/gox + - gox -build-toolchain + - go get github.com/tcnksm/ghr + - go get github.com/axw/gocov/gocov + - go get github.com/mattn/goveralls + - go get code.google.com/p/go.tools/cmd/cover +script: + - go test -v -covermode=count -coverprofile=coverage.out ./... + - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN +after_success: + - gox -output "dist/{.OS}_{.Arch}_{.Dir}" + - ghr --username edvakf --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/ From de66aebffcd6be2a84f7ce4f262d7031512e0d1f Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 03:38:24 +0900 Subject: [PATCH 2/9] Add -m to LDFLAGS --- gov7.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gov7.go b/gov7.go index be7eaa4..c962628 100644 --- a/gov7.go +++ b/gov7.go @@ -8,6 +8,7 @@ package gov7 #include "v7/v7.c" #cgo CFLAGS: -DV7_NO_FS -DV7_LARGE_AST +#cgo LDFLAGS: -lm */ import "C" From f2f5075d87d21b0f1027248d367b47daee03eef5 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 03:40:33 +0900 Subject: [PATCH 3/9] Build with go 1.5 and tip on travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f39380e..51d283f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: go go: - - 1.3 + - 1.5 + - tip env: - "PATH=/home/travis/gopath/bin:$PATH" before_install: From 39c8f6246c496bff487d8d7ac72c78e60260ba4f Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 03:59:44 +0900 Subject: [PATCH 4/9] gox -build-toolchain no longer needed for go 1.5 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 51d283f..5a4c6b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ env: - "PATH=/home/travis/gopath/bin:$PATH" before_install: - go get github.com/mitchellh/gox - - gox -build-toolchain - go get github.com/tcnksm/ghr - go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls From 797d55eea664cfdb1c26208efb3571e9e1464f6f Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 04:01:58 +0900 Subject: [PATCH 5/9] code.google.com -> golang.org --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5a4c6b6..e17fc69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_install: - go get github.com/tcnksm/ghr - go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls - - go get code.google.com/p/go.tools/cmd/cover + - go get golang.org/x/tools/cmd/cover script: - go test -v -covermode=count -coverprofile=coverage.out ./... - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN From d841fe2a0a7ba17ec1fe55b1b4e4488c9cebe274 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 04:22:29 +0900 Subject: [PATCH 6/9] Run gox with -cgo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e17fc69..e047564 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,5 @@ script: - go test -v -covermode=count -coverprofile=coverage.out ./... - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN after_success: - - gox -output "dist/{.OS}_{.Arch}_{.Dir}" + - gox -cgo -output "dist/{.OS}_{.Arch}_{.Dir}" - ghr --username edvakf --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/ From 91610aee44100fc7203bf02eba32e54823f37ed0 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 05:13:29 +0900 Subject: [PATCH 7/9] Explicitly pass -osarch to gox --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e047564..9569f12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,5 @@ script: - go test -v -covermode=count -coverprofile=coverage.out ./... - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN after_success: - - gox -cgo -output "dist/{.OS}_{.Arch}_{.Dir}" + - gox -cgo -output "dist/{.OS}_{.Arch}_{.Dir}" -osarch "darwin/amd64 linux/amd64" - ghr --username edvakf --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/ From 20f713eae4c192a1c28a0bf9f4c3c192028043e2 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 05:13:53 +0900 Subject: [PATCH 8/9] Remove go tip for now --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9569f12..ffdefcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: go go: - 1.5 - - tip env: - "PATH=/home/travis/gopath/bin:$PATH" before_install: From a2c7a943d30baf2829b50c2758e05c8086f1b7f3 Mon Sep 17 00:00:00 2001 From: Atsushi Takayama Date: Thu, 3 Sep 2015 05:28:42 +0900 Subject: [PATCH 9/9] Use GIMME_OS and GIMME_ARCH --- .travis.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffdefcc..3f943ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,16 +2,15 @@ language: go go: - 1.5 env: - - "PATH=/home/travis/gopath/bin:$PATH" + - GIMME_OS=linux GIMME_ARCH=amd64 + - GIMME_OS=darwin GIMME_ARCH=amd64 + - GIMME_OS=windows GIMME_ARCH=amd64 + - GIMME_OS=linux GIMME_ARCH=arm GOARM=6 + - GIMME_OS=linux GIMME_ARCH=arm GOARM=7 before_install: - - go get github.com/mitchellh/gox - - go get github.com/tcnksm/ghr - go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - go test -v -covermode=count -coverprofile=coverage.out ./... - - goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN -after_success: - - gox -cgo -output "dist/{.OS}_{.Arch}_{.Dir}" -osarch "darwin/amd64 linux/amd64" - - ghr --username edvakf --token $GITHUB_TOKEN --replace --prerelease --debug pre-release dist/ + - $GOPATH/bin/goveralls -coverprofile=coverage.out -service travis-ci -repotoken $COVERALLS_TOKEN