-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
371 lines (330 loc) · 12.5 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
stages:
- genLicense
- checkLicense
- build_sample
- build_module
- build_master
- build_feature
- clean_build
- plainPW_check
- oss
- cov
- fossid
- release_customize_sdk
genLicense:
variables:
CODE_COMPILE_ARCH: 'TC32'
COV_PF_CATALOG: 'BLE'
stage: genLicense
tags:
- LINUX
before_script:
script:
- date
- generat_license_list
- date
artifacts:
paths:
- "license_list_gen.txt"
- "no_license_list_gen.txt"
- "mismatch_license_file_gen.txt"
when: manual
checkLicense:
variables:
CODE_COMPILE_ARCH: 'TC32'
COV_PF_CATALOG: 'BLE'
stage: checkLicense
tags:
- LINUX
allow_failure: yes
before_script:
script:
- date
- check_license
#- generat_license_list # For no license files
- date
artifacts:
when: always
paths:
- "mismatch_license.txt"
- "no_license*.txt"
- "unknow_type_file.txt"
build_sample:
stage: build_sample
tags:
- LINUX
- TC32
before_script:
script:
- which tc32-elf-gcc
- chmod +x b80_ble_sdk/*.sh
- date
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_ble_sample
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_ble_sample
- date
build_module:
stage: build_module
tags:
- LINUX
- TC32
before_script:
script:
- which tc32-elf-gcc
- chmod +x b80_ble_sdk/*.sh
- date
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_module
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_module
- date
build_master:
stage: build_master
tags:
- LINUX
- TC32
before_script:
script:
- which tc32-elf-gcc
- chmod +x b80_ble_sdk/*.sh
- date
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_master
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_master
- date
build_feature:
stage: build_feature
tags:
- LINUX
- TC32
before_script:
script:
- which tc32-elf-gcc
- chmod +x b80_ble_sdk/*.sh
- date
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_ADVERTISING_IN_CONN_SLAVE_ROLE'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_SCANNING_IN_ADV_AND_CONN_SLAVE_ROLE'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_POWER_ADV'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_GATT_SECURITY'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_LL_DATA_LENGTH_EXTENSION_SLAVE'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_LL_DATA_LENGTH_EXTENSION_MASTER'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_BLE_PHY'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_MD_MASTER'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_MD_SLAVE'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_PHY_CONN'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_USER_BLT_SOFT_TIMER'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_USER_BLT_SOFT_UART'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- MACRO='FEATURE_TEST_MODE'
- MACRO_VAL='TEST_FEATURE_BACKUP'
- MACRO_PATH='./b80_ble_sdk/vendor/feature_test/feature_config.h'
- sed -i "/#define\s\+${MACRO}/c#define ${MACRO}\t\t${MACRO_VAL}" $MACRO_PATH
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208_feature_test
- $TELINK_IDE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk/ -cleanBuild tc_ble_simple_sdk_8208/8208B_feature_test
- date
when: manual
clean_build:
stage: clean_build
tags:
- LINUX
- TC32
script:
- ls -a
- rm -r * .git*
- ls -a
when: always
plainPW_check:
stage: plainPW_check
tags:
- LINUX
script:
- echo "Enter Plain Password checking stage"
- check_plain_weak_password | tee result.txt
- ls -l result.txt
- echo "Error List:"
- cat result.txt
artifacts:
paths:
- result.txt
when: manual
# The cov job definition
cov:
variables:
CODE_COMPILE_ARCH: 'TC32'
COV_PF_CATALOG: 'BLE'
stage: cov
tags:
- COV
- LINUX
- TC32
before_script:
script:
- chmod +x b80_ble_sdk/*.sh
- $COV_B COV_$CI_PROJECT_NAME $COV_B_TEMPLATE/$CODE_COMPILE_ARCH $TC32_ECLIPSE_BUILD -data ${CI_PIPELINE_ID}_WS -import ./b80_ble_sdk -cleanBuild b80_ble_sdk/8208_ble_sample
- $COV_A COV_$CI_PROJECT_NAME
- cov_add_commit_steam_project_2_platform.sh
when: manual
oss:
tags:
- OSS
stage: oss
script:
- oss_checking .
artifacts:
when: always
paths:
- scan_result
when: manual
fossid:
tags:
- FOSSID
stage: fossid
script:
- fossid_check.sh
artifacts:
paths:
- fossid*.txt
when: manual
.release_sdk_template: &release_sdk_template
variables:
PACK_NAME: "release_sdk_template"
stage: release_customize_sdk
tags:
- windows_tc32_test
before_script:
- echo "get ci release sdk shell"
- >
if [ ${#PRIVATE_TOKEN_SELF} != 0 ]; then
clone_url="http://oauth2:${PRIVATE_TOKEN_SELF}@192.168.48.36/training_zone/ci_common_shell"
elif [ ${#PRIVATE_TOKEN} != 0 ]; then
clone_url="http://oauth2:${PRIVATE_TOKEN}@192.168.48.36/training_zone/ci_common_shell"
else
echo "have no find token."
exit 1
fi
- git clone $clone_url
- ls ci_common_shell
- cp ci_common_shell/sdk_release_customize-2.0.sh ./
- ls
script:
- chmod +x ./sdk_release_customize-2.0.sh
- ./sdk_release_customize-2.0.sh ./release_sdk_config
artifacts:
name: "$PACK_NAME"
expire_in: '3 yrs'
paths:
- "./b80_ble_sdk"
- "./README.md"
- "./doc"
when: manual
release_sdk_P5_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_P5"
release_sdk_P10_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_P10"
release_sdk_P12_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_P12"
release_sdk_custom_made_P0_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_custom_made_P0"
release_sdk_custom_made_P5_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_custom_made_P5"
release_sdk_custom_made_P10_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_custom_made_P10"
release_sdk_custom_made_P12_B80:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80_V3.4.2.1_custom_made_P12"
release_sdk_P5_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_P5"
release_sdk_P10_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_P10"
release_sdk_P12_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_P12"
release_sdk_custom_made_P0_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_custom_made_P0"
release_sdk_custom_made_P5_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_custom_made_P5"
release_sdk_custom_made_P10_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_custom_made_P10"
release_sdk_custom_made_P12_B80B:
<<: *release_sdk_template
variables:
PACK_NAME: "tc_ble_simple_sdk_B80B_V3.4.2.1_custom_made_P12"