Jenkins: Add STM32F1 support (#972)
This commit is contained in:
+32
-1
@@ -26,7 +26,7 @@ def parseWarnings(String key) {
|
||||
excludePattern: '''.*/EEPROM\\.h,.*/Dns\\.cpp,.*/socket\\.cpp,.*/util\\.h,.*/Servo\\.cpp,
|
||||
.*/Adafruit_NeoPixel\\.cpp,.*/UIPEthernet.*,.*/SoftwareSerial\\.cpp,
|
||||
.*/pins_arduino\\.h,.*/Stream\\.cpp,.*/USBCore\\.cpp,.*/Wire\\.cpp,
|
||||
.*/hardware/esp8266.*,.*/libraries/SD/.*''',
|
||||
.*/hardware/STM32F1.*,.*/hardware/esp8266.*,.*/libraries/SD/.*''',
|
||||
healthy: '', includePattern: '', messagesPattern: '',
|
||||
parserConfigurations: [[parserName: 'Arduino/AVR', pattern: 'compiler_'+key+'.log']],
|
||||
unHealthy: '', unstableNewAll: '0', unstableTotalAll: '0'
|
||||
@@ -164,6 +164,37 @@ def buildArduinoMega(config, sketches, String key) {
|
||||
}
|
||||
}
|
||||
|
||||
def buildSTM32F1(config, sketches, String key) {
|
||||
def fqbn = '-fqbn stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd'
|
||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (STM32F1 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
||||
try {
|
||||
for (sketch = 0; sketch < sketches.size(); sketch++) {
|
||||
if (sketches[sketch].path != config.library_root+'examples/GatewayESP8266/GatewayESP8266.ino' &&
|
||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
|
||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
|
||||
sketches[sketch].path != config.library_root+'examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino') {
|
||||
buildArduino(config, fqbn, sketches[sketch].path, key+'_STM32F1')
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
echo "Build failed with: "+ ex.toString()
|
||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (STM32F1 - '+key+')', 'Build error', '${BUILD_URL}')
|
||||
throw ex
|
||||
} finally {
|
||||
parseWarnings(key+'_STM32F1')
|
||||
}
|
||||
if (currentBuild.currentResult == 'UNSTABLE') {
|
||||
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (STM32F1 - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
|
||||
if (config.is_pull_request) {
|
||||
error 'Termiated due to warnings found'
|
||||
}
|
||||
} else if (currentBuild.currentResult == 'FAILURE') {
|
||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (STM32F1 - '+key+')', 'Build error', '${BUILD_URL}')
|
||||
} else {
|
||||
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (STM32F1 - '+key+')', 'Pass', '')
|
||||
}
|
||||
}
|
||||
|
||||
def buildEsp8266(config, sketches, String key) {
|
||||
def fqbn = '-fqbn esp8266:esp8266:generic -prefs build.f_cpu=80000000 -prefs build.mcu=esp8266'
|
||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (ESP8266 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
||||
|
||||
@@ -109,6 +109,9 @@ def call(Closure body) {
|
||||
stage('ESP8266 (tests)') {
|
||||
arduino.buildEsp8266(config, config.tests, 'Tests')
|
||||
}
|
||||
stage('STM32F1 (tests)') {
|
||||
arduino.buildSTM32F1(config, config.tests, 'Tests')
|
||||
}
|
||||
stage('ArduinoUno (tests)') {
|
||||
arduino.buildArduinoUno(config, config.tests, 'Tests')
|
||||
}
|
||||
@@ -139,6 +142,12 @@ def call(Closure body) {
|
||||
stage('ESP8266 (examples)') {
|
||||
arduino.buildEsp8266(config, config.examples, 'Examples')
|
||||
}
|
||||
// No point in building examples for STM32F1 yet
|
||||
/*
|
||||
stage('STM32F1 (Examples)') {
|
||||
arduino.buildSTM32F1(config, config.tests, 'Examples')
|
||||
}
|
||||
*/
|
||||
stage('ArduinoUno (examples)') {
|
||||
arduino.buildArduinoUno(config, config.examples, 'Examples')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user