shiori/.travis.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2018-03-03 22:33:29 +08:00
language: go
2018-06-08 12:10:56 +08:00
sudo: true
2018-03-03 22:33:29 +08:00
matrix:
include:
- go: 1.x
env: LATEST=true
- go: 1.9
before_install:
2018-03-12 17:01:32 +08:00
- go get github.com/mattn/go-isatty # needed for progress bar in windows
2018-03-03 22:33:29 +08:00
- go get github.com/inconshreveable/mousetrap # needed for windows builds
2018-06-08 13:26:48 +08:00
- go get github.com/shurcooL/vfsgen # needed for go generate
2018-06-08 12:10:56 +08:00
- sudo apt install gcc-mingw-w64
2018-03-03 22:33:29 +08:00
install:
- go get github.com/RadhiFadlillah/shiori
script:
2018-06-08 12:10:56 +08:00
- go generate
2018-03-03 22:33:29 +08:00
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d .)
- go vet $(go list ./... | grep -v /vendor/)
- go test -v -race ./...
# only build binaries from the latest Go release.
2018-06-08 12:10:56 +08:00
- 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
2018-03-03 22:33:29 +08:00
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: $TOKEN
file:
2018-06-08 12:10:56 +08:00
- shiori_linux_386
2018-03-03 22:33:29 +08:00
- shiori_linux_amd64
2018-06-08 12:10:56 +08:00
- shiori_windows_386.exe
- shiori_windows_amd64.exe
2018-03-03 22:33:29 +08:00
on:
tags: true
branches:
only:
- master
condition: $LATEST = true