Commit 4072e6c5 authored by Daniel Agar's avatar Daniel Agar

Jenkinsfile use QGC Airmap API header

parent 012de5a5
...@@ -81,6 +81,9 @@ pipeline { ...@@ -81,6 +81,9 @@ pipeline {
sh 'git submodule deinit -f .' sh 'git submodule deinit -f .'
sh 'git clean -ff -x -d .' sh 'git clean -ff -x -d .'
sh 'git submodule update --init --recursive --force' sh 'git submodule update --init --recursive --force'
withCredentials([file(credentialsId: 'QGC_Airmap_api_key', variable: 'AIRMAP_API_HEADER')]) {
sh 'cp $AIRMAP_API_HEADER ${WORKSPACE}/src/Airmap/Airmap_api_key.h'
}
sh 'mkdir build; cd build; ${QT_PATH}/${QMAKE_VER} -r ${WORKSPACE}/qgroundcontrol.pro CONFIG+=${QGC_CONFIG} CONFIG+=WarningsAsErrorsOn' sh 'mkdir build; cd build; ${QT_PATH}/${QMAKE_VER} -r ${WORKSPACE}/qgroundcontrol.pro CONFIG+=${QGC_CONFIG} CONFIG+=WarningsAsErrorsOn'
sh 'cd build; make -j`nproc --all`' sh 'cd build; make -j`nproc --all`'
sh 'ccache -s' sh 'ccache -s'
...@@ -131,20 +134,43 @@ pipeline { ...@@ -131,20 +134,43 @@ pipeline {
QGC_CONFIG = 'installer' QGC_CONFIG = 'installer'
QMAKE_VER = "5.11.0/clang_64/bin/qmake" QMAKE_VER = "5.11.0/clang_64/bin/qmake"
} }
steps { stages {
sh 'export' stage('Clean Checkout') {
sh 'ccache -z' steps {
sh 'git submodule deinit -f .' sh 'export'
sh 'git clean -ff -x -d .' sh 'ccache -z'
sh 'git submodule update --init --recursive --force' sh 'git submodule deinit -f .'
sh 'mkdir build; cd build; ${QT_PATH}/${QMAKE_VER} -r ${WORKSPACE}/qgroundcontrol.pro CONFIG+=${QGC_CONFIG} CONFIG+=WarningsAsErrorsOn' sh 'git clean -ff -x -d .'
sh 'cd build; make -j`sysctl -n hw.ncpu`' sh 'git submodule update --init --recursive --force'
sh 'ccache -s' }
}
stage('Add Airmap API key') {
steps {
withCredentials([file(credentialsId: 'QGC_Airmap_api_key', variable: 'AIRMAP_API_HEADER')]) {
sh 'cp $AIRMAP_API_HEADER ${WORKSPACE}/src/Airmap/Airmap_api_key.h'
}
}
when {
anyOf {
branch 'master';
branch 'Airmap';
branch 'pr-airmap_api_key';
branch 'Stable_*'
}
}
}
stage('Build OSX Release') {
steps {
sh 'mkdir build; cd build; ${QT_PATH}/${QMAKE_VER} -r ${WORKSPACE}/qgroundcontrol.pro CONFIG+=${QGC_CONFIG} CONFIG+=WarningsAsErrorsOn'
sh 'cd build; make -j`sysctl -n hw.ncpu`'
archiveArtifacts(artifacts: 'build/**/*.dmg', fingerprint: true)
sh 'ccache -s'
}
}
} }
post { post {
success {
archiveArtifacts(artifacts: 'build/**/*.dmg', fingerprint: true)
}
cleanup { cleanup {
sh 'git clean -ff -x -d .' sh 'git clean -ff -x -d .'
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment