Jenkinsfile 3.28 KB
Newer Older
1 2 3 4
pipeline {
  agent any
  stages {
    stage('build') {
5
      parallel {
Daniel Agar's avatar
Daniel Agar committed
6
        stage('Linux Debug') {
7 8 9 10 11
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'debug'
            QMAKE_VER = "5.9.2/gcc_64/bin/qmake"
          }
Daniel Agar's avatar
Daniel Agar committed
12 13 14
          agent {
            docker {
              image 'mavlink/qgc-build-linux'
15
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
Daniel Agar's avatar
Daniel Agar committed
16 17 18
            }
          }
          steps {
19
            sh 'export'
20
            sh 'ccache -z'
Daniel Agar's avatar
Daniel Agar committed
21 22 23
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
24 25
            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
26 27 28
            sh 'ccache -s'
          }
        }
29
        stage('Linux Release') {
30 31 32 33 34
          environment {
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'release'
            QMAKE_VER = "5.9.2/gcc_64/bin/qmake"
          }
35 36 37
          agent {
            docker {
              image 'mavlink/qgc-build-linux'
38
              args '-v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
39 40 41
            }
          }
          steps {
42
            sh 'export'
43
            sh 'ccache -z'
44 45 46
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
47 48
            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`'
49 50 51
            sh 'ccache -s'
          }
        }
52 53 54 55 56 57 58
        stage('OSX Debug') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
59 60 61
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'debug'
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
62 63
          }
          steps {
64
            sh 'export'
65
            sh 'ccache -z'
66 67 68
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
69 70
            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`'
71 72 73
            sh 'ccache -s'
          }
        }
74 75 76 77 78 79 80
        stage('OSX Release') {
          agent {
            node {
              label 'mac'
            }
          }
          environment {
81 82 83
            CCACHE_BASEDIR = "${env.WORKSPACE}"
            QGC_CONFIG = 'release'
            QMAKE_VER = "5.9.3/clang_64/bin/qmake"
84 85
          }
          steps {
86
            sh 'export'
87
            sh 'ccache -z'
88 89 90
            sh 'git submodule deinit -f .'
            sh 'git clean -ff -x -d .'
            sh 'git submodule update --init --recursive --force'
91 92
            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
93
            sh 'ccache -s'
94 95
          }
        }
96 97 98
      }
    }
  }
99
  environment {
PX4 Build Bot's avatar
PX4 Build Bot committed
100
    CCACHE_CPP2 = '1'
101 102
    CCACHE_DIR = '/tmp/ccache'
    QT_FATAL_WARNINGS = '1'
103
  }
104
}