This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
138 lines (138 loc) · 2.88 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
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
stage('Clean') {
when {
anyOf {
branch 'master'
changeRequest()
}
}
steps {
sh 'git checkout .'
sh 'git clean -xfd'
}
}
stage('Dependencies') {
parallel {
stage('rustup') {
steps {
sh './scripts/post-rustup-install.sh'
}
}
stage('yarn') {
steps {
sh '(cd visualization-client && yarn)'
}
}
stage('poetry') {
steps {
sh '(cd docs && poetry install)'
}
}
}
}
stage('Build') {
parallel {
stage('cargo build') {
steps {
sh 'cargo build'
}
}
stage('cargo doc') {
when {
branch 'master'
}
steps {
sh 'cargo doc --all --all-features'
sh '(cd docs && poetry run ./build-index.py)'
}
}
stage('cargo doc --no-deps') {
when {
changeRequest()
}
steps {
sh 'cargo doc --all --all-features --no-deps'
sh '(cd docs && poetry run ./build-index.py)'
}
}
stage('wasm') {
steps {
sh './visualization-client/scripts/build.py --webpack'
}
}
}
}
stage('Test') {
parallel {
stage('cargo test') {
steps {
sh 'cargo test --all-features'
}
}
stage('wasm-loading-test') {
steps {
sh 'bash visualization-client/scripts/wasm-loading-test.sh'
}
}
}
}
stage('Style checks') {
when {
anyOf {
branch 'master'
changeRequest()
}
}
parallel {
stage('clippy') {
steps {
sh 'cargo clippy -- -Dwarnings'
}
}
stage('clippy tests') {
steps {
sh 'cargo clippy --tests --all-features -- -Dwarnings'
}
}
stage('rustfmt') {
steps {
sh 'cargo fmt --all -- --check'
}
}
stage('additional lints') {
steps {
sh './scripts/additional-lints.py'
}
}
stage('tslint') {
steps {
sh '(cd visualization-client && yarn lint)'
}
}
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
sh "tar -cvf docs.tar.gz -C target/doc ."
sh "./.jenkins/deploy-docs.sh"
}
}
}
post {
failure {
script {
if (env.BRANCH_NAME == 'master') {
step([$class: 'TelegramBotPublisher', message: 'Branch ${BUILD_TAG} failed. ${RUN_DISPLAY_URL}', whenFailed: true])
}
}
}
}
}