fix: 尝试修复 NDK 缓存功能(AI)
This commit is contained in:
parent
8b1ec55ff9
commit
71abf6435f
1 changed files with 10 additions and 10 deletions
18
.github/workflows/android_ci.yml
vendored
18
.github/workflows/android_ci.yml
vendored
|
|
@ -1,4 +1,8 @@
|
||||||
name: Android CI
|
name: Android CI
|
||||||
|
|
||||||
|
env:
|
||||||
|
NDK_VERSION: "28.2.13676358"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
@ -24,20 +28,16 @@ jobs:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
|
||||||
# 缓存NDK
|
|
||||||
- name: Cache NDK
|
- name: Cache NDK
|
||||||
|
id: cache-ndk
|
||||||
uses: actions/cache@v5.0.3
|
uses: actions/cache@v5.0.3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ${{ env.ANDROID_HOME }}/ndk/${{ env.NDK_VERSION }}
|
||||||
${{ env.ANDROID_HOME }}/ndk
|
key: ${{ runner.os }}-ndk-${{ env.NDK_VERSION }}
|
||||||
key: ndk-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
ndk-${{ runner.os }}-
|
|
||||||
|
|
||||||
# 仅当NDK缓存未命中时才安装NDK
|
- name: Install NDK
|
||||||
- name: Install NDK 28.2.13676358
|
|
||||||
if: steps.cache-ndk.outputs.cache-hit != 'true'
|
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;${{ env.NDK_VERSION }}"
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue