From 9644f8d44a36784cb6bbb98a71578ef4e2de86cd Mon Sep 17 00:00:00 2001 From: MaherJon Date: Sun, 18 Oct 2026 14:41:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E6=AD=A3=20core=20?= =?UTF-8?q?=E8=A1=A5=E4=B8=81=E6=A0=A1=E9=AA=8C=E7=9A=84=E8=A1=A5=E4=B8=81?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git -C core 会切换工作目录,导致相对路径 patches/core/*.patch 被解析为 core/patches/...,检查时报 "can't open patch: No such file or directory"。 改为传绝对路径后补丁可被正常读取与校验。 --- .github/workflows/android-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index e60e71c..83889b9 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -24,13 +24,15 @@ jobs: - name: 校验 patches/core/*.patch run: | shopt -s nullglob + root="$(pwd)" status=0 count=0 + # 注意:git -C core 会切换工作目录,故补丁必须传绝对路径 for p in patches/core/*.patch; do count=$((count + 1)) - if git -C core apply --reverse --check "$p" 2>/dev/null; then + if git -C core apply --reverse --check "$root/$p" 2>/dev/null; then echo "已应用: $p" - elif git -C core apply --check "$p"; then + elif git -C core apply --check "$root/$p"; then echo "可应用: $p" else echo "::error::core 补丁无法干净应用: $p(上游 core 可能已变更,需要 rebase)" From 96659076bb1bf1f85f5030ca163014285736f803 Mon Sep 17 00:00:00 2001 From: MaherJon Date: Sun, 18 Oct 2026 14:47:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(ci):=20=E5=8D=87=E7=BA=A7=20setup-andro?= =?UTF-8?q?id=20=E5=88=B0=20v4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit android-actions/setup-android@v3 会执行 `sdkmanager tools`,而新版 SDK 仓库已移除 tools 包,导致 setup 步骤报 "Failed to find package 'tools'" 并 exit 1(v4.0.2 的官方修复即 "Fix for removed tools package")。 --- .github/workflows/android-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 83889b9..e09c72e 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -55,7 +55,7 @@ jobs: distribution: temurin java-version: '17' - - uses: android-actions/setup-android@v3 + - uses: android-actions/setup-android@v4 - name: 安装 NDK 与 platform-tools run: sdkmanager --install "ndk;27.0.12077973" "platform-tools"