mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-25 01:07:22 +00:00
47 lines
1.5 KiB
Groovy
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])
|
|
}
|
|
}
|
|
}
|