2017-10-27 11:47:38 -03:00
|
|
|
pipeline {
|
2017-11-28 13:32:26 -04:00
|
|
|
agent none
|
2017-10-27 11:47:38 -03:00
|
|
|
stages {
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-10-30 11:20:23 -03:00
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2017-11-28 13:32:26 -04:00
|
|
|
script {
|
|
|
|
def builds = [:]
|
|
|
|
|
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
// nuttx default targets that are archived and uploaded to s3
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["px4fmu-v4", "px4fmu-v4pro", "px4fmu-v5", "aerofc-v1"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-11-28 13:32:26 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make clean"
|
2017-12-06 20:32:09 -04:00
|
|
|
sh "ccache -z"
|
2017-12-08 00:50:47 -04:00
|
|
|
sh "git fetch --tags"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make nuttx_${node_name}_default"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "make nuttx_${node_name}_rtps"
|
2017-12-10 14:50:30 -04:00
|
|
|
sh "make sizes"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "ccache -s"
|
2017-12-10 03:32:21 -04:00
|
|
|
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
// special case for fmu-v2/fmu-v3
|
|
|
|
builds["px4fmu-v2"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-12-10 03:32:21 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
|
|
|
sh "make clean"
|
|
|
|
sh "ccache -z"
|
|
|
|
sh "git fetch --tags"
|
2017-12-15 11:49:00 -04:00
|
|
|
sh "make px4io-v2_default"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "make nuttx_px4fmu-v2_default"
|
|
|
|
sh "make nuttx_px4fmu-v2_lpe"
|
|
|
|
sh "make nuttx_px4fmu-v3_default"
|
|
|
|
sh "make nuttx_px4fmu-v3_rtps"
|
2017-12-10 14:50:30 -04:00
|
|
|
sh "make sizes"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "ccache -s"
|
|
|
|
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// nuttx default targets that are archived and uploaded to s3
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["aerocore2", "auav-x21", "crazyflie", "mindpx-v2", "nxphlite-v3", "tap-v1"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-11-28 13:32:26 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make clean"
|
2017-12-06 20:32:09 -04:00
|
|
|
sh "ccache -z"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "git fetch --tags"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make nuttx_${node_name}_default"
|
2017-12-10 14:50:30 -04:00
|
|
|
sh "make sizes"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "ccache -s"
|
2017-12-10 03:32:21 -04:00
|
|
|
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-28 18:32:55 -04:00
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
// other nuttx default targets
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["px4-same70xplained-v1", "px4-stm32f4discovery", "px4cannode-v1", "px4esc-v1", "px4nucleoF767ZI-v1", "s2740vc-v1"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-11-28 18:32:55 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-11-28 18:32:55 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
|
|
|
sh "make clean"
|
2017-12-06 20:32:09 -04:00
|
|
|
sh "ccache -z"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "make nuttx_${node_name}_default"
|
2017-12-10 14:50:30 -04:00
|
|
|
sh "make sizes"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "ccache -s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
// raspberry pi and bebop (armhf)
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["rpi_cross", "bebop_default"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-raspi:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-11-28 13:32:26 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make clean"
|
2017-12-06 20:32:09 -04:00
|
|
|
sh "ccache -z"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make posix_${node_name}"
|
|
|
|
sh "ccache -s"
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
// other armhf (to be merged with raspi and bebop)
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["ocpoc_ubuntu"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-armhf:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-11-28 13:32:26 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make clean"
|
2017-12-06 20:32:09 -04:00
|
|
|
sh "ccache -z"
|
2017-11-28 18:32:55 -04:00
|
|
|
sh "make posix_${node_name}"
|
|
|
|
sh "ccache -s"
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-06 08:04:01 -04:00
|
|
|
|
2017-12-10 04:27:48 -04:00
|
|
|
// snapdragon eagle (posix + qurt)
|
2017-12-10 14:50:30 -04:00
|
|
|
for (def option in ["eagle_default"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-12-10 04:27:48 -04:00
|
|
|
builds["${node_name}"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name}") {
|
|
|
|
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
|
|
|
|
docker.image("lorenzmeier/px4-dev-snapdragon:2017-10-23").inside {
|
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
|
|
|
sh "make clean"
|
|
|
|
sh "ccache -z"
|
|
|
|
sh "make ${node_name}"
|
|
|
|
sh "ccache -s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-15 10:55:34 -04:00
|
|
|
// GCC7 posix
|
|
|
|
for (def option in ["sitl_default"]) {
|
2017-12-10 14:50:30 -04:00
|
|
|
def node_name = "${option}"
|
|
|
|
|
2017-12-06 08:04:01 -04:00
|
|
|
builds["${node_name} (GCC7)"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name} (GCC7)") {
|
2017-12-11 16:15:43 -04:00
|
|
|
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
2017-12-06 08:04:01 -04:00
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
|
|
|
sh "make clean"
|
2017-12-10 03:32:21 -04:00
|
|
|
sh "ccache -z"
|
2017-12-15 10:55:34 -04:00
|
|
|
sh "make posix_${node_name}"
|
|
|
|
sh "ccache -s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// GCC7 nuttx
|
|
|
|
for (def option in ["px4fmu-v5_default"]) {
|
|
|
|
def node_name = "${option}"
|
|
|
|
|
|
|
|
builds["${node_name} (GCC7)"] = {
|
|
|
|
node {
|
|
|
|
stage("Build Test ${node_name} (GCC7)") {
|
|
|
|
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
|
|
|
|
stage("${node_name}") {
|
|
|
|
checkout scm
|
|
|
|
sh "make clean"
|
|
|
|
sh "ccache -z"
|
|
|
|
sh "make nuttx_${node_name}"
|
2017-12-06 08:04:01 -04:00
|
|
|
sh "ccache -s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
parallel builds
|
|
|
|
}
|
2017-10-30 11:20:23 -03:00
|
|
|
}
|
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
stage('Test') {
|
2017-10-30 11:20:23 -03:00
|
|
|
parallel {
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-12-15 10:47:49 -04:00
|
|
|
stage('check style') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'px4io/px4-dev-base:2017-10-23'
|
|
|
|
args '-e CI=true'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make check_format'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-15 10:59:15 -04:00
|
|
|
stage('clang analyzer') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'px4io/px4-dev-clang:2017-10-23'
|
|
|
|
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make clean'
|
|
|
|
sh 'make scan-build'
|
|
|
|
// publish html
|
|
|
|
publishHTML target: [
|
|
|
|
allowMissing: false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll: true,
|
|
|
|
reportDir: 'build/scan-build/*',
|
|
|
|
reportFiles: '*',
|
|
|
|
reportName: 'Clang Static Analyzer'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-15 10:46:38 -04:00
|
|
|
stage('clang tidy') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'px4io/px4-dev-clang:2017-10-23'
|
|
|
|
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make clean'
|
|
|
|
sh 'make clang-tidy-quiet'
|
|
|
|
}
|
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-12-15 11:34:24 -04:00
|
|
|
stage('cppcheck') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'px4io/px4-dev-base:ubuntu17.10'
|
|
|
|
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make clean'
|
|
|
|
sh 'make cppcheck'
|
|
|
|
// publish html
|
|
|
|
publishHTML target: [
|
|
|
|
allowMissing: false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll: true,
|
|
|
|
reportDir: 'build/cppcheck/*',
|
|
|
|
reportFiles: '*',
|
|
|
|
reportName: 'cppcheck'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
stage('tests') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'px4io/px4-dev-base:2017-10-23'
|
2017-12-11 16:15:43 -04:00
|
|
|
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
2017-10-30 11:20:23 -03:00
|
|
|
steps {
|
2017-11-28 18:32:55 -04:00
|
|
|
sh 'make clean'
|
|
|
|
sh 'make posix_sitl_default test_results_junit'
|
2017-11-28 13:32:26 -04:00
|
|
|
junit 'build/posix_sitl_default/JUnitTestResults.xml'
|
2017-10-30 11:20:23 -03:00
|
|
|
}
|
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
|
|
|
// temporarily disabled until stable
|
|
|
|
//stage('tests coverage') {
|
|
|
|
// agent {
|
|
|
|
// docker {
|
|
|
|
// image 'px4io/px4-dev-base:2017-10-23'
|
2017-12-11 16:15:43 -04:00
|
|
|
// args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
2017-12-06 20:25:15 -04:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// steps {
|
|
|
|
// sh 'make clean'
|
|
|
|
// sh 'make tests_coverage'
|
|
|
|
// // publish html
|
|
|
|
// publishHTML target: [
|
|
|
|
// allowMissing: false,
|
|
|
|
// alwaysLinkToLastBuild: false,
|
|
|
|
// keepAll: true,
|
|
|
|
// reportDir: 'build/posix_sitl_default/coverage-html',
|
|
|
|
// reportFiles: '*',
|
|
|
|
// reportName: 'Coverage Report'
|
|
|
|
// ]
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
2017-10-30 11:20:23 -03:00
|
|
|
}
|
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-11-28 13:32:26 -04:00
|
|
|
stage('Generate Metadata') {
|
2017-12-10 03:32:21 -04:00
|
|
|
|
|
|
|
parallel {
|
|
|
|
|
|
|
|
stage('airframe') {
|
|
|
|
agent {
|
|
|
|
docker { image 'px4io/px4-dev-base:2017-10-23' }
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make airframe_metadata'
|
|
|
|
archiveArtifacts(artifacts: 'airframes.md, airframes.xml', fingerprint: true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('parameter') {
|
|
|
|
agent {
|
|
|
|
docker { image 'px4io/px4-dev-base:2017-10-23' }
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make parameters_metadata'
|
|
|
|
archiveArtifacts(artifacts: 'parameters.md, parameters.xml', fingerprint: true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('module') {
|
|
|
|
agent {
|
|
|
|
docker { image 'px4io/px4-dev-base:2017-10-23' }
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make module_documentation'
|
|
|
|
archiveArtifacts(artifacts: 'modules/*.md', fingerprint: true)
|
|
|
|
}
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-10-30 16:05:37 -03:00
|
|
|
stage('S3 Upload') {
|
2017-11-28 13:32:26 -04:00
|
|
|
agent {
|
2017-12-10 03:32:21 -04:00
|
|
|
docker { image 'px4io/px4-dev-base:2017-10-23' }
|
2017-11-28 13:32:26 -04:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
|
2017-10-30 16:05:37 -03:00
|
|
|
when {
|
2017-12-10 03:32:21 -04:00
|
|
|
anyOf {
|
|
|
|
branch 'master'
|
|
|
|
branch 'beta'
|
|
|
|
branch 'stable'
|
|
|
|
}
|
2017-10-30 16:05:37 -03:00
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
|
2017-10-30 16:05:37 -03:00
|
|
|
steps {
|
|
|
|
sh 'echo "uploading to S3"'
|
2017-10-27 11:47:38 -03:00
|
|
|
}
|
|
|
|
}
|
2017-12-10 03:32:21 -04:00
|
|
|
}
|
2017-12-06 20:25:15 -04:00
|
|
|
|
2017-12-10 03:32:21 -04:00
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
|
|
|
timeout(time: 60, unit: 'MINUTES')
|
2017-10-27 11:47:38 -03:00
|
|
|
}
|
2017-11-05 16:04:14 -04:00
|
|
|
}
|