-
Notifications
You must be signed in to change notification settings - Fork 455
/
Jenkinsfile
120 lines (118 loc) · 3.98 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
pipeline {
agent {
label 'mm'
}
options {
ansiColor('xterm')
}
stages {
stage('Check formatting') {
steps {
echo 'Checking formatting...'
sh 'bash -c "tools/check_format.sh 2>&1 >(tee tools/check_format.txt)"'
}
}
stage('Check relocs') {
steps {
echo 'Checking relocs on spec...'
sh 'bash -c "tools/reloc_spec_check.sh"'
}
}
stage('Install Python dependencies') {
steps {
sh 'bash -c "make -j venv"'
sh '.venv/bin/python3 -m pip install GitPython' // Progress script from jenkins requires GitPython
}
}
stage('Copy ROM') {
steps {
echo 'Setting up ROM...'
sh 'cp /usr/local/etc/roms/mm.us.rev1.z64 baseroms/n64-us/baserom.z64'
}
}
stage('Setup') {
steps {
sh 'bash -c "make -j setup 2> >(tee tools/warnings_count/warnings_setup_new.txt)"'
}
}
stage('Check setup warnings') {
steps {
sh 'bash -c "./tools/warnings_count/compare_warnings.sh setup"'
}
}
stage('Assets') {
steps {
sh 'bash -c "make -j assets 2> >(tee tools/warnings_count/warnings_assets_new.txt)"'
}
}
stage('Check assets warnings') {
steps {
sh 'bash -c "./tools/warnings_count/compare_warnings.sh assets"'
}
}
stage('Disasm') {
steps {
sh 'bash -c "make -j disasm 2> >(tee tools/warnings_count/warnings_disasm_new.txt)"'
}
}
stage('Check disasm warnings') {
steps {
sh 'bash -c "./tools/warnings_count/compare_warnings.sh disasm"'
}
}
stage('Build') {
steps {
sh 'bash -c "make -j rom 2> >(tee tools/warnings_count/warnings_build_new.txt)"'
}
}
stage('Check build warnings') {
steps {
sh 'bash -c "./tools/warnings_count/compare_warnings.sh build"'
}
}
stage('Compress') {
steps {
sh 'bash -c "make -j compress 2> >(tee tools/warnings_count/warnings_compress_new.txt)"'
}
}
stage('Check compress warnings') {
steps {
sh 'bash -c "./tools/warnings_count/compare_warnings.sh compress"'
}
}
stage('Report Progress') {
when {
branch 'main'
}
steps {
sh 'mkdir reports'
sh '.venv/bin/python3 ./tools/progress.py csv >> reports/progress-mm-nonmatching.csv'
sh '.venv/bin/python3 ./tools/progress.py csv -m >> reports/progress-mm-matching.csv'
sh '.venv/bin/python3 ./tools/progress.py shield-json > reports/progress-mm-shield.json'
stash includes: 'reports/*', name: 'reports'
}
}
stage('Update Progress') {
when {
branch 'main'
}
agent{
label 'zeldaret_website'
}
steps {
unstash 'reports'
sh 'cat reports/progress-mm-nonmatching.csv >> /var/www/zelda64.dev/assets/csv/progress-mm-nonmatching.csv'
sh 'cat reports/progress-mm-matching.csv >> /var/www/zelda64.dev/assets/csv/progress-mm-matching.csv'
sh 'cat reports/progress-mm-shield.json > /var/www/zelda64.dev/assets/csv/progress-mm-shield.json'
}
}
}
post {
failure {
sh 'cat tools/check_format.txt tools/warnings_count/warnings_setup_new.txt tools/warnings_count/warnings_disasm_new.txt tools/warnings_count/warnings_build_new.txt'
}
always {
cleanWs()
}
}
}