Files
pezkuwi-wallet-android/.github/workflows/install/action.yml
T
Workflow config file is invalid. Please check your config file: unknown on type: 0
Satoshi Qazi Muhammed 4b3d1996fa ci: stop installing the removed legacy SDK 'tools' package
android-actions/setup-android installs 'tools platform-tools' by default.
sdkmanager now fails with "Failed to find package 'tools'", which aborts
dependency installation for every build and lint job. Only platform-tools
is needed; nothing in the workflows uses the legacy tools directory.
2026-10-02 21:18:47 +04:00

62 lines
2.4 KiB
YAML

name: Install dependencies for Android build
description: Contains all dependencies for Android build
runs:
using: "composite"
steps:
- name: ☕️ Install Java
uses: actions/setup-java@v4.0.0
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 12266719
# The action's default also installs the legacy 'tools' package, which the current
# SDK repository no longer serves ("Failed to find package 'tools'"), failing the step.
packages: 'platform-tools'
- name: Install NDK
run: |
SDKMANAGER=$(find ${ANDROID_SDK_ROOT}/cmdline-tools -name sdkmanager -type f 2>/dev/null | head -1)
NDK_PACKAGE="ndk;26.1.10909125"
# sdkmanager's download of the ~1GB NDK zip from Google's CDN occasionally comes back truncated/corrupted
# ("Error on ZipFile unknown archive") with no built-in retry, taking down the whole build for a purely
# transient network blip. Retry with cleanup between attempts: sdkmanager can otherwise resume from the
# same corrupted partial file instead of re-fetching, making a naive retry fail identically every time.
for attempt in 1 2 3; do
echo "NDK install attempt $attempt/3"
if echo "y" | sudo ${SDKMANAGER} --install "$NDK_PACKAGE" --sdk_root=${ANDROID_SDK_ROOT}; then
echo "NDK installed successfully"
exit 0
fi
echo "Attempt $attempt failed - clearing any partial/corrupted download before retrying"
sudo rm -rf "${ANDROID_SDK_ROOT}/ndk/26.1.10909125"
sudo find "${ANDROID_SDK_ROOT}" -maxdepth 1 -name "tmp*" -exec rm -rf {} +
sleep 10
done
echo "NDK install failed after 3 attempts"
exit 1
shell: bash
- name: Set ndk.dir in local.properties
run: echo "ndk.dir=${ANDROID_SDK_ROOT}/ndk/26.1.10909125" >> local.properties
shell: bash
- name: 🦀 Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Add targets
run: |
rustup target add armv7-linux-androideabi
rustup target add i686-linux-android
rustup target add x86_64-linux-android
rustup target add aarch64-linux-android
shell: bash