From 5d1d7ba28d0d321b2f27318839f19efa9c60067c Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Fri, 16 Jan 2026 23:11:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=9D=E8=AF=95=E7=BC=93=E5=AD=98NDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android_ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 4032e26..e6603da 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -24,7 +24,19 @@ jobs: distribution: 'temurin' cache: gradle + # 缓存NDK + - name: Cache NDK + uses: actions/cache@v5.0.1 + with: + path: | + ${{ env.ANDROID_HOME }}/ndk + key: ndk-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ndk-${{ runner.os }}- + + # 仅当NDK缓存未命中时才安装NDK - name: Install NDK 28.2.13676358 + if: steps.cache-ndk.outputs.cache-hit != 'true' run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;28.2.13676358' - name: Grant execute permission for gradlew @@ -41,12 +53,6 @@ jobs: echo ${{ secrets.SIGNING_KEY }} | base64 --decode > ${{ github.workspace }}/key.jks fi - # - name: Cache NDK - # uses: actions/cache@v4.2.3 - # with: - # path: ${ANDROID_HOME}/ndk/28.2.13676358 - # key: ndk-cache - - name: Fix Permissions for Debug Keystore Path if: github.ref != 'refs/heads/main' run: sudo chmod -R 777 /home/runner/.config/.android