forked from SUPLA/supla-arduino
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.drone.yml
218 lines (202 loc) · 10.4 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
kind: pipeline
name: default
steps:
- name: tests_compilation
image: rikorose/gcc-cmake
commands:
- mkdir extras/test/build
- cd extras/test/build
- cmake ..
- make -j32
- name: tests
image: rikorose/gcc-cmake
commands:
- cd extras/test/build
- ./supladevicetests --gtest_repeat=50 --gtest_shuffle
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_compilation_check
image: devel/esp-idf
pull: never
commands:
- pwd
- echo $SUPLA_DEVICE_PATH
- ls -al
- export SUPLA_DEVICE_PATH=/drone/src
- cd extras/examples/esp_idf/
- rm -f build/supla_esp32.bin
- /bin/bash -c "source /supla/esp/esp-idf/export.sh && idf.py build"
- /bin/bash -c "[ -f build/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 --clean ./Afore/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./DallasTemperature/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./DHT/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./Fronius/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./GarageParkingAssistLight/
- 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 --clean ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./HC_SR04_Distance_sensor_extended/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./ImpulseCounter/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_2/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_3/
- 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 --clean ./RGBW/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./RollerShutter/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./SequenceButton/
- arduino-cli compile --fqbn esp8266:esp8266:generic --optimize-for-debug --export-binaries --warnings all --clean ./WebInterface/
- 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
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./Afore/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./DallasTemperature/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./DHT/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./Fronius/
- 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
- cd examples
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./GarageParkingAssistLight/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./HC_SR04_Distance_sensor_extended/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./ImpulseCounter/
- 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
- cd examples
# - arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_2/
# - arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_3/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./RGBW/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./RollerShutter/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./SequenceButton/
- arduino-cli compile --fqbn esp32:esp32:esp32wrover --optimize-for-debug --export-binaries --warnings all --clean ./WebInterface/
- 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 --clean ./Afore/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./DallasTemperature/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./DHT/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./Fronius/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./GarageParkingAssistLight/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./HC_SR04_Distance_sensor/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./HC_SR04_Distance_sensor_extended/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./ImpulseCounter/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_2/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./Pzem_V_3/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./RGBW/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./RollerShutter/
- arduino-cli compile --fqbn arduino:avr:mega --optimize-for-debug --export-binaries --warnings all --clean ./SequenceButton/
- 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,
arduino_esp32_compilation_check_part_1,
arduino_esp32_compilation_check_part_2,
arduino_esp32_compilation_check_part_3,
arduino_esp8266_compilation_check_part_1,
arduino_esp8266_compilation_check_part_2,
arduino_esp8266_compilation_check_part_3,
arduino_mega_compilation_check,
cpplint
]