Skip to content

Commit 2d6a52b

Browse files
committed
⚡ Cache Android NDK and Gradle wrapper in CI
Replace manual sdkmanager NDK install with nttld/setup-ndk action (built-in caching via local-cache). Add Gradle wrapper distribution cache to avoid re-downloading ~100MB per run.
1 parent eda9804 commit 2d6a52b

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/tauri-mobile-release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,19 @@ jobs:
241241
- name: "📱 Setup Android SDK"
242242
uses: android-actions/setup-android@v3
243243

244-
- name: "🔧 Install Android NDK"
245-
# Version required by Tauri Rust Android targets (aarch64, armv7, i686, x86_64)
246-
run: sdkmanager --install "ndk;27.0.12077973"
244+
- name: "🔧 Setup Android NDK"
245+
uses: nttld/setup-ndk@v1
246+
with:
247+
ndk-version: r27
248+
link-to-sdk: true
249+
local-cache: true
250+
251+
- name: "💾 Cache Gradle wrapper"
252+
uses: actions/cache@v4
253+
with:
254+
path: ~/.gradle/wrapper/dists
255+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('apps/wallet/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties') }}
256+
restore-keys: ${{ runner.os }}-gradle-wrapper-
247257

248258
- name: "🦀 Setup Rust"
249259
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)