mirror of
https://github.com/go-shiori/shiori.git
synced 2024-11-16 14:16:29 +08:00
Update travis
This commit is contained in:
parent
4deed23fd4
commit
944f401109
1 changed files with 12 additions and 6 deletions
18
.travis.yml
18
.travis.yml
|
@ -1,27 +1,32 @@
|
||||||
language: go
|
language: go
|
||||||
sudo: false
|
sudo: true
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- go: 1.x
|
- go: 1.x
|
||||||
env: LATEST=true
|
env: LATEST=true
|
||||||
- go: 1.9
|
- go: 1.9
|
||||||
- go: 1.8
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- go get github.com/mitchellh/gox # go tool for cross compiling
|
|
||||||
- go get github.com/mattn/go-isatty # needed for progress bar in windows
|
- go get github.com/mattn/go-isatty # needed for progress bar in windows
|
||||||
- go get github.com/inconshreveable/mousetrap # needed for windows builds
|
- go get github.com/inconshreveable/mousetrap # needed for windows builds
|
||||||
|
- sudo apt install gcc-mingw-w64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- go get github.com/RadhiFadlillah/shiori
|
- go get github.com/RadhiFadlillah/shiori
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- go generate
|
||||||
- go get -t -v ./...
|
- go get -t -v ./...
|
||||||
- diff -u <(echo -n) <(gofmt -d .)
|
- diff -u <(echo -n) <(gofmt -d .)
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
- go test -v -race ./...
|
- go test -v -race ./...
|
||||||
# only build binaries from the latest Go release.
|
# only build binaries from the latest Go release.
|
||||||
- if [ "${LATEST}" = "true" ]; then gox -os="linux darwin windows" -arch="amd64" -output "shiori_{{.OS}}_{{.Arch}}" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./...; fi
|
- if [ "${LATEST}" = "true" ]; then
|
||||||
|
env GOARCH=386 go build -o shiori_linux_386;
|
||||||
|
env GOARCH=amd64 go build -o shiori_linux_amd64;
|
||||||
|
env GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc go build -o shiori_windows_386.exe;
|
||||||
|
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build -o shiori_windows_amd64.exe;
|
||||||
|
fi
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
|
@ -29,9 +34,10 @@ deploy:
|
||||||
api_key:
|
api_key:
|
||||||
secure: $TOKEN
|
secure: $TOKEN
|
||||||
file:
|
file:
|
||||||
- shiori_windows_amd64.exe
|
- shiori_linux_386
|
||||||
- shiori_darwin_amd64
|
|
||||||
- shiori_linux_amd64
|
- shiori_linux_amd64
|
||||||
|
- shiori_windows_386.exe
|
||||||
|
- shiori_windows_amd64.exe
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
branches:
|
branches:
|
||||||
|
|
Loading…
Reference in a new issue