forked from zeldaret/oot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
115 lines (114 loc) · 3.4 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
pipeline {
agent {
label 'oot'
}
stages {
stage('Check formatting (full)') {
when {
branch 'main'
}
steps {
echo 'Checking formatting on all files...'
sh 'python3 tools/check_format.py'
}
}
stage('Check formatting (modified)') {
when {
not {
branch 'main'
}
}
steps {
echo 'Checking formatting on modified files...'
sh 'python3 tools/check_format.py --verbose --compare-to origin/main'
}
}
stage('Setup gc-eu-mq-dbg') {
steps {
sh 'cp /usr/local/etc/roms/oot-gc-eu-mq-dbg.z64 baseroms/gc-eu-mq-dbg/baserom.z64'
sh 'make -j setup'
}
}
stage('Build gc-eu-mq-dbg (qemu-irix)') {
when {
branch 'main'
}
steps {
sh 'make -j ORIG_COMPILER=1'
}
}
stage('Build gc-eu-mq-dbg') {
when {
not {
branch 'main'
}
}
steps {
sh 'make -j RUN_CC_CHECK=0'
}
}
stage('Setup gc-eu-mq') {
steps {
sh 'cp /usr/local/etc/roms/oot-gc-eu-mq.z64 baseroms/gc-eu-mq/baserom.z64'
sh 'make -j setup VERSION=gc-eu-mq'
}
}
stage('Build gc-eu-mq (qemu-irix)') {
when {
branch 'main'
}
steps {
sh 'make -j VERSION=gc-eu-mq ORIG_COMPILER=1'
}
}
stage('Build gc-eu-mq') {
when {
not {
branch 'main'
}
}
steps {
sh 'make -j VERSION=gc-eu-mq RUN_CC_CHECK=0'
}
}
stage('Report Progress') {
when {
branch 'main'
}
steps {
sh 'mkdir reports'
sh 'python3 progress.py csv >> reports/progress-oot-nonmatching.csv'
sh 'python3 progress.py csv -m >> reports/progress-oot-matching.csv'
sh 'python3 progress.py shield-json > reports/progress-oot-shield.json'
stash includes: 'reports/*', name: 'reports'
}
}
stage('Update Progress') {
when {
branch 'main'
}
agent {
label 'zeldaret_website'
}
steps {
unstash 'reports'
sh 'cat reports/progress-oot-nonmatching.csv >> /var/www/zelda64.dev/assets/csv/progress-oot-nonmatching.csv'
sh 'cat reports/progress-oot-matching.csv >> /var/www/zelda64.dev/assets/csv/progress-oot-matching.csv'
sh 'cat reports/progress-oot-shield.json > /var/www/zelda64.dev/assets/csv/progress-oot-shield.json'
}
}
}
post {
always {
echo "Finished, deleting directory."
deleteDir()
}
cleanup {
echo "Clean up in post."
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true)
}
}
}