forked from 33cn/plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
208 lines (186 loc) · 3.96 KB
/
.gitlab-ci.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#image: chain33-build:latest
before_script:
- export GO_PROJECT_NAMESPACE="$GOPATH/src/gitlab.33.cn/$CI_PROJECT_NAMESPACE"
- echo $GO_PROJECT_NAMESPACE
- mkdir -p $GO_PROJECT_NAMESPACE
- ln -srf $(pwd) $GO_PROJECT_NAMESPACE
- export GO_PROJECT_PATH="$GO_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
- echo $GO_PROJECT_PATH
- cd $GO_PROJECT_PATH
- make clean
after_script:
- make clean
stages:
- build
- test
- deploy
- fork_test
- autotest
go_fmt:
stage: build
tags:
- 33cn
script:
- make checkgofmt
- make fmt
only:
- master
- bty_develop
go_lint:
stage: build
tags:
- 33cn
script:
- make linter
only:
- master
- bty_develop
go_test:
stage: test
tags:
- 33cn
script:
- make docker-compose-down dapp=all
- make test
only:
- master
- bty_develop
#memory_sanitizer:
# stage: test
# script:
# - export CC=clang-5.0 && make msan
# only:
# - master
# - develop
# - bty_develop
#code_coverage_report:
# stage: test
# script:
# - make coverhtml
# only:
# - master
# - develop
# - bty_develop
deploy:
stage: deploy
tags:
- 33cn
script:
- make build_ci
- make docker-compose
- make docker-compose-down
only:
- master
- bty_develop
deploy_relay:
stage: deploy
tags:
- 33cn
script:
- make build_ci
- make docker-compose proj=relay dapp=relay
- make docker-compose-down proj=relay dapp=relay
only:
- master
deploy_paracross:
stage: deploy
tags:
- 33cn
script:
- make build_ci
- make docker-compose proj=paracross dapp=paracross
- make docker-compose-down proj=paracross dapp=paracross
only:
- master
code_coverage:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make coverage
- fi
only:
- master
- bty_develop
fork_test:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make fork-test
- make docker-compose-down
- fi
only:
- master
- forkTest
fork_test_privacy:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make fork-test proj=privacy dapp=privacy
- make docker-compose-down proj=privacy dapp=privacy
- fi
only:
- master
- forkTest
fork_test_paracross:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make fork-test proj=paracross dapp=paracross
- make docker-compose-down proj=paracross dapp=paracross
- fi
only:
- master
- forkTest
##serial run all dapp
fork_test_all:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make fork-test proj=fork dapp=all
- make docker-compose-down proj=fork dapp=all
- fi
only:
- master
- forkTest
##serial run all dapp
deploy_test_all:
stage: fork_test
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make docker-compose proj=deploy dapp=all
- make docker-compose-down proj=deploy dapp=all
- fi
only:
- master
- forkTest
autotest:
stage: autotest
tags:
- 33cn
script:
- if [ -n "${onceEveryday}" ]; then
- make build_ci
- make autotest
- cd build/tools/autotest && ./run-autotest.sh build
- cd $GO_PROJECT_PATH
- fi
when: always
only:
- master