diff --git a/.github/cloudbuild/flutter-android.yaml b/.github/cloudbuild/flutter-android.yaml index a6397ae5e..3bdbed244 100644 --- a/.github/cloudbuild/flutter-android.yaml +++ b/.github/cloudbuild/flutter-android.yaml @@ -1,5 +1,9 @@ substitutions: _IMAGE_NAME: mlperf-mobile-flutter-android +# Building apks with flutter requires a lot of memory. +# Builds on standard machines with 4GB of RAM can unexpectedly hang. +# Also the build is mostly CPU-intensive, so using 8-core machines +# reduces build time up to 3 times. options: machineType: 'E2_HIGHCPU_8' diff --git a/flutter/Makefile b/flutter/Makefile index cdba44710..231ad1835 100644 --- a/flutter/Makefile +++ b/flutter/Makefile @@ -49,11 +49,14 @@ android: backend-bridge-android backends/tflite-android prepare-flutter .PHONY: android/apk android/apk: android flutter clean + @# take results from build/app/outputs/flutter-apk/app-release.apk flutter build apk .PHONY: ci/android/test_apk ci/android/test_apk: android/apk + @# take results from build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk cd android && ./gradlew app:assembleAndroidTest + @# take results from build/app/outputs/apk/debug/app-debug.apk cd android && ./gradlew app:assembleDebug -Ptarget=integration_test/first_test.dart .PHONY: docker/android/apk