Commit 779875716ef0a2659a1a608e88699b780bddda25

Authored by Nodeduino
Committed by Moritz Wirger
1 parent 174cc9af

Add a Jenkinsfile for testing purposes (might not be working as expected)

Showing 1 changed file with 51 additions and 0 deletions
Jenkinsfile 0 → 100644
  1 +timestamps {
  2 + node('master')
  3 + {
  4 + stage('SCM')
  5 + {
  6 + checkout scm
  7 + }
  8 + stage('Build')
  9 + {
  10 + sh returnStatus: true, script: 'rm -r build'
  11 + sh '''#!/bin/bash
  12 + mkdir build
  13 + cd build
  14 + cmake .. -Dhueplusplus_TESTS=ON
  15 + make -j8 2>&1 | tee buildlog.txt
  16 + test ${PIPESTATUS[0]} -eq 0'''
  17 + }
  18 + stage('Test')
  19 + {
  20 + sh '''cd debug
  21 + hueplusplus/test/test_HuePlusPlus --gtest_output=xml:test.xml'''
  22 + step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1,
  23 + thresholds: [
  24 + [$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''],
  25 + [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']
  26 + ],
  27 + tools: [
  28 + [$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'debug/test.xml', skipNoTestFiles: false, stopProcessingIfError: true]
  29 + ]
  30 + ])
  31 + }
  32 + stage('CppCheck')
  33 + {
  34 + sh 'cppcheck -j 8 --force -ihueplusplus/test -ihueplusplus/jsoncpp.cpp hueplusplus/ 2>build/CppCheckResult'
  35 + rtp nullAction: '1', parserName: 'HTML', stableText: '${FILE:build/CppCheckResult}'
  36 + }
  37 + stage('Documentation')
  38 + {
  39 + sh 'doxygen Doxyfile'
  40 + publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'doc/html/', reportFiles: 'index.html', reportName: 'Doxygen'])
  41 + }
  42 + stage('Parse warnings')
  43 + {
  44 + warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'Doxygen', pattern: 'doxylog.txt']], unHealthy: ''
  45 + sh returnStatus: true, script: 'rm doxylog.txt'
  46 + warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'GNU C Compiler 4 (gcc)', pattern: 'debug/buildlog.txt']], unHealthy: ''
  47 + sh returnStatus: true, script: 'rm debug/buildlog.txt'
  48 + }
  49 + }
  50 +
  51 +}
... ...