summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-08-13 13:24:07 +0000
committerQMK Bot <hello@qmk.fm>2022-08-13 13:24:07 +0000
commitee664e0960f912876c19675b61219985abb11d0e (patch)
tree8ef5be99a1efed9c518d88d3dd0a059355163e8f /util
parent853d47b4ccb05b82d9ee4653013dcbb372d6002f (diff)
parentdccb8ff7d6e2d73f0592c30e9f8498dcbf17c9e1 (diff)
downloadqmk_firmware-ee664e0960f912876c19675b61219985abb11d0e.tar.gz
qmk_firmware-ee664e0960f912876c19675b61219985abb11d0e.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'util')
-rwxr-xr-xutil/size_regression.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/size_regression.sh b/util/size_regression.sh
index 41ad5b68a3..6da2d360bb 100755
--- a/util/size_regression.sh
+++ b/util/size_regression.sh
@@ -59,6 +59,14 @@ done
shift $((OPTIND-1))
keyboard_target=$1
+# Helper for resetting submodule existence
+fixup_submodules() {
+ [ -e lib/ugfx ] && rm -rf lib/ugfx
+ [ -e lib/pico-sdk ] && rm -rf lib/pico-sdk
+ [ -e lib/chibios-contrib/ext/mcux-sdk ] && rm -rf lib/chibios-contrib/ext/mcux-sdk
+ make git-submodule
+}
+
last_size=0
last_line=""
function build_executor() {
@@ -68,6 +76,7 @@ function build_executor() {
make distclean >/dev/null 2>&1
git checkout -f $revision >/dev/null 2>&1 || { echo "Failed to check out revision ${revision}" >&2 ; exit 1 ; }
+ fixup_submodules >/dev/null 2>&1
make -j${job_count} $keyboard_target >/dev/null 2>&1 || true
file_size=$(arm-none-eabi-size .build/*.elf 2>/dev/null | awk '/elf/ {print $1}' 2>/dev/null || true)