forked from Archive/PX4-Autopilot
367 lines
11 KiB
Groovy
367 lines
11 KiB
Groovy
#!/usr/bin/env groovy
|
|
|
|
pipeline {
|
|
agent none
|
|
stages {
|
|
|
|
stage('Build') {
|
|
|
|
parallel {
|
|
|
|
stage('px4_fmu-v2_test') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v2_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v2_default/px4_fmu-v2_default.elf', name: 'px4_fmu-v2_test'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v3_default') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v3_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v3_default/px4_fmu-v3_default.elf', name: 'px4_fmu-v3_default'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v4_default') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v4_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v4pro_default') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v4pro_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf', name: 'px4_fmu-v4pro_default'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v5_default') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v5_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v5_default/px4_fmu-v5_default.elf', name: 'px4_fmu-v5_default'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v5_stackcheck') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make px4_fmu-v5_stackcheck'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf', name: 'px4_fmu-v5_stackcheck'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('nxp_fmuk66-v3_default') {
|
|
agent {
|
|
docker {
|
|
image 'px4io/px4-dev-nuttx:2019-03-08'
|
|
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'export'
|
|
sh 'make distclean'
|
|
sh 'ccache -z'
|
|
sh 'git fetch --tags'
|
|
sh 'make nxp_fmuk66-v3_default'
|
|
sh 'make sizes'
|
|
sh 'ccache -s'
|
|
stash includes: 'build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf', name: 'nxp_fmuk66-v3_default'
|
|
}
|
|
post {
|
|
always {
|
|
sh 'make distclean'
|
|
}
|
|
}
|
|
}
|
|
|
|
} // parallel
|
|
} // stage Build
|
|
|
|
stage('Flash and Run') {
|
|
|
|
parallel {
|
|
|
|
stage('px4_fmu-v2_test') {
|
|
agent {
|
|
label 'px4_fmu-v2'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v2_test'
|
|
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
//sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v3_default') {
|
|
agent {
|
|
label 'px4_fmu-v3'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v3_default'
|
|
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v4_default') {
|
|
agent {
|
|
label 'px4_fmu-v4'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v4_default'
|
|
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v4pro_default') {
|
|
agent {
|
|
label 'px4_fmu-v4pro'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v4pro_default'
|
|
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v5_default') {
|
|
agent {
|
|
label 'px4_fmu-v5'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v5_default'
|
|
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('px4_fmu-v5_stackcheck') {
|
|
agent {
|
|
label 'px4_fmu-v5'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'px4_fmu-v5_stackcheck'
|
|
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
stage('nxp_fmuk66-v3_default') {
|
|
agent {
|
|
label 'nxp_fmuk66-v3'
|
|
}
|
|
steps {
|
|
script {
|
|
try {
|
|
sh 'export'
|
|
sh 'find /dev/serial'
|
|
unstash 'nxp_fmuk66-v3_default'
|
|
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf'
|
|
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI*` --baudrate 57600'
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
|
} catch (Exception err) {
|
|
// always report passed for now
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
} // script
|
|
}
|
|
options {
|
|
timeout(time: 600, unit: 'SECONDS')
|
|
}
|
|
}
|
|
|
|
} // parallel
|
|
} // stage Flash
|
|
|
|
} // stages
|
|
environment {
|
|
CCACHE_DIR = '/tmp/ccache'
|
|
CI = true
|
|
}
|
|
options {
|
|
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
|
timeout(time: 60, unit: 'MINUTES')
|
|
}
|
|
}
|