-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
158 lines (133 loc) · 3.63 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
sudo: false
services:
- docker
language: go
# go:
# - "1.x"
# - "1.8"
# - "1.10.x"
# - master
os:
- linux
matrix:
allow_failures:
- go: master
fast_finish: true
# cache:
# directories:
# # - $GOPATH/bin
# # - $GOPATH/pkg/dep
# # - $GOPATH/src/github.com/LEI/dot/dist
# - $GOPATH/src/github.com/LEI/dot/vendor
branches:
only:
- master
# https://github.com/travis-ci/travis-ci/issues/5032
before_install:
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[skip travis]"; then exit 0; fi
stages:
- build
- test
- deploy
# go run build.go vendor
install: make vendor
script: make check
# make: go run build.go vendor check install
jobs:
include:
- stage: build
# install: skip
script:
# - make build && du -sh dist/*_*/*
- make install
- dot --help
# - dot --release
- dot --version
- &base
stage: test
# This stage builds from source
# if: tag IS present # FIXME if: env(OS) != ""
# go run build.go -v vendor docker
script: make docker
skip_cleanup: true
# env: OS=debian
- <<: *base
env: OS=alpine
- <<: *base
env: OS=archlinux
- <<: *base
env: OS=centos
- <<: *base
env: OS=debian
- stage: test
# if: tag IS present
script:
- brew --version
# - (cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update)
# - brew update --quiet
# - brew upgrade --quiet # || true
- brew install --quiet gnu-sed --with-default-names
- export HOMEBREW_NO_ANALYTICS=1
- export HOMEBREW_NO_AUTO_UPDATE=1
- export HOMEBREW_NO_EMOJI=1
- if test ! -d $GOPATH/bin; then mkdir $GOPATH/bin; fi
- make # go run build.go vendor check install
# - go run build.go build:darwin
# - cp dist/darwin_amd64/dot /usr/local/bin/dot
- curl -sSL https://git.io/dotfiles.config -o $HOME/.dotrc.yml
- scripts/e2e-test.sh
env: OS=darwin
os: osx
language: go
- stage: deploy
addons:
apt:
packages:
# Goreleaser nfpm and snap pipes
- rpm
- snapd
# Graphviz dot format for deps.png
- graphviz
env:
# Needed for the snap pipe
- PATH=/snap/bin:$PATH
before_deploy:
# Needed for the snap pipe
- sudo snap install snapcraft --classic
# Build docs for Github pages
- scripts/build-docs.sh
deploy:
# Publish Github pages and coverage status
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: docs
target-branch: gh-pages
keep-history: true
fqdn: dot.lei.sh
# email: deploy@travis-ci.org
# name: Deployment Bot
committer-from-gh: true
# verbose: true
on:
repo: LEI/dot
branch: master
condition: $TRAVIS_OS_NAME = linux
# Release with goreleaser when a tag is specified
# https://goreleaser.com/ci/
- provider: script
# if: tag IS present
# script: curl -sL https://git.io/goreleaser | bash
# script: go run build.go vendor -only release
script: make release
skip_cleanup: true
on:
repo: LEI/dot
branch: docs
tags: true
condition: $TRAVIS_OS_NAME = linux
after_success:
- make coverage # go run build.go coverage
- bash <(curl -s https://codecov.io/bash)
notifications:
email: false