mm/Jenkinsfile
Anghelo Carvajal d4dc34ee71
Update progress script with new assets categories and update csv output format (#510)
* Reorganize csvs and progress.py

* Put stuff in the correct folders

* Reduce lots of repeated code

* Change csv output format

* Filter out automaticaly named variables in "Matching" progress calculation for assets

* Address Elliptic's review

* Don't count handwritten files in progress and add a way to fix files detected in the wrong section

* Add missing "total"

* More fixing

* Add two missing columns

* Update paths in Jenkinsfile

* Update progress shield in readme

* Update progress link
2021-12-18 16:37:37 +00:00

85 lines
2.8 KiB
Groovy

pipeline {
agent {
label 'mm'
}
stages {
stage('Check formatting') {
steps {
echo 'Checking formatting...'
sh 'bash -c "tools/check_format.sh 2>&1 >(tee tools/check_format.txt)"'
}
}
stage('Copy ROM') {
steps {
echo 'Setting up ROM...'
sh 'cp /usr/local/etc/roms/mm.us.rev1.z64 baserom.mm.us.rev1.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('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 all 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('Report Progress') {
when {
branch 'master'
}
steps {
sh 'mkdir reports'
sh 'python3 ./tools/progress.py csv >> reports/progress-mm-nonmatching.csv'
sh 'python3 ./tools/progress.py csv -m >> reports/progress-mm-matching.csv'
sh 'python3 ./tools/progress.py shield-json > reports/progress-mm-shield.json'
stash includes: 'reports/*', name: 'reports'
}
}
stage('Update Progress') {
when {
branch 'master'
}
agent{
label 'master'
}
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()
}
}
}