diff --git a/.travis.yml b/.travis.yml index 562d12cc073cf6f93eb0f47b583c83b28c9233d3..450e7fa3e07f3347f3a2019a0274c4d86785de6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,10 +25,10 @@ matrix: language: android env: SPEC=android-g++ CONFIG=installer sudo: false - - os: osx - osx_image: xcode9.2 - env: SPEC=macx-clang CONFIG=installer - sudo: required +# - os: osx +# osx_image: xcode9.2 +# env: SPEC=macx-clang CONFIG=installer +# sudo: required - os: osx osx_image: xcode9.2 env: SPEC=macx-ios-clang CONFIG=release diff --git a/Jenkinsfile b/Jenkinsfile index 6366cbd978109471f9d77a92087c9741c8acb823..5f4fb9d677afc43a16f9770a8c036a05dfe168f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,6 +81,9 @@ pipeline { sh 'git submodule deinit -f .' sh 'git clean -ff -x -d .' 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 'cd build; make -j`nproc --all`' sh 'ccache -s' @@ -131,20 +134,43 @@ pipeline { QGC_CONFIG = 'installer' QMAKE_VER = "5.11.0/clang_64/bin/qmake" } - steps { - sh 'export' - sh 'ccache -z' - sh 'git submodule deinit -f .' - sh 'git clean -ff -x -d .' - sh 'git submodule update --init --recursive --force' - 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`' - sh 'ccache -s' + stages { + stage('Clean Checkout') { + steps { + sh 'export' + sh 'ccache -z' + sh 'git submodule deinit -f .' + sh 'git clean -ff -x -d .' + sh 'git submodule update --init --recursive --force' + } + } + + 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 { - success { - archiveArtifacts(artifacts: 'build/**/*.dmg', fingerprint: true) - } cleanup { sh 'git clean -ff -x -d .' }