-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
335 lines (326 loc) · 15.8 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
pipeline {
agent none
options {
timeout(time: 2, unit: 'HOURS')
}
stages {
stage("Build and test on all platforms") {
parallel {
stage("Win64-Intel") {
agent {
node {
label 'master'
customWorkspace "E:/jenkins-pool/${BRANCH_NAME}/${BUILD_NUMBER}"
}
}
options {
timeout(time: 2, unit: 'HOURS')
}
environment {
COMPCODE = 'INW'
CRBUILDEXIT = 'TRUE' // exit build script on fail
CROPENMP = 'TRUE'
CR64BIT = 'TRUE'
MKL_DYNAMIC='FALSE'
MKL_NUM_THREADS='1'
MKL_THREADING_LAYER='SEQUENTIAL'
OMP_DYNAMIC='FALSE'
OMP_NUM_THREADS='1'
BUILD_CAUSE= ''
BUILD_CAUSE_MANUALTRIGGER= ''
BUILD_CAUSE_SCMTRIGGER= ''
BUILD_CAUSE_UPSTREAMTRIGGER= ''
ROOT_BUILD_CAUSE= ''
ROOT_BUILD_CAUSE_SCMTRIGGER= ''
ROOT_BUILD_CAUSE_TIMERTRIGGER= ''
BUILD_DISPLAY_NAME= ''
BUILD_ID= ''
BUILD_NUMBER= ''
BUILD_TAG= ''
BUILD_URL= ''
}
stages {
stage('Win64-Intel Build') { // Run the build
steps {
bat '''
call build\\setupenv.ifort_vc.SAYRE.bat
set _MSPDBSRV_ENDPOINT_=%RANDOM%
echo %_MSPDBSRV_ENDPOINT_%
start mspdbsrv -start -spawn -shutdowntime 90000
set
cd build
call make_w32.bat
mspdbsrv -stop
echo "Build step complete"
'''
}
}
stage('Win64-Intel Test') {
environment {
CRYSDIR = '.\\,..\\build\\'
COMPCODE = 'INW_OMP'
}
steps {
bat '''
for /f "tokens=1* delims==" %%a in ('set') do (
if /i NOT "%%a"=="PATH" set %%a=
)
set CRYSDIR=.\\,..\\build\\
set COMPCODE=INW_OMP
set CROPENMP=TRUE
set CR64BIT=TRUE
set MKL_DYNAMIC=FALSE
set MKL_NUM_THREADS=1
set MKL_THREADING_LAYER=SEQUENTIAL
set OMP_DYNAMIC=FALSE
set OMP_NUM_THREADS=1
set MKL_CBWR=COMPATIBLE
call build\\setupenv.ifort_vc.SAYRE.bat
cd test_suite
mkdir script
echo "%SCRIPT NONE" > script\\tipauto.scp
echo "%END SCRIPT" >> script\\tipauto.scp
del crfilev2.dsc
echo 'Here are the env variables'
set
perl testsuite.pl
'''
}
}
}
post {
always {
bat 'ren test_suite INW_OMP.org' // Change path here to get unique archive path.
archiveArtifacts artifacts: 'INW_OMP.org/*.out', fingerprint: true
}
}
}
// stage("MinGW") {
// agent { label 'master' }
// options {
// timeout(time: 2, unit: 'HOURS')
// }
// environment {
// COMPCODE = 'MIN'
// CRBUILDEXIT = 'TRUE' // exit build script on fail
// CROPENMP = 'TRUE'
// CR64BIT = 'TRUE'
// }
// stages {
// stage('MinGW debug build') { // Run the build
// steps {
// bat '''
// call build\\setupenv.SAYRE.bat
// rmdir /q/s b
// mkdir b
// cd b
// cmake -DCMAKE_BUILD_TYPE=Debug -DBLA_VENDOR=OpenBLAS -DMINGW=1 -DwxWidgets_ROOT_DIR=%WXWIN% -DwxWidgets_LIB_DIR=%WXLIB% -DwxWidgets_CONFIGURATION=mswu -G"MinGW Makefiles" ..
// mingw32-make -j3 || exit 1
// echo "Build step complete"
// '''
// }
// }
// stage('MinGW Smoketest') {
// environment {
// CRYSDIR = '.\\,..\\b\\'
// COMPCODE = 'MIN64'
// }
// steps {
// bat '''
// call build\\setupenv.SAYRE.bat
// cd test_suite
// mkdir script
// echo "%SCRIPT NONE" > script\\tipauto.scp
// echo "%END SCRIPT" >> script\\tipauto.scp
// del crfilev2.dsc
// perl testsuite.pl -s
// '''
// }
// }
// stage('MinGW Build') { // Run the build
// steps {
// bat '''
// call build\\setupenv.SAYRE.bat
// rmdir /q/s b
// mkdir b
// cd b
// cmake -DBLA_VENDOR=OpenBLAS -DMINGW=1 -DwxWidgets_ROOT_DIR=%WXWIN% -DwxWidgets_LIB_DIR=%WXLIB% -DwxWidgets_CONFIGURATION=mswu -G"MinGW Makefiles" ..
// mingw32-make -j3 || exit 1
// echo "Build step complete"
// '''
// }
// }
// stage('MinGW Test') {
// environment {
// CRYSDIR = '.\\,..\\b\\'
// COMPCODE = 'MIN64'
// }
// steps {
// bat '''
// call build\\setupenv.SAYRE.bat
// cd test_suite
// mkdir script
// echo "%SCRIPT NONE" > script\\tipauto.scp
// echo "%END SCRIPT" >> script\\tipauto.scp
// del crfilev2.dsc
// perl testsuite.pl
// '''
// }
// }
// }
// post {
// always {
// bat 'ren test_suite MIN64.org' // Change path here to get unique archive path.
// archiveArtifacts artifacts: 'MIN64.org/*.out', fingerprint: true
// }
// }
// }
//
// stage("Linux") {
// agent {label 'orion'}
// options {
// timeout(time: 1, unit: 'HOURS')
// }
// environment {
// LD_LIBRARY_PATH = '~/lib64:~/lib:/files/ric/pparois/root/lib64:/files/ric/pparois/root/lib:${env.LD_LIBRARY_PATH}'
// PATH = "~/bin:/files/ric/pparois/root/bin:$PATH"
// LD_RUN_PATH = '~/lib64:~/lib:/files/ric/pparois/root/lib64:/files/ric/pparois/root/lib:${env.LD_RUN_PATH}'
// CPLUS_INCLUDE_PATH = '/files/ric/pparois/root/include/'
// }
// stages {
// stage('Build Linux Smoketest') { // Run the build
// steps {
// sh '''
// echo $PATH
// module load intel/2017
// rm -Rf d
// mkdir d
// cd d
// cmake3 -DCMAKE_BUILD_TYPE=Debug -DuseGUI=off -DCMAKE_Fortran_COMPILER=gfortran73 -DCMAKE_C_COMPILER=gcc73 -DCMAKE_CXX_COMPILER=g++73 -DuseOPENMP=off -DBLA_VENDOR=OpenBLAS -DBLAS_LIBRARIES=/files/ric/pparois/root/lib/libopenblas.so -DLAPACK_LIBRARIES=/files/ric/pparois/root/lib/libopenblas.so ..
// nice -7 make -j6 || exit 1
// pwd
// '''
// }
// }
// stage('Run Linux Smoketest') {
// environment {
// CRYSDIR = './,../d/'
// COMPCODE = 'LIN'
// }
// steps {
// sh '''
// pwd
// cd test_suite
// mkdir -p script
// echo "%SCRIPT NONE" > script/tipauto.scp
// echo "%END SCRIPT" >> script/tipauto.scp
// rm -f crfilev2.dsc
// rm -f crfilev2.h5
// rm -f gui.tst
// nice -10 perl testsuite.pl -s
// '''
// }
// }
// stage('Linux Build') { // Run the build
// steps {
// sh '''
// echo $PATH
// module load intel/2017
// rm -Rf b
// mkdir b
// cd b
// cmake3 -DuseGUI=off -DuseOPENMP=no -DCMAKE_Fortran_COMPILER=gfortran73 -DCMAKE_C_COMPILER=gcc73 -DCMAKE_CXX_COMPILER=g++73 -DBLA_VENDOR=Intel10_64lp ..
// nice -7 make -j6 || exit 1
// pwd
// '''
// }
// }
// stage('Linux Test') {
// environment {
// CRYSDIR = './,../b/'
// COMPCODE = 'LIN'
// }
// steps {
// sh '''
// pwd
// cd test_suite
// mkdir -p script
// echo "%SCRIPT NONE" > script/tipauto.scp
// echo "%END SCRIPT" >> script/tipauto.scp
// rm -f crfilev2.dsc
// rm -f crfilev2.h5
// rm -f gui.tst
// nice -10 perl testsuite.pl
// '''
// }
// }
// }
// post {
// always {
// sh 'mv test_suite LIN.org' // Change path here to get unique archive path.
// archiveArtifacts artifacts: 'LIN.org/*.out', fingerprint: true
// }
// }
// }
//
}
}
stage('Win64-Intel Installer') {
/* when {
expression {
env.BRANCH_NAME == 'master'
}
}
*/
agent {
node {
label 'master'
customWorkspace "E:/jenkins-pool/${BRANCH_NAME}/${BUILD_NUMBER}"
}
}
options {
timeout(time: 2, unit: 'HOURS')
skipDefaultCheckout()
}
environment {
CRYSDIR = '.\\,..\\build\\'
COMPCODE = 'INW'
CROPENMP = 'TRUE'
CR64BIT = 'TRUE'
}
steps {
bat '''
call build\\setupenv.ifort_vc.SAYRE.bat
cd build
call make_w32.bat dist
xcopy /s /y ..\\debuginfo c:\\omp17-x64\\
'''
archiveArtifacts artifacts: 'installer/*.exe', fingerprint: true
}
}
stage('Deploy Win64 - master branch only') {
when {
expression {
env.BRANCH_NAME == 'master'
}
}
agent {
node {
label 'master'
customWorkspace "E:/jenkins-pool/${BRANCH_NAME}/${BUILD_NUMBER}"
}
}
options {
timeout(time: 2, unit: 'HOURS')
skipDefaultCheckout()
}
steps {
ftpPublisher alwaysPublishFromMaster: false, masterNodeName: 'master', continueOnError: false, failOnError: false, paramPublish: [parameterName:""], publishers: [
[configName: 'CRYSTALSXTL', transfers: [
[asciiMode: false, cleanRemote: false, excludes: '', flatten: true, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: "/", remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'installer/**.exe']
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true]
]
}
}
}
}