From cd9b3d6b2741bf696a97a7ac6f01d8dddec36e05 Mon Sep 17 00:00:00 2001
From: Julian Oes <julian@oes.ch>
Date: Wed, 10 Apr 2019 18:25:27 +0200
Subject: [PATCH] CI: move no-ninja builds to Jenkinsfile

---
 .ci/Jenkinsfile-compile | 11 ++-----
 Jenkinsfile             | 66 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 9 deletions(-)

diff --git a/.ci/Jenkinsfile-compile b/.ci/Jenkinsfile-compile
index d14f856bac..27370b47dc 100644
--- a/.ci/Jenkinsfile-compile
+++ b/.ci/Jenkinsfile-compile
@@ -24,7 +24,7 @@ pipeline {
           ]
 
           def base_builds = [
-            target: ["px4_sitl_rtps", "NO_NINJA_BUILD=1 px4_sitl_default"],
+            target: ["px4_sitl_rtps"],
             image: docker_images.base,
             archive: false
           ]
@@ -42,13 +42,6 @@ pipeline {
             archive: true
           ]
 
-          def nuttx_builds_noninja = [
-            target: [
-                     "NO_NINJA_BUILD=1 px4_fmu-v2_default", "NO_NINJA_BUILD=1 px4_fmu-v5_default"],
-            image: docker_images.nuttx,
-            archive: false
-          ]
-
           def nuttx_builds_other = [
             target: ["px4_cannode-v1_default", "px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
             image: docker_images.nuttx,
@@ -68,7 +61,7 @@ pipeline {
           ]
 
           def docker_builds = [
-            armhf_builds, base_builds, nuttx_builds_archive, nuttx_builds_noninja, nuttx_builds_other, rpi_builds, snapdragon_builds
+            armhf_builds, base_builds, nuttx_builds_archive, nuttx_builds_other, rpi_builds, snapdragon_builds
           ]
 
           for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
diff --git a/Jenkinsfile b/Jenkinsfile
index 485f8519e5..5afd687851 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -145,6 +145,72 @@ pipeline {
           }
         }
 
+        stage('No-ninja px4_fmu-v2') {
+          agent {
+            docker {
+              image 'px4io/px4-dev-nuttx:2019-03-08'
+              args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
+            }
+          }
+          steps {
+            sh 'export'
+            sh 'make distclean'
+            sh 'ccache -z'
+            sh 'git fetch --tags'
+            sh 'NO_NINJA_BUILD=1 make px4_fmu-v2_default'
+            sh 'ccache -s'
+          }
+          post {
+            always {
+              sh 'make distclean'
+            }
+          }
+        }
+
+        stage('No-ninja px4_fmu-v5') {
+          agent {
+            docker {
+              image 'px4io/px4-dev-nuttx:2019-03-08'
+              args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
+            }
+          }
+          steps {
+            sh 'export'
+            sh 'make distclean'
+            sh 'ccache -z'
+            sh 'git fetch --tags'
+            sh 'NO_NINJA_BUILD=1 make px4_fmu-v5_default'
+            sh 'ccache -s'
+          }
+          post {
+            always {
+              sh 'make distclean'
+            }
+          }
+        }
+
+        stage('No-ninja SITL build') {
+          agent {
+            docker {
+              image 'px4io/px4-dev-base-bionic:2019-03-08'
+              args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
+            }
+          }
+          steps {
+            sh 'export'
+            sh 'make distclean'
+            sh 'ccache -z'
+            sh 'git fetch --tags'
+            sh 'NO_NINJA_BUILD=1 make px4_sitl_default'
+            sh 'ccache -s'
+          }
+          post {
+            always {
+              sh 'make distclean'
+            }
+          }
+        }
+
         stage('SITL unit tests') {
           agent {
             docker {
-- 
GitLab