forked from rust-ethereum/evm
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
145 lines (145 loc) · 4.6 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
pipeline {
agent none
stages {
stage('Install Rust') {
parallel {
stage('macos') {
agent { label 'macos' }
steps {
sh './ci/install_rust.sh'
}
}
stage('linux') {
agent { label 'linux' }
steps {
sh './ci/install_rust.sh'
}
}
stage('windows') {
agent { label 'windows' }
steps {
powershell '& ./ci/install_rust.ps1'
}
}
}
}
stage('Build') {
parallel {
stage('macos') {
agent {
label 'macos'
}
stages {
stage('stable') {
steps {
sh './ci/build.sh'
}
}
stage('beta') {
steps {
sh './ci/build.sh +beta'
}
}
stage('nightly') {
steps {
sh './ci/build.sh +nightly'
}
}
}
}
stage('linux') {
agent {
label 'linux'
}
stages {
stage('stable') {
steps {
sh './ci/build.sh'
}
}
stage('beta') {
steps {
sh './ci/build.sh +beta'
}
}
stage('nightly') {
steps {
sh './ci/build.sh +nightly'
}
}
}
}
stage('windows') {
agent {
label 'windows'
}
stages {
stage('stable') {
steps {
bat 'call ./ci/build.bat'
}
}
}
}
}
}
stage('Test') {
parallel {
stage('macos') {
agent {
label 'macos'
}
steps {
sh './ci/test.sh'
}
}
stage('linux') {
agent {
label 'linux'
}
steps {
sh './ci/test.sh'
}
}
stage('windows') {
agent {
label 'windows'
}
steps {
bat 'call ./ci/test.bat'
}
}
}
}
stage('Lint') {
agent { node { label 'macos' } }
steps {
sh 'cargo check 2>&1 | tee rustc.build_log'
sh 'cargo clean'
sh 'cargo clippy 2>&1 | tee clippy.build_log'
sh 'if grep -q "^error" clippy.build_log; then echo "clippy found a severe error"; exit 1; fi'
}
post {
always {
script {
recordIssues enabledForFailure: true,
qualityGates: [[threshold: 10, type: 'TOTAL', unstable: true]],
healthy: 5, unhealthy: 20, minimumSeverity: 'HIGH',
tools: [
groovyScript(parserId: 'clippy-warnings', pattern: "clippy.build_log", reportEncoding:'UTF-8'),
groovyScript(parserId: 'rustc-warnings', pattern: "rustc.build_log", reportEncoding:'UTF-8')
]
}
}
}
}
stage('Rustfmt') {
agent {
label 'macos'
}
steps {
sh 'cargo fmt -- --check'
}
}
}
}