Files
OpenCellular/firmware/ec/Jenkinsfile

47 lines
1.5 KiB
Groovy

/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
node {
currentBuild.result = 'SUCCESS'
withEnv(["UNITY_ROOT=$HOME/Unity", "TOOLCHAIN=$HOME/gcc-arm-none-eabi", "OCWARE_DIR=./"]) {
stage('Checkout') {
step([$class: 'WsCleanup'])
echo 'Checking out SCM'
checkout scm
}
try {
stage('Static Analysis') {
sh 'bash firmware/utilities/jenkins/clang_patch'
}
} catch (err) {
currentBuild.result = 'ERROR'
} finally {
archiveArtifacts '**/clang_format.patch'
}
try {
stage('Build and Unit Test') {
dir ("firmware/ec"){
sh 'make ci'
sh 'python3 ../utilities/jenkins/coverage.py'
}
}
} catch (err) {
currentBuild.result = 'FAILURE'
} finally {
warnings consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)']]
junit 'firmware/ec/test/build/results/unit-test-results.xml'
step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false,\
coberturaReportFile: '**/test-coverage.xml', failUnhealthy: false, failUnstable: false,\
maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])
}
}
}