@@ -26,7 +26,9 @@ def parseWarnings(String key) {
26
26
excludePattern : ''' .*/EEPROM\\ .h,.*/Dns\\ .cpp,.*/socket\\ .cpp,.*/util\\ .h,.*/Servo\\ .cpp,
27
27
.*/Adafruit_NeoPixel\\ .cpp,.*/UIPEthernet.*,.*/SoftwareSerial\\ .cpp,
28
28
.*/pins_arduino\\ .h,.*/Stream\\ .cpp,.*/USBCore\\ .cpp,.*/Wire\\ .cpp,
29
- .*/hardware/STM32F1.*,.*/hardware/esp8266.*,.*/libraries/SD/.*''' ,
29
+ .*/hardware/STM32F1.*,.*/hardware/esp8266.*,.*/hardware/espressif/esp32.*,
30
+ .*/libraries/SD/.*''' ,
31
+
30
32
healthy : ' ' , includePattern : ' ' , messagesPattern : ' ' ,
31
33
parserConfigurations : [[parserName : ' Arduino/AVR' , pattern : ' compiler_' + key+ ' .log' ]],
32
34
unHealthy : ' ' , unstableNewAll : ' 0' , unstableTotalAll : ' 0'
@@ -47,6 +49,8 @@ def buildMySensorsMicro(config, sketches, String key) {
47
49
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
48
50
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
49
51
sketches[sketch]. path != config. library_root+ ' examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino' &&
52
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
53
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
50
54
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' ) {
51
55
buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _MySensorsMicro' )
52
56
}
@@ -80,6 +84,8 @@ def buildMySensorsGw(config, sketches, String key) {
80
84
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
81
85
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
82
86
sketches[sketch]. path != config. library_root+ ' examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino' &&
87
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
88
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
83
89
sketches[sketch]. path != config. library_root+ ' examples/GatewaySerialRS485/GatewaySerialRS485.ino' &&
84
90
sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' ) {
85
91
buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _MySensorsGw' )
@@ -112,6 +118,8 @@ def buildArduinoUno(config, sketches, String key) {
112
118
if (sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266/GatewayESP8266.ino' &&
113
119
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
114
120
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
121
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
122
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
115
123
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' ) {
116
124
buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _ArduinoUno' )
117
125
}
@@ -143,6 +151,8 @@ def buildArduinoMega(config, sketches, String key) {
143
151
if (sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266/GatewayESP8266.ino' &&
144
152
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
145
153
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
154
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
155
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
146
156
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' ) {
147
157
buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _ArduinoMega' )
148
158
}
@@ -174,6 +184,8 @@ def buildSTM32F1(config, sketches, String key) {
174
184
if (sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266/GatewayESP8266.ino' &&
175
185
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
176
186
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
187
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
188
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
177
189
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' ) {
178
190
buildArduino(config, fqbn, sketches[sketch]. path, key+ ' _STM32F1' )
179
191
}
@@ -209,6 +221,8 @@ def buildEsp8266(config, sketches, String key) {
209
221
sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100/GatewayW5100.ino' &&
210
222
sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100MQTTClient/GatewayW5100MQTTClient.ino' &&
211
223
sketches[sketch]. path != config. library_root+ ' examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino' &&
224
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
225
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
212
226
sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' &&
213
227
sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
214
228
sketches[sketch]. path != config. library_root+ ' examples/SoilMoistSensor/SoilMoistSensor.ino' ) {
@@ -234,6 +248,54 @@ def buildEsp8266(config, sketches, String key) {
234
248
}
235
249
}
236
250
251
+ def buildEsp32 (config , sketches , String key ) {
252
+ def fqbn = ' -fqbn espressif:esp32:node32s -warnings=default -prefs build.f_cpu=80000000 -prefs build.mcu=esp32'
253
+ config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
254
+ try {
255
+ for (sketch = 0 ; sketch < sketches. size(); sketch++ ) {
256
+ if (sketches[sketch]. path != config. library_root+ ' examples/BatteryPoweredSensor/BatteryPoweredSensor.ino' &&
257
+ sketches[sketch]. path != config. library_root+ ' examples/BinarySwitchSleepSensor/BinarySwitchSleepSensor.ino' &&
258
+ sketches[sketch]. path != config. library_root+ ' examples/CO2Sensor/CO2Sensor.ino' &&
259
+ sketches[sketch]. path != config. library_root+ ' examples/DustSensor/DustSensor.ino' &&
260
+ sketches[sketch]. path != config. library_root+ ' examples/DustSensorDSM/DustSensorDSM.ino' &&
261
+ sketches[sketch]. path != config. library_root+ ' examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino' &&
262
+ sketches[sketch]. path != config. library_root+ ' examples/LightSensor/LightSensor.ino' &&
263
+ sketches[sketch]. path != config. library_root+ ' examples/LogOTANode/LogOTANode.ino' &&
264
+ sketches[sketch]. path != config. library_root+ ' examples/MotionSensor/MotionSensor.ino' &&
265
+ sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' &&
266
+ sketches[sketch]. path != config. library_root+ ' examples/PassiveNode/PassiveNode.ino' &&
267
+ sketches[sketch]. path != config. library_root+ ' examples/GatewaySerialRS485/GatewaySerialRS485.ino' &&
268
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100/GatewayW5100.ino' &&
269
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100MQTTClient/GatewayW5100MQTTClient.ino' &&
270
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino' &&
271
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266/GatewayESP8266.ino' &&
272
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
273
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
274
+ sketches[sketch]. path != config. library_root+ ' examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
275
+ sketches[sketch]. path != config. library_root+ ' examples/MotionSensorRS485/MotionSensorRS485.ino' &&
276
+ sketches[sketch]. path != config. library_root+ ' examples/SoilMoistSensor/SoilMoistSensor.ino' ) {
277
+ buildArduino(config, ' -prefs build.flash_freq=80m -prefs build.flash_size=4MB ' + fqbn, sketches[sketch]. path, key+ ' _Esp32' )
278
+ }
279
+ }
280
+ } catch (ex) {
281
+ echo " Build failed with: " + ex. toString()
282
+ config. pr. setBuildStatus(config, ' FAILURE' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Build error' , ' ${BUILD_URL}' )
283
+ throw ex
284
+ } finally {
285
+ parseWarnings(key+ ' _Esp32' )
286
+ }
287
+ if (currentBuild. currentResult == ' UNSTABLE' ) {
288
+ config. pr. setBuildStatus(config, ' ERROR' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Warnings found' , ' ${BUILD_URL}warnings2Result/new' )
289
+ if (config. is_pull_request) {
290
+ error ' Termiated due to warnings found'
291
+ }
292
+ } else if (currentBuild. currentResult == ' FAILURE' ) {
293
+ config. pr. setBuildStatus(config, ' FAILURE' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Build error' , ' ${BUILD_URL}' )
294
+ } else {
295
+ config. pr. setBuildStatus(config, ' SUCCESS' , ' Toll gate (ESP32 - ' + key+ ' )' , ' Pass' , ' ' )
296
+ }
297
+ }
298
+
237
299
def buildnRF5 (config , sketches , String key ) {
238
300
def fqbn = ' -fqbn sandeepmistry:nRF5:Generic_nRF52832 -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4'
239
301
config. pr. setBuildStatus(config, ' PENDING' , ' Toll gate (nRF5 - ' + key+ ' )' , ' Building...' , ' ${BUILD_URL}flowGraphTable/' )
@@ -246,6 +308,8 @@ def buildnRF5(config, sketches, String key) {
246
308
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
247
309
sketches[sketch]. path != config. library_root+ ' examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino' &&
248
310
sketches[sketch]. path != config. library_root+ ' examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
311
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32/GatewayESP32.ino' &&
312
+ sketches[sketch]. path != config. library_root+ ' examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
249
313
sketches[sketch]. path != config. library_root+ ' examples/GatewaySerialRS485/GatewaySerialRS485.ino' &&
250
314
sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100/GatewayW5100.ino' &&
251
315
sketches[sketch]. path != config. library_root+ ' examples/GatewayW5100MQTTClient/GatewayW5100MQTTClient.ino' &&
0 commit comments