Skip to content

Commit f934d7c

Browse files
authored
Jenkins: Update CI scripts + Arduino IDE 1.8.5 (#1144)
1 parent fc99db6 commit f934d7c

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

.ci/arduino.groovy

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!groovy
22
def buildArduino(config, String buildFlags, String sketch, String key) {
3-
def root = '/opt/arduino-1.8.2/'
3+
def root = '/opt/arduino-1.8.5/'
44
if (config.nightly_arduino_ide)
55
{
66
root = '/opt/arduino-nightly/'
77
}
8-
def esp8266_tools = '/opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
8+
//def esp8266_tools = '/opt/arduino-nightly/hardware/esp8266com/esp8266/tools'
99
def jenkins_root = '/var/lib/jenkins/'
1010
def builder = root+'arduino-builder'
11-
def standard_args = ' -warnings="all"' //-verbose=true
11+
def standard_args = ' -warnings=all' //-verbose=true
1212
def builder_specifics = ' -hardware '+root+'hardware -tools '+root+'hardware/tools/avr -tools '+
13-
root+'tools-builder -tools '+esp8266_tools+' -built-in-libraries '+root+'libraries'
13+
root+'tools-builder -built-in-libraries '+root+'libraries'
1414
def jenkins_packages = jenkins_root+'.arduino15/packages'
1515
def site_specifics = ' -hardware '+jenkins_packages+' -tools '+jenkins_packages
1616
def repo_specifics = ' -hardware hardware -libraries . '
@@ -41,7 +41,7 @@ def parseWarnings(String key) {
4141
}
4242

4343
def buildMySensorsMicro(config, sketches, String key) {
44-
def fqbn = '-fqbn MySensors:avr:MysensorsMicro -prefs build.f_cpu=1000000 -prefs build.mcu=atmega328p'
44+
def fqbn = '-fqbn=MySensors:avr:MysensorsMicro:cpu=1Mhz'
4545
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (MySensorsMicro - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
4646
try {
4747
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -75,7 +75,7 @@ def buildMySensorsMicro(config, sketches, String key) {
7575
}
7676

7777
def buildMySensorsGw(config, sketches, String key) {
78-
def fqbn = '-fqbn MySensors:samd:mysensors_gw_native -prefs build.f_cpu=48000000 -prefs build.mcu=cortex-m0plus'
78+
def fqbn = '-fqbn MySensors:samd:mysensors_gw_native'
7979
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (MySensorsGW - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
8080
try {
8181
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -88,15 +88,15 @@ def buildMySensorsGw(config, sketches, String key) {
8888
sketches[sketch].path != config.library_root+'examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino' &&
8989
sketches[sketch].path != config.library_root+'examples/GatewaySerialRS485/GatewaySerialRS485.ino' &&
9090
sketches[sketch].path != config.library_root+'examples/MotionSensorRS485/MotionSensorRS485.ino') {
91-
buildArduino(config, fqbn, sketches[sketch].path, key+'_MySensorsGw')
91+
buildArduino(config, fqbn, sketches[sketch].path, key+'_MySensorsGW')
9292
}
9393
}
9494
} catch (ex) {
9595
echo "Build failed with: "+ ex.toString()
9696
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (MySensorsGW - '+key+')', 'Build error', '${BUILD_URL}')
9797
throw ex
9898
} finally {
99-
parseWarnings(key+'_MySensorsGw')
99+
parseWarnings(key+'_MySensorsGW')
100100
}
101101
if (currentBuild.currentResult == 'UNSTABLE') {
102102
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (MySensorsGW - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
@@ -111,7 +111,7 @@ def buildMySensorsGw(config, sketches, String key) {
111111
}
112112

113113
def buildArduinoUno(config, sketches, String key) {
114-
def fqbn = '-fqbn arduino:avr:uno -prefs build.f_cpu=16000000 -prefs build.mcu=atmega328p'
114+
def fqbn = '-fqbn arduino:avr:uno'
115115
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Uno - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
116116
try {
117117
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -144,7 +144,7 @@ def buildArduinoUno(config, sketches, String key) {
144144
}
145145

146146
def buildArduinoMega(config, sketches, String key) {
147-
def fqbn = '-fqbn arduino:avr:mega -prefs build.f_cpu=16000000 -prefs build.mcu=atmega2560'
147+
def fqbn = '-fqbn arduino:avr:mega:cpu=atmega2560'
148148
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Mega - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
149149
try {
150150
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -209,7 +209,7 @@ def buildSTM32F1(config, sketches, String key) {
209209
}
210210
}
211211

212-
def buildEsp8266(config, sketches, String key) {
212+
def buildESP8266(config, sketches, String key) {
213213
def fqbn = '-fqbn=esp8266:esp8266:generic:CpuFrequency=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=qio,FlashSize=512K0,led=2,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,FlashErase=none,UploadSpeed=115200'
214214
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP8266 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
215215
try {
@@ -226,15 +226,15 @@ def buildEsp8266(config, sketches, String key) {
226226
sketches[sketch].path != config.library_root+'examples/MotionSensorRS485/MotionSensorRS485.ino' &&
227227
sketches[sketch].path != config.library_root+'examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
228228
sketches[sketch].path != config.library_root+'examples/SoilMoistSensor/SoilMoistSensor.ino') {
229-
buildArduino(config, fqbn, sketches[sketch].path, key+'_Esp8266')
229+
buildArduino(config, fqbn, sketches[sketch].path, key+'_ESP8266')
230230
}
231231
}
232232
} catch (ex) {
233233
echo "Build failed with: "+ ex.toString()
234234
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (ESP8266 - '+key+')', 'Build error', '${BUILD_URL}')
235235
throw ex
236236
} finally {
237-
parseWarnings(key+'_Esp8266')
237+
parseWarnings(key+'_ESP8266')
238238
}
239239
if (currentBuild.currentResult == 'UNSTABLE') {
240240
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (ESP8266 - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
@@ -248,8 +248,8 @@ def buildEsp8266(config, sketches, String key) {
248248
}
249249
}
250250

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'
251+
def buildESP32(config, sketches, String key) {
252+
def fqbn = '-fqbn espressif:esp32:esp32:PartitionScheme=default,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -warnings=default'
253253
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP32 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
254254
try {
255255
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -274,15 +274,15 @@ def buildEsp32(config, sketches, String key) {
274274
sketches[sketch].path != config.library_root+'examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino' &&
275275
sketches[sketch].path != config.library_root+'examples/MotionSensorRS485/MotionSensorRS485.ino' &&
276276
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')
277+
buildArduino(config, fqbn, sketches[sketch].path, key+'_ESP32')
278278
}
279279
}
280280
} catch (ex) {
281281
echo "Build failed with: "+ ex.toString()
282282
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (ESP32 - '+key+')', 'Build error', '${BUILD_URL}')
283283
throw ex
284284
} finally {
285-
parseWarnings(key+'_Esp32')
285+
parseWarnings(key+'_ESP32')
286286
}
287287
if (currentBuild.currentResult == 'UNSTABLE') {
288288
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (ESP32 - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
@@ -297,7 +297,7 @@ def buildEsp32(config, sketches, String key) {
297297
}
298298

299299
def buildnRF5(config, sketches, String key) {
300-
def fqbn = '-fqbn sandeepmistry:nRF5:Generic_nRF52832 -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4'
300+
def fqbn = '-fqbn sandeepmistry:nRF5:Generic_nRF52832:softdevice=none,lfclk=lfxo'
301301
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (nRF5 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
302302
try {
303303
for (sketch = 0; sketch < sketches.size(); sketch++) {
@@ -338,7 +338,7 @@ def buildnRF5(config, sketches, String key) {
338338
}
339339

340340
def buildnRF52832(config, sketches, String key) {
341-
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF52832:bootcode=none,lfclk=lfxo,reset=notenable -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4'
341+
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF52832:bootcode=none,lfclk=lfxo,reset=notenable'
342342
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (nRF52832 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
343343
try {
344344
buildArduino(config, fqbn, 'hardware/MySensors/nRF5/libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino', key+'_nRF52832')
@@ -362,7 +362,7 @@ def buildnRF52832(config, sketches, String key) {
362362
}
363363

364364
def buildnRF51822(config, sketches, String key) {
365-
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF51822:chip=xxaa,bootcode=none,lfclk=lfxo -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m0'
365+
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF51822:chip=xxaa,bootcode=none,lfclk=lfxo'
366366
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (nRF51822 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
367367
try {
368368
buildArduino(config, fqbn, 'hardware/MySensors/nRF5/libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino', key+'_nRF51822')

.ci/pipeline.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def call(Closure body) {
9898
arduino.buildMySensorsGw(config, config.tests, 'Tests')
9999
}
100100
stage('ESP32 (tests)') {
101-
arduino.buildEsp32(config, config.tests, 'Tests')
101+
arduino.buildESP32(config, config.tests, 'Tests')
102102
}
103103
stage('nRF52832 (tests)') {
104104
arduino.buildnRF52832(config, config.tests, 'Tests')
@@ -110,7 +110,7 @@ def call(Closure body) {
110110
arduino.buildnRF5(config, config.tests, 'Tests')
111111
}
112112
stage('ESP8266 (tests)') {
113-
arduino.buildEsp8266(config, config.tests, 'Tests')
113+
arduino.buildESP8266(config, config.tests, 'Tests')
114114
}
115115
stage('STM32F1 (tests)') {
116116
arduino.buildSTM32F1(config, config.tests, 'Tests')
@@ -143,12 +143,12 @@ def call(Closure body) {
143143
arduino.buildnRF5(config, config.examples, 'Examples')
144144
}
145145
stage('ESP8266 (examples)') {
146-
arduino.buildEsp8266(config, config.examples, 'Examples')
146+
arduino.buildESP8266(config, config.examples, 'Examples')
147147
}
148148
// No point in building examples for ESP32 yet
149149
/*
150150
stage('ESP32 (examples)') {
151-
arduino.buildEsp32(config, config.examples, 'Examples')
151+
arduino.buildESP32(config, config.examples, 'Examples')
152152
}
153153
*/
154154
// No point in building examples for STM32F1 yet

0 commit comments

Comments
 (0)