ci(android): switch from cargo-apk 0.10.0 to cargo-apk2
Android Build / build-apk (push) Failing after 3m49s
Build and Deploy / build-and-push (push) Failing after 23s

cargo-apk 0.10.0 has been unable to discover an installed Android
platform in this runner environment despite ANDROID_HOME, NDK,
build-tools, and platforms;android-34 all being present and readable.
cargo-apk2 is the maintained community fork on crates.io that reads
the same `[package.metadata.android]` block, so the solitaire_app
Cargo.toml needs no changes. Cache keys updated to apk2- so we don't
restore the broken cargo-apk binary from prior runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-14 11:43:50 -07:00
parent 124f1f5cf5
commit 14324b09ef
2 changed files with 15 additions and 23 deletions
+6 -6
View File
@@ -82,12 +82,12 @@ jobs:
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-registry-
- name: Cache cargo-apk binary
- name: Cache cargo-apk2 binary
uses: actions/cache@v4
id: apk-tool-cache
with:
path: ~/.cargo/bin/cargo-apk
key: cargo-apk-${{ runner.os }}-stable
path: ~/.cargo/bin/cargo-apk2
key: apk2-${{ runner.os }}-stable
- name: Cache build artifacts
uses: actions/cache@v4
@@ -97,15 +97,15 @@ jobs:
restore-keys: android-release-target-${{ hashFiles('**/Cargo.lock') }}-
# ── Build ──────────────────────────────────────────────────────────
- name: Install cargo-apk
- name: Install cargo-apk2
if: steps.apk-tool-cache.outputs.cache-hit != 'true'
run: cargo install cargo-apk --locked
run: cargo install cargo-apk2 --locked
- name: Build release APK
run: |
export ANDROID_HOME=${{ env.ANDROID_SDK }}
export ANDROID_NDK_HOME=${{ env.ANDROID_SDK }}/ndk/${{ env.NDK_VERSION }}
cargo apk build --release --package solitaire_app --lib
cargo apk2 build --release --package solitaire_app --lib
# ── Sign ───────────────────────────────────────────────────────────
- name: Decode keystore