feat: 尝试缓存NDK
This commit is contained in:
parent
37e12be2bd
commit
5d1d7ba28d
1 changed files with 12 additions and 6 deletions
18
.github/workflows/android_ci.yml
vendored
18
.github/workflows/android_ci.yml
vendored
|
|
@ -24,7 +24,19 @@ jobs:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: gradle
|
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
|
- 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'
|
run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;28.2.13676358'
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
|
|
@ -41,12 +53,6 @@ jobs:
|
||||||
echo ${{ secrets.SIGNING_KEY }} | base64 --decode > ${{ github.workspace }}/key.jks
|
echo ${{ secrets.SIGNING_KEY }} | base64 --decode > ${{ github.workspace }}/key.jks
|
||||||
fi
|
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
|
- name: Fix Permissions for Debug Keystore Path
|
||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
run: sudo chmod -R 777 /home/runner/.config/.android
|
run: sudo chmod -R 777 /home/runner/.config/.android
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue