-
Notifications
You must be signed in to change notification settings - Fork 34
/
.gitlab-ci.yml
186 lines (158 loc) · 3.98 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
stages:
- pre_check
- build_latest
- build_v5.2
- build_v5.1
- build_v5.0
# Global variables
variables:
ESP_IDF_TAG_LATEST: "latest"
ESP_IDF_TAG_v50: "release-v5.0"
ESP_IDF_TAG_v51: "release-v5.1"
ESP_IDF_TAG_v52: "release-v5.2"
EUB_APP_NAME: "bridge"
.build_template:
tags:
- build
script:
- PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
- export PEDANTIC_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
- export PEDANTIC_CXXFLAGS="${PEDANTIC_FLAGS}"
- idf.py -DIDF_TARGET=${CHIP_NAME} -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.${EUB_DEBUG_IFACE}.defaults" build
- cd build
- esptool.py --chip ${CHIP_NAME} merge_bin -o ${EUB_APP_NAME}_merged.bin @flash_args
artifacts:
paths:
- build/flasher_args.json
- build/${EUB_APP_NAME}.elf
- build/${EUB_APP_NAME}.bin
- build/bootloader/bootloader.bin
- build/bootloader/bootloader.elf
- build/partition_table/partition-table.bin
- build/${EUB_APP_NAME}_merged.bin
expire_in: 2 weeks
needs:
- job: pre_commit
optional: true
.build_latest_template:
stage: build_latest
extends: .build_template
image: espressif/idf:$ESP_IDF_TAG_LATEST
.build_v52_template:
stage: build_v5.2
extends: .build_template
image: espressif/idf:$ESP_IDF_TAG_v52
.build_v51_template:
stage: build_v5.1
extends: .build_template
image: espressif/idf:$ESP_IDF_TAG_v51
.build_v50_template:
stage: build_v5.0
extends: .build_template
image: espressif/idf:$ESP_IDF_TAG_v50
##############
# IDF master #
##############
build_latest_s2_jtag:
extends: .build_latest_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "jtag"
build_latest_s2_swd:
extends: .build_latest_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "swd"
build_latest_s3_jtag:
extends: .build_latest_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "jtag"
build_latest_s3_swd:
extends: .build_latest_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "swd"
##############
# IDF v5.2 #
##############
build_v52_s2_jtag:
extends: .build_v52_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "jtag"
build_v52_s2_swd:
extends: .build_v52_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "swd"
build_v52_s3_jtag:
extends: .build_v52_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "jtag"
build_v52_s3_swd:
extends: .build_v52_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "swd"
##############
# IDF v5.1 #
##############
build_v51_s2_jtag:
extends: .build_v51_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "jtag"
build_v51_s2_swd:
extends: .build_v51_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "swd"
build_v51_s3_jtag:
extends: .build_v51_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "jtag"
build_v51_s3_swd:
extends: .build_v51_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "swd"
##############
# IDF v5.0 #
##############
build_v50_s2_jtag:
extends: .build_v50_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "jtag"
build_v50_s2_swd:
extends: .build_v50_template
variables:
CHIP_NAME: "esp32s2"
EUB_DEBUG_IFACE: "swd"
build_v50_s3_jtag:
extends: .build_v50_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "jtag"
build_v50_s3_swd:
extends: .build_v50_template
variables:
CHIP_NAME: "esp32s3"
EUB_DEBUG_IFACE: "swd"
##############
# PRE CHECK #
##############
pre_commit:
stage: pre_check
tags:
- build
image: espressif/idf:$ESP_IDF_TAG_LATEST
except:
- master
script:
- pip install pre-commit
- pip install wasmtime
- git diff-tree --no-commit-id --name-only -r $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -r $CI_COMMIT_SHA | xargs pre-commit run --files