Jenkinsfile 4.6 KB
Newer Older
1
pipeline {
Anthony Lamping's avatar
Anthony Lamping committed
2
  agent none
3
  stages {
4

5
    stage('build') {
6
      parallel {
7

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
        stage('Android Release') {
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'release'
            QMAKE_VER = "5.9.2/android_armv7/bin/qmake"
          }
          agent {
            docker {
              image 'mavlink/qgc-build-android:2018-04-14'
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
            }
          }
          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`nproc --all`'
            sh 'ccache -s'
            sh 'git clean -ff -x -d .'
          }
        }

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

58
        stage('Linux Release') {
59 60 61 62 63
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'release'
            QMAKE_VER = "5.9.2/gcc_64/bin/qmake"
          }
64 65
          agent {
            docker {
66
              image 'mavlink/qgc-build-linux:2018-04-14'
67
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
68 69 70
            }
          }
          steps {
71
            sh 'export'
72
            sh 'ccache -z'
73 74 75
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
76 77
            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`'
78
            sh 'ccache -s'
79
            sh 'git clean -ff -x -d .'
80 81
          }
        }
82

83 84 85 86 87 88 89
        stage('OSX Debug') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
90 91 92
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'debug'
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
93 94
          }
          steps {
95
            sh 'export'
96
            sh 'ccache -z'
97 98 99
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
100 101
            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`'
102
            sh 'ccache -s'
103
            sh 'git clean -ff -x -d .'
104 105
          }
        }
106

107 108 109 110 111 112 113
        stage('OSX Release') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
114
            CCACHE_BASEDIR = "${env.WORKSPACE}"
115
            QGC_CONFIG = 'installer'
116
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
117 118
          }
          steps {
119
            sh 'export'
120
            sh 'ccache -z'
121 122 123
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
124 125
            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
126
            sh 'ccache -s'
127
            archiveArtifacts(artifacts: 'build/**/*.dmg', fingerprint: true, onlyIfSuccessful: true)
128
            sh 'git clean -ff -x -d .'
129 130
          }
        }
131 132 133
      } // parallel
    } // stage('build')
  } // stages
134

135
  environment {
PX4 Build Bot's avatar
PX4 Build Bot committed
136
    CCACHE_CPP2 = '1'
137 138
    CCACHE_DIR = '/tmp/ccache'
    QT_FATAL_WARNINGS = '1'
139
  }
140 141 142 143 144

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