-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
53 lines (48 loc) · 1.21 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
def compilers = ['g++', 'clang++']
def create_unittest_build(String compiler, String buildSubdir) {
return {
node ('ubuntu64') {
stage("Unit Tests (${compiler})") {
checkout scm
dir (buildSubdir) {
sh "cmake -DCMAKE_CXX_COMPILER=${compiler} .."
sh "make -j\$((2*\$(getconf _NPROCESSORS_ONLN)))"
sh "make test"
junit 'tests/unittests/test_detail.xml'
}
}
}
}
}
def executions = [:]
for(int i = 0; i < compilers.size(); i++) {
executions['unittest-' + compilers[i]] = create_unittest_build(compilers[i], 'build')
}
executions['doc'] = {
node {
stage('Documentation') {
checkout scm
dir ('build') {
sh "cmake -DBUILD_DOCUMENTATION=on .."
sh "make doc"
archiveArtifacts artifacts: 'doc/', fingerprint: false
}
}
}
}
executions['coverage'] = {
node ('ubuntu64') {
stage('Coverage') {
checkout scm
dir ('build') {
sh "cmake -DBUILD_COVERAGE=on .."
sh "make -j\$((2*\$(getconf _NPROCESSORS_ONLN)))"
sh "make coverage"
archiveArtifacts artifacts: 'unit_test_coverage/', fingerprint: false
}
}
}
}
timestamps {
parallel executions
}