-
Notifications
You must be signed in to change notification settings - Fork 54
/
.gitlab-ci.yml
528 lines (465 loc) · 13.4 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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- format
- build
- test
- deploy
image: blockstream/verde@sha256:c6b59066998c138c7e43a8bc12ed6f9e83ebe3476ab4c5b73619390c495ab948
test_bip85_rsa_key_gen:
tags:
- ga
stage: format
script:
- . $HOME/esp/esp-idf/export.sh
- (cd tools/bip85_rsa_key_gen && ./test.sh)
- git diff --exit-code
test_format:
tags:
- ga
stage: format
script:
- . $HOME/esp/esp-idf/export.sh
- ./format.sh
- idf.py reconfigure
- git diff --exit-code
test_configs:
tags:
- ga
stage: format
script:
- ./tools/check_default_configs.sh
- git diff --exit-code
.test_build_template:
tags:
- ga
stage: build
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- build*/jade.bin
- build*/*_fw.bin
- build*/*_fw.bin.hash
- build*/index.json
- build*/ota_data_initial.bin
- build*/bootloader/bootloader.bin
- build*/partition_table/partition-table.bin
- build*/sdkconfig
- build*/bsdiff.h
- build*/bsdiff.c
script:
- . $HOME/esp/esp-idf/export.sh
- idf.py all size-components size
- ./tools/fwprep.py build/jade.bin build
- ./tools/mkindex.py build $(basename $(ls build/*_fw.bin) | cut -d'_' -f1)
- cp sdkconfig build/
- cp components/esp32_bsdiff/bsdiff.h build/
- cp components/esp32_bsdiff/bsdiff.c build/
test_build_qemu:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_qemu.defaults sdkconfig.defaults
after_script:
- mv build build_display_qemu
test_build_qemu_psram:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_qemu_psram.defaults sdkconfig.defaults
after_script:
- mv build build_display_qemu_psram
prod_build_jade:
before_script:
- cp production/sdkconfig_jade_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_prod
prod_build_jade_noradio:
before_script:
- cp production/sdkconfig_jade_noradio_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_noradio_prod
prod_build_jade_v1_1:
before_script:
- cp production/sdkconfig_jade_v1_1_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v1_1_prod
prod_build_jade_v1_1_noradio:
before_script:
- cp production/sdkconfig_jade_v1_1_noradio_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v1_1_noradio_prod
prod_build_jade_v2:
before_script:
- cp production/sdkconfig_jade_v2s3_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v2_prod
prod_build_jade_v2_noradio:
before_script:
- cp production/sdkconfig_jade_v2s3_noradio_prod.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v2_noradio_prod
smoketest_build_jade_v1_1:
before_script:
- cp production/sdkconfig_jade_v1_1_smoketest.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v1_1_smoketest
smoketest_build_jade_v2:
before_script:
- cp production/sdkconfig_jade_v2s3_smoketest.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_v2_smoketest
test_build_jade_ci:
before_script:
- cp configs/sdkconfig_jade_ci.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_jade_ci
test_build_jade_v1_1_ci:
before_script:
- cp configs/sdkconfig_jade_v1_1_ci.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_jade_v1_1_ci
test_build_jade_v2_ci:
before_script:
- cp configs/sdkconfig_jade_v2s3_ci.defaults sdkconfig.defaults
extends: .test_build_template
after_script:
- mv build build_jade_v2_ci
test_build_jade:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade.defaults sdkconfig.defaults
after_script:
- mv build build_jade
test_build_jade_v1_1:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v1_1.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v1_1
test_build_jade_v2:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v2s3.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v2
test_build_jade_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_ndebug
test_build_jade_v1_1_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v1_1_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v1_1_ndebug
test_build_jade_v2_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v2s3_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v2_ndebug
test_build_display_m5fire:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5fire.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5fire
test_build_display_m5blackgray:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5blackgray.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5blackgray
test_build_display_m5core2:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5core2.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5core2
test_build_display_m5stickcplus:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5stickcplus.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5stickcplus
test_build_display_m5stickcplus2:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5stickcplus2.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5stickcplus2
test_build_display_m5cores3:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_m5cores3.defaults sdkconfig.defaults
after_script:
- mv build build_display_m5cores3
test_build_display_twatchs3:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_ttgo_twatchs3.defaults sdkconfig.defaults
after_script:
- mv build build_display_twatchs3
test_build_display_ttgo_tdisplay:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_ttgo_tdisplay.defaults sdkconfig.defaults
after_script:
- mv build build_display_ttgo_tdisplay
test_build_display_ttgo_tdisplays3:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_ttgo_tdisplays3.defaults sdkconfig.defaults
after_script:
- mv build build_display_ttgo_tdisplays3
test_build_display_ttgo_tdisplays3procamera:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_ttgo_tdisplays3procamera.defaults sdkconfig.defaults
after_script:
- mv build build_display_ttgo_tdisplays3procamera
test_build_display_ttgo_tdisplays3_ci:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_display_ttgo_tdisplays3_ci.defaults sdkconfig.defaults
after_script:
- mv build build_display_ttgo_tdisplays3_ci
test_build_diycam_esp32-cam:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_diycam_esp32-cam.defaults sdkconfig.defaults
after_script:
- mv build build_diycam_esp32-cam
test_build_diycam_esp32-wrover-cam:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_diycam_esp32-wrover-cam.defaults sdkconfig.defaults
after_script:
- mv build build_diycam_esp32-wrover-cam
test_build_diycam_tcameraplus:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_diycam_tcameraplus.defaults sdkconfig.defaults
after_script:
- mv build_diycam_tcameraplus
test_build_jade_noblobs_ci:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_noradio_ci.defaults sdkconfig.defaults
after_script:
- mv build build_jade_noblobs_ci
test_build_jade_v1_1_noblobs_ci:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v1_1_noradio_ci.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v1_1_noblobs_ci
test_build_jade_v2_noblobs_ci:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v2s3_noradio_ci.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v2_noblobs_ci
test_build_jade_noblobs:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_noradio.defaults sdkconfig.defaults
after_script:
- mv build build_jade_noblobs
test_build_jade_v1_1_noblobs:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v1_1_noradio.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v1_1_noblobs
test_build_jade_v2_noblobs:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v2s3_noradio.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v2_noblobs
test_build_jade_noblobs_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_noradio_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_noblobs_ndebug
test_build_jade_v1_1_noblobs_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v1_1_noradio_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v1_1_noblobs_ndebug
test_build_jade_v2_noblobs_ndebug:
extends: .test_build_template
before_script:
- cp configs/sdkconfig_jade_v2s3_noradio_ndebug.defaults sdkconfig.defaults
after_script:
- mv build build_jade_v2_noblobs_ndebug
test_flash_qemu:
stage: deploy
tags:
- ga
needs:
- test_build_qemu
before_script:
- mv build_display_qemu build
script:
- ./main/qemu/make-flash-img.sh
- ./main/qemu/qemu_ci_flash.sh
test_flash_qemu_psram:
stage: deploy
tags:
- ga
needs:
- test_build_qemu_psram
before_script:
- mv build_display_qemu_psram build
script:
- ./main/qemu/make-flash-img.sh
- ./main/qemu/qemu_ci_flash.sh
.test_flash_artifact_template:
stage: deploy
tags:
- esp32flasher
script:
- cp build*/sdkconfig ./
- ./ci_flash.sh
.test_flash_artifact_template_v1_1:
stage: deploy
tags:
- esp32flasher_v1_1
script:
- cp build*/sdkconfig ./
- ./ci_flash.sh
.test_flash_artifact_template_s3:
stage: deploy
tags:
- esp32s3flasher
variables:
IDF_TOOLS_PATH: "/home/gitlab-runner/.idf/531"
script:
- cp build*/sdkconfig ./
- . $HOME/esp/esp-idf-5.3.1/export.sh
- ./ci_flash.sh esp32s3
test_flash_artifact:
extends: .test_flash_artifact_template
needs:
- test_build_jade_ci
before_script:
- mv build_jade_ci build
test_flash_artifacts3:
extends: .test_flash_artifact_template_s3
needs:
- test_build_display_ttgo_tdisplays3_ci
before_script:
- mv build_display_ttgo_tdisplays3_ci build
test_gcov:
# for now this only works on s3
tags:
- esp32s3flasher
stage: build
variables:
IDF_TOOLS_PATH: "/home/gitlab-runner/.idf/531"
script:
- cp configs/sdkconfig_display_ttgo_tdisplays3_gcov_ci.defaults sdkconfig.defaults
- . $HOME/esp/esp-idf-5.3.1/export.sh
- idf.py all size-components size
- ./tools/fwprep.py build/jade.bin build
- ./tools/mkindex.py build $(basename $(ls build/*_fw.bin) | cut -d'_' -f1)
- cp sdkconfig build/
- cp components/esp32_bsdiff/bsdiff.h build/
- cp components/esp32_bsdiff/bsdiff.c build/
- cp build*/sdkconfig ./
- ./ci_flash.sh esp32s3
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- build*/coverage_report/*
test_flash_artifact_ota_delta:
stage: deploy
tags:
- esp32flasher
needs:
- test_build_jade_ci
- test_build_jade_noblobs_ci
before_script:
- mv build_jade_noblobs_ci build_noblobs
- mv build_jade_ci build
script:
- ./ota_delta_ci.sh
test_flash_artifact_ota_delta_v1_1:
stage: deploy
tags:
- esp32flasher_v1_1
needs:
- test_build_jade_v1_1_ci
- test_build_jade_v1_1_noblobs_ci
before_script:
- mv build_jade_v1_1_noblobs_ci build_noblobs
- mv build_jade_v1_1_ci build
script:
- ./ota_delta_ci.sh
test_flash_artifact_noblobs:
extends: .test_flash_artifact_template
needs:
- test_build_jade_noblobs_ci
before_script:
- mv build_jade_noblobs_ci build
test_flash_artifact_v1_1:
extends: .test_flash_artifact_template_v1_1
needs:
- test_build_jade_v1_1_ci
before_script:
- mv build_jade_v1_1_ci build
test_flash_artifact_noblobs_v1_1:
extends: .test_flash_artifact_template_v1_1
needs:
- test_build_jade_v1_1_noblobs_ci
before_script:
- mv build_jade_v1_1_noblobs_ci build
build_jadepy_wheel:
tags:
- ga
stage: build
artifacts:
expire_in: 14 days
name: jadepy
when: on_success
paths:
- dist
script:
- cd $CI_PROJECT_DIR
- apt install -yqq python3-venv
- virtualenv -p python3 venv
- source venv/bin/activate
- pip install build
- python -m build
- deactivate
- rm -rf venv
build_api_docs:
tags:
- ga
stage: build
artifacts:
expire_in: 14 days
name: jade-apidocs
when: on_success
paths:
- apidocs.tar.gz
script:
- (cd docs && make html)
- (cd docs/_build && tar czf ../../apidocs.tar.gz html/)