-
Notifications
You must be signed in to change notification settings - Fork 63
/
Jenkinsfile
184 lines (179 loc) · 6.65 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#!groovy
pipeline {
agent {
label 'cme-eastwatch'
}
options {
timeout(time: 1, unit: 'HOURS')
}
parameters {
string(name: 'BUILD_DIR_CLANG', defaultValue: 'build-clang-12')
string(name: 'BUILD_DIR_GCC', defaultValue: 'build-gcc-11')
string(name: 'BUILD_DIR_GCC_OPENMPI', defaultValue: 'build-gcc-11-openmpi')
}
stages {
stage('Submodules') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-clang-12'
dir 'ci'
}
}
steps {
sh '''
git submodule update --init --recursive
git submodule add https://github.com/amkozlov/ngtest.git
'''
}
}
stage('Build') {
parallel {
stage('clang-12') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-clang-12'
dir 'ci'
}
}
steps {
sh """
rm -fr ${params.BUILD_DIR_CLANG} && mkdir -p ${params.BUILD_DIR_CLANG} && cd ${params.BUILD_DIR_CLANG}
cmake -DCMAKE_BUILD_TYPE=Release .. 2>&1 |tee cmake.out
make 2>&1 |tee make.out
"""
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: false,
tool: clang(id: 'clang-12', pattern: "${params.BUILD_DIR_CLANG}/make.out")
}
}
}
stage('gcc-11') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-gcc-11'
dir 'ci'
}
}
steps {
sh """
rm -fr ${params.BUILD_DIR_GCC} && mkdir -p ${params.BUILD_DIR_GCC} && cd ${params.BUILD_DIR_GCC}
cmake -DCMAKE_BUILD_TYPE=Release .. 2>&1 |tee cmake.out
make 2>&1 |tee make.out
"""
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: false,
tool: clang(id: 'gcc-11', pattern: "${params.BUILD_DIR_GCC}/make.out")
}
}
}
stage('gcc-11-openmpi') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-gcc-11'
dir 'ci'
}
}
steps {
sh """
rm -fr ${params.BUILD_DIR_GCC_OPENMPI} && mkdir -p ${params.BUILD_DIR_GCC_OPENMPI} && cd ${params.BUILD_DIR_GCC_OPENMPI}
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_MPI=ON .. 2>&1 |tee cmake.out
make 2>&1 |tee make.out
"""
}
post {
always {
recordIssues enabledForFailure: true, aggregatingResults: false,
tool: clang(id: "${STAGE_NAME}", pattern: "${params.BUILD_DIR_GCC_OPENMPI}/make.out")
}
}
}
}
}
stage('Unit tests') {
parallel {
stage('clang-12') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-clang-12'
dir 'ci'
}
}
steps {
sh "cd ${params.BUILD_DIR_CLANG} && make test"
}
post {
always {
step([
$class: 'XUnitPublisher',
thresholds: [[$class: 'FailedThreshold', unstableThreshold: '1']],
tools: [[$class: 'GoogleTestType', pattern: "${params.BUILD_DIR_CLANG}/test/*.xml"]]
])
}
}
}
stage('gcc-11') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-gcc-11'
dir 'ci'
}
}
steps {
sh "cd ${params.BUILD_DIR_GCC} && make test"
}
post {
always {
step([
$class: 'XUnitPublisher',
thresholds: [[$class: 'FailedThreshold', unstableThreshold: '1']],
tools: [[$class: 'GoogleTestType', pattern: "${params.BUILD_DIR_GCC}/test/*.xml"]]
])
}
}
}
}
}
stage('Regression tests') {
agent {
dockerfile {
reuseNode true
filename 'dockerfile-clang-12'
dir 'ci'
}
}
steps {
sh """
ngtest/runtest.py ${params.BUILD_DIR_CLANG}/bin/raxml-ng
cd ci && ./generate_html.py ../ngtest/out/1.1.0-master/T1W1
"""
}
post {
always {
publishHTML(target : [
allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'ci',
reportFiles: 'benchmark.html',
reportName: 'Benchmark',
reportTitles: 'Benchmark'])
}
}
}
}
post {
failure {
mail to: 'alexey.kozlov@h-its.org', subject: "FAILURE: ${currentBuild.fullDisplayName}", body: "Failed."
}
}
}