瀏覽代碼

Merge remote-tracking branch 'origin/master' into develop

QMK Bot 2 年之前
父節點
當前提交
ee664e0960
共有 2 個文件被更改,包括 15 次插入0 次删除
  1. 6 0
      Makefile
  2. 9 0
      util/size_regression.sh

+ 6 - 0
Makefile

@@ -429,9 +429,15 @@ lib/%:
 
 
 .PHONY: git-submodule
 .PHONY: git-submodule
 git-submodule:
 git-submodule:
+	[ -e lib/ugfx ] && rm -rf lib/ugfx || true
+	[ -e lib/pico-sdk ] && rm -rf lib/pico-sdk || true
+	[ -e lib/chibios-contrib/ext/mcux-sdk ] && rm -rf lib/chibios-contrib/ext/mcux-sdk || true
 	git submodule sync --recursive
 	git submodule sync --recursive
 	git submodule update --init --recursive --progress
 	git submodule update --init --recursive --progress
 
 
+.PHONY: git-submodules
+git-submodules: git-submodule
+
 .PHONY: list-keyboards
 .PHONY: list-keyboards
 list-keyboards:
 list-keyboards:
 	util/list_keyboards.sh | sort -u | tr '\n' ' '
 	util/list_keyboards.sh | sort -u | tr '\n' ' '

+ 9 - 0
util/size_regression.sh

@@ -59,6 +59,14 @@ done
 shift $((OPTIND-1))
 shift $((OPTIND-1))
 keyboard_target=$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_size=0
 last_line=""
 last_line=""
 function build_executor() {
 function build_executor() {
@@ -68,6 +76,7 @@ function build_executor() {
         make distclean >/dev/null 2>&1
         make distclean >/dev/null 2>&1
 
 
         git checkout -f $revision >/dev/null 2>&1 || { echo "Failed to check out revision ${revision}" >&2 ; exit 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
         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)
         file_size=$(arm-none-eabi-size .build/*.elf 2>/dev/null | awk '/elf/ {print $1}' 2>/dev/null || true)