/
Jenkinsfile
90 lines (89 loc) · 1.76 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
pipeline {
agent {
label 'linux'
}
environment {
PATH = "/usr/local/bin:/usr/bin:/bin"
CC = "mpicc"
FIREDRAKE_CI_TESTS = "1"
PYTHONHASHSEED = "12453221"
}
stages {
stage('Clean') {
steps {
dir('tmp') {
deleteDir()
}
}
}
stage('Build') {
steps {
sh 'mkdir tmp'
dir('tmp') {
timestamps {
sh '../scripts/firedrake-install --disable-ssh --minimal-petsc ${SLEPC} --adjoint --slope --install thetis --install gusto ${PACKAGE_MANAGER}'
}
}
}
}
stage('Lint'){
steps {
dir('tmp') {
timestamps {
sh '''
. ./firedrake/bin/activate
pip install flake8
cd firedrake/src/firedrake
make lint
'''
}
}
}
}
stage('Test'){
steps {
dir('tmp') {
timestamps {
sh '''
. ./firedrake/bin/activate
export PYOP2_CACHE_DIR=${VIRTUAL_ENV}/pyop2_cache
export FIREDRAKE_TSFC_KERNEL_CACHE_DIR=${VIRTUAL_ENV}/tsfc_cache
firedrake-clean
pip install pytest-cov pytest-xdist
pip list
cd firedrake/src/firedrake
py.test -n 4 --cov firedrake -v tests
'''
}
}
}
}
stage('Test Adjoint'){
steps {
dir('tmp') {
timestamps {
sh '''
. ./firedrake/bin/activate
export PYOP2_CACHE_DIR=${VIRTUAL_ENV}/pyop2_cache
export FIREDRAKE_TSFC_KERNEL_CACHE_DIR=${VIRTUAL_ENV}/tsfc_cache
cd firedrake/src/dolfin-adjoint; py.test -n 4 -v tests_firedrake
'''
}
}
}
}
stage('Codecov'){
steps {
dir('tmp') {
timestamps {
sh '''
. ./firedrake/bin/activate
cd firedrake/src/firedrake
curl -s https://codecov.io/bash | bash
'''
}
}
}
}
}
}