Jenkinsfile 3.54 KB
Newer Older
1 2 3 4
pipeline {
  agent any
  stages {
    stage('build') {
5
      parallel {
6

Daniel Agar's avatar
Daniel Agar committed
7
        stage('Linux Debug') {
8 9 10 11 12
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'debug'
            QMAKE_VER = "5.9.2/gcc_64/bin/qmake"
          }
Daniel Agar's avatar
Daniel Agar committed
13 14
          agent {
            docker {
15
              image 'mavlink/qgc-build-linux:2018-04-14'
16
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
Daniel Agar's avatar
Daniel Agar committed
17 18 19
            }
          }
          steps {
20
            sh 'export'
21
            sh 'ccache -z'
Daniel Agar's avatar
Daniel Agar committed
22 23 24
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
25 26
            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`'
Daniel Agar's avatar
Daniel Agar committed
27 28 29
            sh 'ccache -s'
          }
        }
30

31
        stage('Linux Release') {
32 33 34 35 36
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'release'
            QMAKE_VER = "5.9.2/gcc_64/bin/qmake"
          }
37 38
          agent {
            docker {
39
              image 'mavlink/qgc-build-linux:2018-04-14'
40
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
41 42 43
            }
          }
          steps {
44
            sh 'export'
45
            sh 'ccache -z'
46 47 48
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
49 50
            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`'
51 52 53
            sh 'ccache -s'
          }
        }
54

55 56 57 58 59 60 61
        stage('OSX Debug') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
62 63 64
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'debug'
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
65 66
          }
          steps {
67
            sh 'export'
68
            sh 'ccache -z'
69 70 71
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
72 73
            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`'
74 75 76
            sh 'ccache -s'
          }
        }
77

78 79 80 81 82 83 84
        stage('OSX Release') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
85
            CCACHE_BASEDIR = "${env.WORKSPACE}"
86
            QGC_CONFIG = 'installer'
87
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
88 89
          }
          steps {
90
            sh 'export'
91
            sh 'ccache -z'
92 93 94
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
95 96
            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`'
PX4 Build Bot's avatar
PX4 Build Bot committed
97
            sh 'ccache -s'
98
            archiveArtifacts(artifacts: 'build/**/*.dmg', fingerprint: true, onlyIfSuccessful: true)
99 100
          }
        }
101

102 103 104
      }
    }
  }
105

106
  environment {
PX4 Build Bot's avatar
PX4 Build Bot committed
107
    CCACHE_CPP2 = '1'
108 109
    CCACHE_DIR = '/tmp/ccache'
    QT_FATAL_WARNINGS = '1'
110
  }
111 112 113 114 115 116

  options {
    buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
    timeout(time: 60, unit: 'MINUTES')
  }

117
}