mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-28 06:49:15 +01:00
Speed up release-apk CI: cache Gradle, build arm64 only
Some checks are pending
release-apk / release (APK) (push) Waiting to run
Some checks are pending
release-apk / release (APK) (push) Waiting to run
The "Build signed APK" step was ~292s of the ~350s total run, entirely spent on a cold Gradle build (no dependency/build cache) compiling and dexing a fat APK with armeabi-v7a and x86_64 native code that no device this app has ever run on needs — BL9000, the only install target, is arm64-v8a (confirmed via adb). Adds gradle/actions/setup-gradle for Gradle's dependency+build cache (flutter-action's cache only covers the Flutter SDK/pub packages, not Gradle) and restricts the build to --target-platform android-arm64. Verified locally: build succeeds, signer unchanged (CN=kuhy), output APK 22.1MB vs 61.6MB for the fat build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ce2ea5b410
commit
fd1865db78
15
.github/workflows/release-apk.yml
vendored
15
.github/workflows/release-apk.yml
vendored
@ -51,6 +51,13 @@ jobs:
|
|||||||
channel: stable
|
channel: stable
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
# Caches Gradle's dependency + build cache (not covered by
|
||||||
|
# flutter-action's cache, which only covers the Flutter SDK/pub
|
||||||
|
# packages). This is what the ~5min "Build signed APK" step was mostly
|
||||||
|
# spending on a cold runner: every run re-downloaded the Gradle
|
||||||
|
# wrapper and every AGP/Kotlin/dependency artifact from scratch.
|
||||||
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Read version from pubspec
|
- name: Read version from pubspec
|
||||||
id: ver
|
id: ver
|
||||||
run: |
|
run: |
|
||||||
@ -91,9 +98,17 @@ jobs:
|
|||||||
|
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
|
|
||||||
|
# arm64-v8a only: this is a personal single-device (BL9000) sideload
|
||||||
|
# distribution, not a Play Store multi-device release, and every
|
||||||
|
# device it has ever installed on is arm64-v8a (`adb shell getprop
|
||||||
|
# ro.product.cpu.abi`). A fat APK spent most of its build time
|
||||||
|
# compiling/dexing/packaging armeabi-v7a and x86_64 native code that
|
||||||
|
# is never installed anywhere. If this ever needs to run on a
|
||||||
|
# non-arm64 device, drop --target-platform to rebuild the fat APK.
|
||||||
- name: Build signed APK
|
- name: Build signed APK
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --release \
|
flutter build apk --release \
|
||||||
|
--target-platform android-arm64 \
|
||||||
--build-name="${{ steps.ver.outputs.semver }}" \
|
--build-name="${{ steps.ver.outputs.semver }}" \
|
||||||
--build-number="${{ steps.vc.outputs.code }}"
|
--build-number="${{ steps.vc.outputs.code }}"
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.6+1
|
version: 1.0.7+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.12.2
|
sdk: ^3.12.2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user