mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
Don't uniq warnings and write initial build to file (#407)
* Don't uniq warnings and write initial build to file * Don't build twice, turn ccache off by default
This commit is contained in:
parent
afab424519
commit
3ed6f5b382
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -10,12 +10,12 @@ pipeline {
|
||||
sh 'cp /usr/local/etc/roms/papermario.jp.z64 ver/jp/baserom.z64'
|
||||
sh 'curl -L "https://github.com/pmret/gcc-papermario/releases/download/master/linux.tar.gz" | tar zx -C tools/build/cc/gcc'
|
||||
sh 'curl -L "https://github.com/pmret/binutils-papermario/releases/download/master/linux.tar.gz" | tar zx -C tools/build/cc/gcc'
|
||||
sh './configure --no-ccache'
|
||||
sh './configure'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'ninja'
|
||||
sh 'ninja 2>&1 | tee build_log.txt'
|
||||
}
|
||||
}
|
||||
stage("Comment") {
|
||||
@ -29,7 +29,7 @@ pipeline {
|
||||
if (env.CHANGE_ID) {
|
||||
def us_progress = sh(returnStdout: true, script: "python3 progress.py us --pr-comment").trim()
|
||||
def jp_progress = sh(returnStdout: true, script: "python3 progress.py jp --pr-comment").trim()
|
||||
def warnings = sh(returnStdout: true, script: "./tools/warnings_count/check_new_warnings.sh --pr-message").trim()
|
||||
def warnings = sh(returnStdout: true, script: "./tools/warnings_count/check_new_warnings.sh --jenkins").trim()
|
||||
def comment_id = -1
|
||||
|
||||
for (comment in pullRequest.comments) {
|
||||
|
@ -638,7 +638,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument("-d", "--debug", action="store_true", help="Generate debugging information")
|
||||
parser.add_argument("-n", "--non-matching", action="store_true", help="Compile nonmatching code. Combine with --debug for more detailed debug info")
|
||||
parser.add_argument("-w", "--no-warn", action="store_true", help="Inhibit compiler warnings")
|
||||
parser.add_argument("--no-ccache", action="store_true", help="Don't use ccache")
|
||||
parser.add_argument("--ccache", action="store_true", help="Use ccache")
|
||||
args = parser.parse_args()
|
||||
|
||||
exec_shell(["make", "-C", str(ROOT / args.splat)])
|
||||
@ -706,7 +706,7 @@ if __name__ == "__main__":
|
||||
|
||||
ninja = ninja_syntax.Writer(open(str(ROOT / "build.ninja"), "w"), width=9999)
|
||||
|
||||
write_ninja_rules(ninja, args.cpp or "cpp", cppflags, cflags, not args.no_ccache)
|
||||
write_ninja_rules(ninja, args.cpp or "cpp", cppflags, cflags, args.ccache)
|
||||
write_ninja_for_tools(ninja)
|
||||
|
||||
skip_files = set()
|
||||
|
@ -1,11 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# This script can be used when you want to test locally the amount of warnings produced by your changes before doing a PR.
|
||||
|
||||
pyflags=""
|
||||
rebuild=false
|
||||
|
||||
if [[ $1 == "--jenkins" ]]
|
||||
then
|
||||
pyflags="--pr-message"
|
||||
rebuild=false
|
||||
else
|
||||
rebuild=true
|
||||
fi
|
||||
|
||||
if $rebuild
|
||||
then
|
||||
echo "Rebuilding to collect warnings..."
|
||||
rm -rf ver/*/build/src
|
||||
ninja | grep warning | sort > tools/warnings_count/warnings_new.txt
|
||||
else
|
||||
cat build_log.txt | grep warning | sort > tools/warnings_count/warnings_new.txt
|
||||
fi
|
||||
|
||||
curl -L https://papermar.io/reports/warnings.txt > tools/warnings_count/warnings.txt
|
||||
|
||||
rm -rf ver/*/build/src
|
||||
ninja | grep warning | sort | uniq > tools/warnings_count/warnings_new.txt
|
||||
|
||||
python3 tools/warnings_count/compare_warnings.py tools/warnings_count/warnings.txt tools/warnings_count/warnings_new.txt $@
|
||||
python3 tools/warnings_count/compare_warnings.py tools/warnings_count/warnings.txt tools/warnings_count/warnings_new.txt $pyflags
|
||||
|
@ -4,4 +4,4 @@ set -e
|
||||
# This script should only be used when we need to modify the accepted amount of warnings.
|
||||
|
||||
rm -rf ver/*/build/src
|
||||
ninja | grep warning | sort | uniq > tools/warnings_count/warnings.txt
|
||||
ninja | grep warning | sort > tools/warnings_count/warnings.txt
|
||||
|
Loading…
Reference in New Issue
Block a user