-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsFile
57 lines (57 loc) · 1.5 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
pipeline {
agent any
stages {
stage('Prep') {
steps {
sh('mkdir -p build-debug build-release')
sh('rm -rf build-debug/*')
sh('rm -rf build-release/*')
}
}
stage('Build Debug') {
steps {
dir('build-debug') {
sh('cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CPPCHECK=ON ../')
sh('make')
}
}
}
stage('Test Debug') {
steps {
dir('build-debug') {
sh('ctest')
}
}
}
stage('Build Release') {
steps {
dir('build-release') {
sh('cmake -DCMAKE_BUILD_TYPE=Release ../')
sh('make')
}
}
}
stage('Test Release') {
steps {
dir('build-release') {
sh('ctest')
}
}
}
stage('Package') {
steps {
dir('build-release') {
sh('cpack')
}
}
}
}
post {
always {
recordIssues(tools: [cppCheck(), cmake(), gcc(), clang()])
}
failure {
emailext(body: "Check console output at ${env.BUILD_URL} to view the results.", subject: "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER} - ${currentBuild.currentResult}", to: "[email protected]")
}
}
}