-
Notifications
You must be signed in to change notification settings - Fork 17
/
.drone.yml
305 lines (282 loc) · 15.5 KB
/
.drone.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
kind: pipeline
name: default
steps:
- name: tests_compilation
image: devel/freertos
pull: never
commands:
- mkdir extras/test/build
- cd extras/test/build
- cmake ..
- make -j32
- name: tests
image: devel/freertos
pull: never
commands:
- cd extras/test/build
- ./supladevicetests --gtest_repeat=50 --gtest_shuffle
depends_on:
- tests_compilation
- name: tests_with_valgrind
image: devel/freertos
pull: never
commands:
- cd extras/test/build
- valgrind --error-exitcode=1 --leak-check=full ./supladevicetests
depends_on:
- tests_compilation
- name: esp8266_rtos_compilation_check
image: devel/esp8266_rtos_sdk
pull: never
commands:
- pwd
- echo $SUPLA_DEVICE_PATH
- ls -al
- export SUPLA_DEVICE_PATH=/drone/src
- cd extras/examples/esp8266_rtos/
- rm -f build/supla-esp8266-mk.bin
- /bin/bash -c "source /supla/esp/ESP8266_RTOS_SDK/export.sh && make -j32"
- /bin/bash -c "[ -f build/supla-esp8266-mk.bin ] && true || false"
- name: esp_idf_setup
image: devel/esp-idf
pull: never
commands:
- pwd
- echo $SUPLA_DEVICE_PATH
- git submodule update --init --recursive
- ls -al
- name: esp_idf_compilation_check
image: devel/esp-idf
pull: never
depends_on:
- esp_idf_setup
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- cd extras/examples/esp_idf/
- rm -fr build_devel
- /bin/bash -c "source /supla/esp/esp-idf/export.sh && idf.py -B build_devel build"
- /bin/bash -c "[ -f build_devel/supla_esp32.bin ] && true || false"
- name: esp_idf_stable_compilation_check
image: stable/esp-idf
pull: never
depends_on:
- esp_idf_setup
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- cd extras/examples/esp_idf/
- rm -fr build_stable
- /bin/bash -c "source /supla/esp/esp-idf/export.sh && idf.py -B build_stable build"
- /bin/bash -c "[ -f build_stable/supla_esp32.bin ] && true || false"
- name: freertos_linux_compilation_check
image: devel/freertos
pull: never
commands:
- pwd
- echo $SUPLA_DEVICE_PATH
- ls -al
- export SUPLA_DEVICE_PATH=/drone/src
- export SUPLA_FREERTOS_PATH=/supla/FreeRTOS
- cd extras/examples/freertos_linux
- rm -f build/supla-freertos-example
- cmake -B build
- cmake --build build
- /bin/bash -c "[ -f build/supla-freertos-example ] && true || false"
- name: linux_compilation_check
# Linux compilation requires generic linux toolset for compilation and building
# which is also part of our freertos docker, so we just reuse it here
image: devel/freertos
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- cd extras/examples/linux
- rm -f build/supla-device-linux
- cmake -B build
- cmake --build build
- /bin/bash -c "[ -f build/supla-device-linux ] && true || false"
- name: arduino_esp8266_compilation_check_part_1
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- cd examples
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./Afore/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./DallasTemperature/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./DHT/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./Fronius/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./GarageParkingAssistLight/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./HX711_Weight_sensor/
- name: arduino_esp8266_compilation_check_part_2
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- cd examples
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./HC_SR04_Distance_sensor_extended/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./ImpulseCounter/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./Pzem_V_2/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./Pzem_V_3/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./DSwithNotification/
- name: arduino_esp8266_compilation_check_part_3
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- cd examples
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./RGBW/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./RollerShutter/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./SequenceButton/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./WebInterface/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./AHT/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./ConfigModeInputs/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all ./ThermostatBasic/
- name: arduino_esp32_compilation_check_part_1
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries --warnings all ./Afore/
# OneWire library has some compilation warnings treated as errors, so this example is compiled without "warnings all"
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries ./DallasTemperature/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries ./DSwithNotification/
- name: arduino_esp32_compilation_check_part_2
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./GarageParkingAssistLight/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./HC_SR04_Distance_sensor_extended/
- name: arduino_esp32_compilation_check_part_3
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
# - arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all ./Pzem_V_2/
# - arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all ./Pzem_V_3/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./RGBW/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./RollerShutter/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./SequenceButton/
- name: arduino_esp32_compilation_check_part_4
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries --warnings all ./DHT/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries --warnings all ./Fronius/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --build-cache-path /drone/arduino_cache --board-options PartitionScheme=huge_app --export-binaries --warnings all ./HX711_Weight_sensor/
- name: arduino_esp32_compilation_check_part_5
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./ImpulseCounter/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./RGBW_WT32_ETH01/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./RGBW_ESP32_LAN8720/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./ThermostatBasic/
- name: arduino_esp32_compilation_check_part_6
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- mkdir -p /drone/arduino_cache
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./WebInterface/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./AHT/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --board-options PartitionScheme=huge_app --optimize-for-debug --build-cache-path /drone/arduino_cache --export-binaries --warnings all ./ConfigModeInputs/
- name: arduino_mega_compilation_check
image: devel/arduino-cli
pull: never
commands:
- export SUPLA_DEVICE_PATH=/drone/src
- rm ~/Arduino/libraries/supla-device
- ln -s /drone/src ~/Arduino/libraries/supla-device
- cd examples
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./Afore/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./DallasTemperature/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./DHT/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./Fronius/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./GarageParkingAssistLight/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./HC_SR04_Distance_sensor_extended/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./ImpulseCounter/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./Pzem_V_2/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./Pzem_V_3/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./RGBW/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./RollerShutter/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./SequenceButton/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./AHT/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./HX711_Weight_sensor/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all ./DSwithNotification/
- name: cpplint
image: devel/supla-core
pull: never
commands:
- cpplint --filter=-build/include_subdir ./src/*
- cpplint --filter=-build/include_subdir --recursive ./src/supla/*
- cpplint --filter=-build/include_subdir --recursive ./extras/porting/*
- cpplint --filter=-build/include_subdir,-build/include_order ./extras/examples/linux/*
- cpplint --filter=-build/include_subdir ./extras/examples/esp8266_rtos/main/*
- cpplint --filter=-build/include_subdir ./extras/examples/esp_idf/main/*
- cpplint --filter=-build/include_subdir ./extras/examples/freertos_linux/main.cpp
- name: rocket
image: mike1pol/drone-rocket
settings:
url:
from_secret: rocket_url
user_id:
from_secret: rocket_user_id
token:
from_secret: rocket_token
channel: github
avatar_url: "https://miro.medium.com/max/256/0*AqO_2lNemh_Fl9Gm.png"
when:
status: [success, failure]
event:
exclude:
- pull_request
depends_on: [tests, esp8266_rtos_compilation_check, esp_idf_compilation_check,
freertos_linux_compilation_check,
linux_compilation_check,
arduino_esp32_compilation_check_part_1,
arduino_esp32_compilation_check_part_2,
arduino_esp32_compilation_check_part_3,
arduino_esp32_compilation_check_part_4,
arduino_esp32_compilation_check_part_5,
arduino_esp32_compilation_check_part_6,
arduino_esp8266_compilation_check_part_1,
arduino_esp8266_compilation_check_part_2,
arduino_esp8266_compilation_check_part_3,
arduino_mega_compilation_check,
cpplint,
esp_idf_stable_compilation_check,
tests_with_valgrind
]