forked from geodynamics/Rayleigh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
72 lines (65 loc) · 1.61 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
#!groovy
pipeline {
agent {
kubernetes {
//cloud 'kubernetes'
label 'mypod'
containerTemplate {
name 'rayleigh'
image 'geodynamics/rayleigh-buildenv-bionic:latest'
ttyEnabled true
command 'cat'
alwaysPull true
}
}
}
options {
timeout(time: 2, unit: 'HOURS')
}
stages {
stage('Build') {
options {
timeout(time: 15, unit: 'MINUTES')
}
steps {
container('rayleigh') {
sh '''
./configure \
--with-blas='/usr' \
--with-fftw='/usr' \
--with-lapack='/usr'
'''
sh 'make'
sh 'make install'
}
}
}
stage('Test') {
options {
timeout(time: 90, unit: 'MINUTES')
}
steps {
container('rayleigh') {
sh 'cp input_examples/benchmark_diagnostics_input main_input'
// This model expects 4 MPI processes, but MPI does not work
// inside the container at the moment, so instead run in serial
// also reduce runtime of the model for fast testing
sh '''
sed \
--in-place \
-e 's/nprow = 2/nprow = 1/' \
-e 's/npcol = 2/npcol = 1/' \
-e 's/max_iterations = 40000/max_iterations = 400/' \
main_input
'''
sh '''
# This export avoids a warning about
# a discovered, but unconnected infiniband network.
export OMPI_MCA_btl=self,tcp
./bin/rayleigh.dbg
'''
}
}
}
}
}