CI: pre-install NDK+CMake with retry (SDK mirror served a corrupt CMake zip)
All checks were successful
build-apk / build (push) Successful in 10m37s
All checks were successful
build-apk / build (push) Successful in 10m37s
v0.1.7 build failed on ':react-native-screens:configureCMake' — ZipException "Archive is not a ZIP archive" from a truncated cmake;3.22.1 download. Install ndk+cmake up front and retry up to 3x, clearing the partial dir between attempts so a bad download self-heals. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4cb5478737
commit
26b6a3ea82
1 changed files with 13 additions and 3 deletions
|
|
@ -53,11 +53,21 @@ jobs:
|
||||||
- name: Run client tests
|
- name: Run client tests
|
||||||
run: npm test --workspace parksmarter-client
|
run: npm test --workspace parksmarter-client
|
||||||
|
|
||||||
# RN 0.79 wants a specific NDK; install it if the image doesn't ship it (best-effort).
|
# Pre-install the NDK + CMake the RN native modules need. Do it here (not via
|
||||||
- name: Ensure NDK
|
# Gradle's mid-build auto-install) and retry: the SDK mirror sometimes serves
|
||||||
|
# a truncated archive ("Archive is not a ZIP archive"), which self-heals on a
|
||||||
|
# clean retry. Clearing the partial dir between tries avoids reusing the bad file.
|
||||||
|
- name: Ensure NDK + CMake
|
||||||
run: |
|
run: |
|
||||||
yes | sdkmanager --licenses >/dev/null 2>&1 || true
|
yes | sdkmanager --licenses >/dev/null 2>&1 || true
|
||||||
sdkmanager "ndk;27.1.12297006" >/dev/null 2>&1 || true
|
ok=0
|
||||||
|
for i in 1 2 3; do
|
||||||
|
if sdkmanager "ndk;27.1.12297006" "cmake;3.22.1"; then ok=1; break; fi
|
||||||
|
echo "sdkmanager attempt $i failed; clearing partial CMake and retrying"
|
||||||
|
rm -rf "${ANDROID_HOME:-/opt/android}/cmake/3.22.1" "${ANDROID_SDK_ROOT:-/opt/android}/cmake/3.22.1" 2>/dev/null || true
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
[ "$ok" = 1 ] || echo "WARNING: NDK/CMake pre-install did not confirm; the build may retry it."
|
||||||
|
|
||||||
- name: Restore signing keystore
|
- name: Restore signing keystore
|
||||||
run: echo "${{ secrets.ANDROID_KEYSTORE_B64 }}" | base64 -d > "${{ github.workspace }}/app/release.keystore"
|
run: echo "${{ secrets.ANDROID_KEYSTORE_B64 }}" | base64 -d > "${{ github.workspace }}/app/release.keystore"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue