From 5103604451503f519b311dc5825d94a68bdfb096 Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Thu, 20 Mar 2025 07:16:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(ci):=20=E9=87=8D=E6=96=B0=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=20NDK=20=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://stackoverflow.com/questions/60776512/how-can-i-cache-android-ndk-in-my-github-actions-workflow --- .github/workflows/android_ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index a208fe0..0c980e7 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -38,12 +38,14 @@ jobs: echo ${{ secrets.SIGNING_KEY }} | base64 --decode > ${{ github.workspace }}/key.jks fi - - name: Setup Android NDK - uses: nttld/setup-ndk@v1.5.0 + - name: Cache NDK + uses: actions/cache@v2 with: - ndk-version: r27c - link-to-sdk: true - local-cache: true + path: ${ANDROID_HOME}/ndk/27.0.12077973 + key: ndk-cache + + - name: Install NDK + run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;27.0.12077973' - name: Build with Gradle run: ./gradlew assembleRelease