-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
206 lines (206 loc) · 7.04 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
pipeline {
agent any;
options {
timeout(time: 75, unit: 'MINUTES')
}
environment {
COMMIT_AUTHOR_EMAIL = sh (returnStdout: true, script: "git --no-pager show -s --format='%ae'").trim();
EQUIVALENCE_CHECK = 1;
}
stages {
stage('Build and test') {
parallel {
stage('Local centos7 gcc') {
agent any;
stages {
stage('Build centos7 gcc') {
steps {
sh './etc/Build.sh -no-warnings';
}
}
stage('Check message IDs') {
steps {
sh 'cd src && ../etc/find_messages.py > messages.txt';
}
}
stage('Test centos7 gcc') {
steps {
script {
parallel (
'Unit tests': { sh './test/regression' },
'nangate45 aes': { sh './test/regression aes_nangate45' },
'nangate45 gcd': { sh './test/regression gcd_nangate45' },
'nangate45 tinyRocket': { sh './test/regression tinyRocket_nangate45' },
'sky130hd aes': { sh './test/regression aes_sky130hd' },
'sky130hd gcd': { sh './test/regression gcd_sky130hd' },
'sky130hd ibex': { sh './test/regression ibex_sky130hd' },
'sky130hs aes': { sh './test/regression aes_sky130hs' },
'sky130hs gcd': { sh './test/regression gcd_sky130hs' },
'sky130hs ibex': { sh './test/regression ibex_sky130hs' },
)
}
}
}
}
post {
always {
sh "find . -name results -type d -exec tar zcvf {}.tgz {} ';'";
archiveArtifacts artifacts: '**/results.tgz', allowEmptyArchive: true;
}
}
}
stage('Local centos7 gcc without GUI') {
agent any;
stages {
stage('Build centos7 gcc without GUI') {
steps {
sh './etc/Build.sh -no-warnings -no-gui -dir=build-without-gui';
}
}
}
}
stage('Docker centos7 gcc') {
agent any;
stages{
stage('Pull centos7') {
steps {
retry(3) {
script {
try {
sh 'docker pull openroad/centos7-dev'
}
catch (err) {
echo err.getMessage();
sh 'sleep 1m ; exit 1';
}
}
}
}
}
stage('Build docker centos7') {
steps {
script {
parallel (
'build gcc': { sh './etc/DockerHelper.sh create -os=centos7 -target=builder -compiler=gcc' },
'build clang': { sh './etc/DockerHelper.sh create -os=centos7 -target=builder -compiler=clang' },
)
}
}
}
stage('Test docker centos7') {
steps {
script {
parallel (
'test gcc': { sh './etc/DockerHelper.sh test -os=centos7 -target=builder -compiler=gcc' },
'test clang': { sh './etc/DockerHelper.sh test -os=centos7 -target=builder -compiler=clang' },
)
}
}
}
}
}
stage('Docker Ubuntu 20.04 gcc') {
agent any;
stages{
stage('Pull Ubuntu 20.04') {
steps {
retry(3) {
script {
try {
sh 'docker pull openroad/ubuntu20.04-dev'
}
catch (err) {
echo err.getMessage();
sh 'sleep 1m ; exit 1';
}
}
}
}
}
stage('Build docker Ubuntu 20.04') {
steps {
script {
parallel (
'build gcc': { sh './etc/DockerHelper.sh create -os=ubuntu20.04 -target=builder -compiler=gcc' },
'build clang': { sh './etc/DockerHelper.sh create -os=ubuntu20.04 -target=builder -compiler=clang' },
)
}
}
}
stage('Test docker Ubuntu 20.04') {
steps {
script {
parallel (
'test gcc': { sh './etc/DockerHelper.sh test -os=ubuntu20.04 -target=builder -compiler=gcc' },
'test clang': { sh './etc/DockerHelper.sh test -os=ubuntu20.04 -target=builder -compiler=clang' },
)
}
}
}
}
}
stage('Docker Ubuntu 22.04 gcc') {
agent any;
stages{
stage('Pull Ubuntu 22.04') {
steps {
retry(3) {
script {
try {
sh 'docker pull openroad/ubuntu22.04-dev'
}
catch (err) {
echo err.getMessage();
sh 'sleep 1m ; exit 1';
}
}
}
}
}
stage('Build docker Ubuntu 22.04') {
steps {
script {
parallel (
'build gcc': { sh './etc/DockerHelper.sh create -os=ubuntu22.04 -target=builder -compiler=gcc' },
'build clang': { sh './etc/DockerHelper.sh create -os=ubuntu22.04 -target=builder -compiler=clang' },
)
}
}
}
stage('Test docker Ubuntu 22.04') {
steps {
script {
parallel (
'test gcc': { sh './etc/DockerHelper.sh test -os=ubuntu22.04 -target=builder -compiler=gcc' },
'test clang': { sh './etc/DockerHelper.sh test -os=ubuntu22.04 -target=builder -compiler=clang' },
)
}
}
}
}
}
}
}
}
post {
failure {
script {
if ( env.BRANCH_NAME == 'master' ) {
echo('Main development branch: report to stakeholders and commit author.');
EMAIL_TO="$COMMIT_AUTHOR_EMAIL, \$DEFAULT_RECIPIENTS, [email protected]";
REPLY_TO="$EMAIL_TO";
} else {
echo('Feature development branch: report only to commit author.');
EMAIL_TO="$COMMIT_AUTHOR_EMAIL";
REPLY_TO='$DEFAULT_REPLYTO';
}
emailext (
to: "$EMAIL_TO",
replyTo: "$REPLY_TO",
subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
);
}
}
}
}