-
Notifications
You must be signed in to change notification settings - Fork 61
/
Jenkinsfile
132 lines (115 loc) · 2.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
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
#!groovy
pipeline
{
agent none
parameters {
booleanParam(defaultValue: false, description: 'Is the pull request approved for testing?', name: 'TRUST_BUILD')
}
stages {
stage ("info")
{
steps
{
echo "PR: ${env.CHANGE_ID} - ${env.CHANGE_TITLE}"
echo "CHANGE_AUTHOR_EMAIL: ${env.CHANGE_AUTHOR_EMAIL}"
echo "building on node ${env.NODE_NAME}"
}
}
stage ("Check permissions")
{
when {
allOf {
environment name: 'TRUST_BUILD', value: 'false'
not {branch 'master'}
not {changeRequest authorEmail: "timo.heister@gmail.com"}
}
}
steps {
echo "Please ask an admin to rerun Jenkins with TRUST_BUILD=true"
sh "exit 1"
}
}
stage ("Ubuntu-20.04")
{
options {timeout(time: 600, unit: 'MINUTES')}
agent
{
dockerfile
{
dir 'contrib/ubuntu2004'
}
}
steps
{
sh '''#!/bin/bash
set -e
set -x
mpicxx -v
cmake --version
# Ubuntu 20.04 only ships cmake 3.16 not 3.17:
echo 'PACKAGES="once:cmake ${PACKAGES}"' > local.cfg
rm -rf $WORKSPACE/install
./candi.sh -j 8 -p $WORKSPACE/install
cp $WORKSPACE/install/tmp/build/deal.II-*/detailed.log detailed-ubuntu2004.log
'''
archiveArtifacts artifacts: 'detailed-ubuntu2004.log', fingerprint: true
sh '''#!/bin/bash
cd $WORKSPACE/install/tmp/build/deal.II-* && make test
'''
}
}
stage ("Ubuntu-22.04")
{
options {timeout(time: 600, unit: 'MINUTES')}
agent
{
dockerfile
{
dir 'contrib/ubuntu2204'
}
}
steps
{
sh '''#!/bin/bash
set -e
set -x
mpicxx -v
cmake --version
rm -f local.cfg
rm -rf $WORKSPACE/install/
./candi.sh -j 8 -p $WORKSPACE/install
cp $WORKSPACE/install/tmp/build/deal.II-*/detailed.log detailed-ubuntu2204.log
'''
archiveArtifacts artifacts: 'detailed-ubuntu2204.log', fingerprint: true
sh '''#!/bin/bash
cd $WORKSPACE/install/tmp/build/deal.II-* && make test
'''
}
}
stage ("OSX-M1")
{
options {timeout(time: 600, unit: 'MINUTES')}
agent
{
node
{
label 'osx'
}
}
post { cleanup { cleanWs() } }
steps
{
sh '''#!/bin/bash
set -e
set -x
./candi.sh -j 8 --packages="p4est petsc trilinos sundials dealii" -p $WORKSPACE
cp $WORKSPACE/tmp/build/deal.II-*/detailed.log detailed-osx.log
'''
archiveArtifacts artifacts: 'detailed-osx.log', fingerprint: true
sh '''#!/bin/bash
cd $WORKSPACE/tmp/build/deal.II-* && ctest -j 4 --output-on-failure
'''
}
}
}
}