This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
forked from The-OpenROAD-Project/OpenROAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
159 lines (159 loc) · 5.33 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
pipeline {
agent any;
options {
timeout(time: 1, unit: 'HOURS')
}
environment {
COMMIT_AUTHOR_EMAIL = sh (returnStdout: true, script: "git --no-pager show -s --format='%ae'").trim();
}
stages {
stage('Build and test') {
parallel {
stage('Local centos7 gcc8') {
agent any;
stages {
stage('Build centos7 gcc8') {
steps {
sh './etc/Build.sh';
}
}
stage('Test centos7 gcc8') {
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' },
)
}
}
}
}
post {
always {
sh "find . -name results -type d -exec tar zcvf {}.tgz {} ';'";
archiveArtifacts artifacts: '**/results.tgz', allowEmptyArchive: true;
}
}
}
stage('Local centos7 gcc8 without GUI') {
agent any;
stages {
stage('Build centos7 gcc8 without GUI') {
steps {
sh './etc/Build.sh -no-gui -dir=build-without-gui';
}
}
}
}
stage('Docker centos7 gcc8') {
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 gcc8': { sh './etc/DockerHelper.sh create -os=centos7 -target=builder -compiler=gcc' },
'build clang7': { sh './etc/DockerHelper.sh create -os=centos7 -target=builder -compiler=clang' },
)
}
}
}
stage('Test docker centos7') {
steps {
script {
parallel (
'test gcc8': { sh './etc/DockerHelper.sh test -os=centos7 -target=builder -compiler=gcc' },
'test clang7': { sh './etc/DockerHelper.sh test -os=centos7 -target=builder -compiler=clang' },
)
}
}
}
}
}
stage('Docker ubuntu20 gcc9') {
agent any;
stages{
stage('Pull ubuntu20') {
steps {
retry(3) {
script {
try {
sh 'docker pull openroad/ubuntu20-dev'
}
catch (err) {
echo err.getMessage();
sh 'sleep 1m ; exit 1';
}
}
}
}
}
stage('Build docker ubuntu20') {
steps {
script {
parallel (
'build gcc9': { sh './etc/DockerHelper.sh create -os=ubuntu20 -target=builder -compiler=gcc' },
'build clang10': { sh './etc/DockerHelper.sh create -os=ubuntu20 -target=builder -compiler=clang' },
)
}
}
}
stage('Test docker ubuntu20') {
steps {
script {
parallel (
'test gcc9': { sh './etc/DockerHelper.sh test -os=ubuntu20 -target=builder -compiler=gcc' },
'test clang10': { sh './etc/DockerHelper.sh test -os=ubuntu20 -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',
);
}
}
}
}