forked from go-shiori/shiori
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (42 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: go
sudo: true
matrix:
include:
- go: 1.x
env: LATEST=true
- go: 1.9
before_install:
- 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/shurcooL/vfsgen # needed for go generate
- sudo apt install gcc-mingw-w64
install:
- go get github.com/xpgo/shiori
script:
- go generate
- go get -t -v ./...
- go vet $(go list ./... | grep -v /vendor/)
- go test -v -race ./...
# only build binaries from the latest Go release.
- if [ "${LATEST}" = "true" ]; then
env CGO_ENABLED=1 GOARCH=386 go build -v -o shiori_linux_386;
env CGO_ENABLED=1 GOARCH=amd64 go build -v -o shiori_linux_amd64;
env CGO_ENABLED=1 GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc go build -v -o shiori_windows_386.exe;
env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build -v -o shiori_windows_amd64.exe;
fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: $TOKEN
file:
- shiori_linux_386
- shiori_linux_amd64
- shiori_windows_386.exe
- shiori_windows_amd64.exe
on:
tags: true
branches:
only:
- master
condition: $LATEST = true