-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
152 lines (152 loc) · 3.76 KB
/
config.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
version: 2
defaults: &defaults
working_directory: /go/src/github.com/pilosa/pilosa
docker:
- image: circleci/golang:1.11
fast-checkout: &fast-checkout
attach_workspace:
at: .
jobs:
setup:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- vendor-cache-{{ checksum "Gopkg.lock" }}
- run: "[ -d vendor ] || make vendor"
- save_cache:
key: vendor-cache-{{ checksum "Gopkg.lock" }}
paths:
- vendor
- persist_to_workspace:
root: .
paths: "*"
linter:
<<: *defaults
steps:
- *fast-checkout
- run: go get -u github.com/alecthomas/gometalinter
- run: gometalinter --install
- run: go get github.com/remyoudompheng/go-misc/deadcode
- run: make gometalinter
test-build-arm:
<<: *defaults
steps:
- *fast-checkout
- run: make build GOOS=linux GOARCH=arm GOARM=5
- run: make build GOOS=linux GOARCH=arm GOARM=6
- run: make build GOOS=linux GOARCH=arm GOARM=7
- run: make build GOOS=linux GOARCH=arm64
test-golang-1.11: &base-test
<<: *defaults
steps:
- *fast-checkout
- run: sudo apt-get install lsof
- run: make test
test-golang-1.11-race:
<<: *defaults
steps:
- *fast-checkout
- run: sudo apt-get install lsof
- run:
command: make test TESTFLAGS="-race -timeout=30m"
no_output_timeout: 30m
test-golang-1.11-386:
<<: *base-test
environment:
GOARCH: 386
test-golang-1.10:
<<: *base-test
docker:
- image: circleci/golang:1.10
cluster-tests:
<<: *defaults
steps:
- *fast-checkout
- setup_remote_docker
- run: make clustertests-build
prerelease:
<<: *base-test
steps:
- *fast-checkout
- run: make prerelease
- store_artifacts:
path: build
- persist_to_workspace:
root: .
paths: build
release:
<<: *defaults
steps:
- *fast-checkout
- run: make release
- store_artifacts:
path: build
- persist_to_workspace:
root: .
paths: build
prerelease-upload:
docker:
- image: circleci/python:2.7-jessie
steps:
- run: '[[ -v CIRCLE_PR_NUMBER ]] && circleci step halt || true' # Skip job if this is a PR
- *fast-checkout
- run: sudo pip install awscli
- run: make prerelease-upload
dockerhub-upload:
<<: *defaults
steps:
- run: '[[ -v CIRCLE_PR_NUMBER ]] && circleci step halt || true' # Skip job if this is a PR
- *fast-checkout
- setup_remote_docker
- run: make docker
- run: docker tag pilosa:$(git describe --tags) pilosa/pilosa:master
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: docker push pilosa/pilosa:master
workflows:
version: 2
test:
jobs:
- setup
- linter:
requires:
- setup
- test-build-arm:
requires:
- setup
- test-golang-1.11:
requires:
- setup
- test-golang-1.11-race:
requires:
- setup
- test-golang-1.11-386:
requires:
- setup
- test-golang-1.10:
requires:
- setup
- cluster-tests:
requires:
- setup
- prerelease:
requires:
- linter
- test-golang-1.11
- release:
requires:
- linter
- test-golang-1.11
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- prerelease-upload:
requires:
- prerelease
- dockerhub-upload:
requires:
- linter
- test-golang-1.11