diff --git a/.gitea/workflows/android-build.yml b/.gitea/workflows/android-build.yml index 787d10c..4cc429c 100644 --- a/.gitea/workflows/android-build.yml +++ b/.gitea/workflows/android-build.yml @@ -137,6 +137,28 @@ jobs: export ANDROID_HOME="$ANDROID_SDK_ROOT" ./gradlew --no-daemon clean assembleDebug + - name: Verify debug APK bundles native Git + if: github.event_name != 'release' + shell: bash + run: | + set -euxo pipefail + python3 - <<'PY' + from pathlib import Path + import zipfile + apk = next(Path('app/build/outputs/apk/debug').glob('*.apk')) + with zipfile.ZipFile(apk) as zf: + names = zf.namelist() + required = { + 'lib/arm64-v8a/libgit.so', + 'lib/armeabi-v7a/libgit.so', + } + found = {name for name in names if name in required} + print('APK_NATIVE_GIT', sorted(found)) + missing = sorted(required - found) + if missing: + raise SystemExit(f'Missing native Git libraries in {apk}: {missing}') + PY + - name: Build release AAB if: github.event_name == 'release' shell: bash @@ -146,6 +168,28 @@ jobs: export ANDROID_HOME="$ANDROID_SDK_ROOT" ./gradlew --no-daemon bundleRelease + - name: Verify release AAB bundles native Git + if: github.event_name == 'release' + shell: bash + run: | + set -euxo pipefail + python3 - <<'PY' + from pathlib import Path + import zipfile + aab = next(Path('app/build/outputs/bundle/release').glob('*.aab')) + with zipfile.ZipFile(aab) as zf: + names = zf.namelist() + required = { + 'base/lib/arm64-v8a/libgit.so', + 'base/lib/armeabi-v7a/libgit.so', + } + found = {name for name in names if name in required} + print('AAB_NATIVE_GIT', sorted(found)) + missing = sorted(required - found) + if missing: + raise SystemExit(f'Missing native Git libraries in {aab}: {missing}') + PY + - name: Rename release AAB for upload if: github.event_name == 'release' id: release_aab