-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
84 lines (81 loc) · 2.08 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env groovy
/**
* Jenkinsfile
*
* Copyright (C) 2017, Takazumi Shirayanagi
* This software is released under the new BSD License,
* see LICENSE
*/
def checkoutSCM() {
try {
checkout scm
} catch(e) {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/srz-zumix/iutest.git']]])
}
}
pipeline {
agent any
options {
//disableConcurrentBuilds()
ansiColor('xterm')
}
parameters {
booleanParam(
defaultValue: false,
description: 'run config tests',
name: 'runConfigTests'
)
}
stages {
stage('github') {
steps {
step([$class: 'GitHubSetCommitStatusBuilder'])
}
}
stage('checkout') {
steps {
checkoutSCM()
}
}
stage('main-test') {
steps {
dir('test') {
sh 'make -j4 && make test'
sh 'make clean && make -j4 OUTPUTXML=1 && make test OUTPUTXML=1'
}
}
}
stage('cppcheck') {
when {
expression {
return fileExists('cppcheck')
}
}
steps {
sh 'cppcheck --version'
}
}
stage('config-test') {
when {
expression {
return params.runConfigTests.toBoolean()
return boolean.parseBoolean(params.runConfigTests)
}
}
steps {
dir('test/configcheck') {
sh 'make disable_feature_param'
sh 'make disable_feature_1'
sh 'make disable_spec'
sh 'make combine'
sh 'make nofeature'
}
}
}
}
post {
always {
junit 'test/*.xml'
}
}
}