Compare commits
2 Commits
2026-08-31
...
2026-08-31
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
052ea8de4c | ||
|
|
9c77cdc3a3 |
@@ -96,6 +96,15 @@ jobs:
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
printf 'sdk.dir=%s/.android/sdk\n' "$HOME" > local.properties
|
printf 'sdk.dir=%s/.android/sdk\n' "$HOME" > local.properties
|
||||||
|
|
||||||
|
- name: Compile bundled native Git binaries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euxo pipefail
|
||||||
|
export ANDROID_SDK_ROOT="$HOME/.android/sdk"
|
||||||
|
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
||||||
|
chmod +x ./AndroidProjectTooling.sh
|
||||||
|
bash ./AndroidProjectTooling.sh --compile-git
|
||||||
|
|
||||||
- name: Prepare CI build metadata
|
- name: Prepare CI build metadata
|
||||||
id: build_meta
|
id: build_meta
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -128,6 +137,28 @@ jobs:
|
|||||||
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
||||||
./gradlew --no-daemon clean assembleDebug
|
./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
|
- name: Build release AAB
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -137,6 +168,28 @@ jobs:
|
|||||||
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
||||||
./gradlew --no-daemon bundleRelease
|
./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
|
- name: Rename release AAB for upload
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
id: release_aab
|
id: release_aab
|
||||||
|
|||||||
Reference in New Issue
Block a user