Skip to content

Commit abbf546

Browse files
pliablepixelsclaude
andcommitted
ci(android): make native-symbols publishing robust and self-locating
The prior commit hard-coded a symbols path that AGP did not produce, failing the release Rename step. Locate any native symbol output (zip, .so.dbg/.sym, or the native_debug_metadata/native_symbol_tables intermediates), package it if present, and skip cleanly if the dependency .so ship stripped. Upload tolerates no file. refs #244 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 1ddf89d commit abbf546

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/build-android.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,22 @@ jobs:
9797
cp app/android/app/build/outputs/apk/release/*.apk dist/android/zmNinjaNg-${VERSION}-android.apk
9898
cp app/android/app/build/outputs/bundle/release/*.aab dist/android/zmNinjaNg-${VERSION}-android.aab
9999
cp app/android/app/build/outputs/mapping/release/mapping.txt dist/android/zmNinjaNg-${VERSION}-android-mapping.txt
100-
# Native debug symbols are NOT embedded in the AAB; AGP writes them here.
101-
# Publish so they can be uploaded to Play for native crash symbolication (#244).
102-
symbols=app/android/app/build/outputs/native-debug-symbols/release/native-debug-symbols.zip
103-
echo "Native debug symbols:"; ls -l "$symbols"; unzip -l "$symbols"
104-
cp "$symbols" dist/android/zmNinjaNg-${VERSION}-android-native-debug-symbols.zip
100+
# Native debug symbols for Play native-crash symbolication (#244). AGP does
101+
# not embed them in the AAB and the output path varies, so locate them.
102+
echo "=== native symbol outputs under app build ==="
103+
find app/android/app/build \( -name "native-debug-symbols*.zip" -o -name "*.so.dbg" -o -name "*.so.sym" -o -path "*native_debug*" -o -path "*native_symbol*" \) 2>/dev/null | head -60 || true
104+
symzip=$(find app/android/app/build -name "native-debug-symbols*.zip" -type f 2>/dev/null | head -1)
105+
if [ -n "$symzip" ]; then
106+
echo "Found symbols zip: $symzip"
107+
cp "$symzip" dist/android/zmNinjaNg-${VERSION}-android-native-debug-symbols.zip
108+
elif find app/android/app/build -name "*.so.dbg" -o -name "*.so.sym" 2>/dev/null | grep -q .; then
109+
dbgroot=$(find app/android/app/build -path "*native_debug_metadata*" -o -path "*native_symbol_tables*" 2>/dev/null | grep -E "/out$" | head -1)
110+
echo "Packaging per-ABI symbols from: $dbgroot"
111+
( cd "$dbgroot" && zip -qr - . ) > dist/android/zmNinjaNg-${VERSION}-android-native-debug-symbols.zip
112+
unzip -l dist/android/*-native-debug-symbols.zip | tail -8
113+
else
114+
echo "No native debug symbols were produced (dependency .so ship stripped)."
115+
fi
105116
106117
- name: Upload APK artifact
107118
uses: actions/upload-artifact@v4
@@ -130,6 +141,7 @@ jobs:
130141
name: zmNinjaNg-android-native-debug-symbols-${{ github.event.inputs.version || github.ref_name }}
131142
path: dist/android/*-native-debug-symbols.zip
132143
retention-days: 90
144+
if-no-files-found: ignore
133145

134146
- name: Upload to Release
135147
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)