From 2dabcbfac9eabac408ce44a73a651a3ca7d07855 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:13:57 +0100 Subject: [PATCH 1/5] fix: Flutter caching issues in GitHub actions --- .../flutter_project_codecheck_android.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flutter_project_codecheck_android.yml b/.github/workflows/flutter_project_codecheck_android.yml index f08d74b..65a225c 100644 --- a/.github/workflows/flutter_project_codecheck_android.yml +++ b/.github/workflows/flutter_project_codecheck_android.yml @@ -32,15 +32,23 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} + - uses: actions/cache@v4 + id: cache + with: + path: | + /home/runner/.pub-cache + /opt/hostedtoolcache/flutter + key: ${{ runner.os }}-${{ hashFiles('pubspec.lock') }} + restore-keys: ${{ runner.os }}- + - name: '[Setup - Flutter Actions with Cache]' + if: steps.cache.outputs.cache-hit != 'true' uses: subosito/flutter-action@v2 with: channel: 'stable' flutter-version: ${{ env.flutter_version }} - cache: true + cache: false architecture: x64 - cache-key: 'flutter-:os:-:channel:-:version:-:arch:' - cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # Make sure we have latest FVM - name: '[FVM - Install]' From 6fffd0623354446aa860f20a9b1d11eaedf59718 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:22:43 +0100 Subject: [PATCH 2/5] fix: Improve caching keys --- .github/workflows/flutter_project_codecheck_android.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flutter_project_codecheck_android.yml b/.github/workflows/flutter_project_codecheck_android.yml index 65a225c..4062910 100644 --- a/.github/workflows/flutter_project_codecheck_android.yml +++ b/.github/workflows/flutter_project_codecheck_android.yml @@ -32,16 +32,17 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} + - name: '[Setup - Cache Flutter and Pub Dependencies]' - uses: actions/cache@v4 id: cache with: path: | /home/runner/.pub-cache /opt/hostedtoolcache/flutter - key: ${{ runner.os }}-${{ hashFiles('pubspec.lock') }} - restore-keys: ${{ runner.os }}- + key: ${{ runner.os }}-flutter-${{ env.flutter_version }}-${{ hashFiles('pubspec.lock') }} + restore-keys: ${{ runner.os }}-flutter-${{ env.flutter_version }}- - - name: '[Setup - Flutter Actions with Cache]' + - name: '[Setup - Flutter SDK]' if: steps.cache.outputs.cache-hit != 'true' uses: subosito/flutter-action@v2 with: From d0e8e4069355d675886c6776c38d80a76b9a928b Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:23:05 +0100 Subject: [PATCH 3/5] chore: Disable flutter app build to speed up testing --- .github/workflows/flutter_project_codecheck_android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutter_project_codecheck_android.yml b/.github/workflows/flutter_project_codecheck_android.yml index 4062910..cf336ce 100644 --- a/.github/workflows/flutter_project_codecheck_android.yml +++ b/.github/workflows/flutter_project_codecheck_android.yml @@ -81,8 +81,8 @@ jobs: run: fvm flutter analyze # Build is slightly faster when targeting single platform, debug version and only apk instead of appbundle - - name: '[Flutter - Build APK]' - run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug + # - name: '[Flutter - Build APK]' + # run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug # Only on self hosted. Cleanup the files after the build # - name: '[Finish - Cleanup]' From eec762a9056e8a47b3afa3d3427c98ade7e24f14 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:25:05 +0100 Subject: [PATCH 4/5] fix: Named cache step --- .github/workflows/flutter_project_codecheck_android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter_project_codecheck_android.yml b/.github/workflows/flutter_project_codecheck_android.yml index cf336ce..02281c4 100644 --- a/.github/workflows/flutter_project_codecheck_android.yml +++ b/.github/workflows/flutter_project_codecheck_android.yml @@ -33,7 +33,7 @@ jobs: java-version: ${{ env.java_version }} - name: '[Setup - Cache Flutter and Pub Dependencies]' - - uses: actions/cache@v4 + uses: actions/cache@v4 id: cache with: path: | From 5dafc0cf44d10dbc7ad2b6eda3784ad92ca9f381 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:42:12 +0100 Subject: [PATCH 5/5] fix: Remove cache --- ...android_firebase_app_distribution_develop.yml | 7 +++---- ...roid_firebase_app_distribution_production.yml | 7 +++---- ...android_firebase_app_distribution_staging.yml | 4 +++- .../android_play_store_distribution.yml | 7 +++---- .../flutter_project_codecheck_android.yml | 16 +++------------- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/android_firebase_app_distribution_develop.yml b/.github/workflows/android_firebase_app_distribution_develop.yml index cd39ca2..b801422 100644 --- a/.github/workflows/android_firebase_app_distribution_develop.yml +++ b/.github/workflows/android_firebase_app_distribution_develop.yml @@ -33,15 +33,14 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} - - name: '[Setup - Flutter Actions with Cache]' + # Install Flutter SDK + - name: '[Setup - Flutter SDK]' uses: subosito/flutter-action@v2 with: channel: 'stable' flutter-version: ${{ env.flutter_version }} - cache: true + cache: false architecture: x64 - cache-key: 'flutter-:os:-:channel:-:version:-:arch:' - cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # Make sure we have latest FVM - name: '[FVM - Install]' diff --git a/.github/workflows/android_firebase_app_distribution_production.yml b/.github/workflows/android_firebase_app_distribution_production.yml index 4208036..facdcc6 100644 --- a/.github/workflows/android_firebase_app_distribution_production.yml +++ b/.github/workflows/android_firebase_app_distribution_production.yml @@ -33,15 +33,14 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} - - name: '[Setup - Flutter Actions with Cache]' + # Install Flutter SDK + - name: '[Setup - Flutter SDK]' uses: subosito/flutter-action@v2 with: channel: 'stable' flutter-version: ${{ env.flutter_version }} - cache: true + cache: false architecture: x64 - cache-key: 'flutter-:os:-:channel:-:version:-:arch:' - cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # Make sure we have latest FVM - name: '[FVM - Install]' diff --git a/.github/workflows/android_firebase_app_distribution_staging.yml b/.github/workflows/android_firebase_app_distribution_staging.yml index 3cdb030..30466e8 100644 --- a/.github/workflows/android_firebase_app_distribution_staging.yml +++ b/.github/workflows/android_firebase_app_distribution_staging.yml @@ -33,11 +33,13 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} - - name: '[Setup - Flutter Actions with Cache]' + # Install Flutter SDK + - name: '[Setup - Flutter SDK]' uses: subosito/flutter-action@v2 with: channel: 'stable' flutter-version: ${{ env.flutter_version }} + cache: false architecture: x64 # Make sure we have latest FVM diff --git a/.github/workflows/android_play_store_distribution.yml b/.github/workflows/android_play_store_distribution.yml index 5b4b6f7..3ea7e07 100644 --- a/.github/workflows/android_play_store_distribution.yml +++ b/.github/workflows/android_play_store_distribution.yml @@ -33,15 +33,14 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} - - name: '[Setup - Flutter Actions with Cache]' + # Install Flutter SDK + - name: '[Setup - Flutter SDK]' uses: subosito/flutter-action@v2 with: channel: 'stable' flutter-version: ${{ env.flutter_version }} - cache: true + cache: false architecture: x64 - cache-key: 'flutter-:os:-:channel:-:version:-:arch:' - cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # Make sure we have latest FVM - name: '[FVM - Install]' diff --git a/.github/workflows/flutter_project_codecheck_android.yml b/.github/workflows/flutter_project_codecheck_android.yml index 02281c4..23014cf 100644 --- a/.github/workflows/flutter_project_codecheck_android.yml +++ b/.github/workflows/flutter_project_codecheck_android.yml @@ -32,18 +32,8 @@ jobs: distribution: 'zulu' java-version: ${{ env.java_version }} - - name: '[Setup - Cache Flutter and Pub Dependencies]' - uses: actions/cache@v4 - id: cache - with: - path: | - /home/runner/.pub-cache - /opt/hostedtoolcache/flutter - key: ${{ runner.os }}-flutter-${{ env.flutter_version }}-${{ hashFiles('pubspec.lock') }} - restore-keys: ${{ runner.os }}-flutter-${{ env.flutter_version }}- - + # Install Flutter SDK - name: '[Setup - Flutter SDK]' - if: steps.cache.outputs.cache-hit != 'true' uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -81,8 +71,8 @@ jobs: run: fvm flutter analyze # Build is slightly faster when targeting single platform, debug version and only apk instead of appbundle - # - name: '[Flutter - Build APK]' - # run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug + - name: '[Flutter - Build APK]' + run: fvm flutter build apk -t lib/main_staging.dart --flavor staging --target-platform android-arm64 --obfuscate --split-debug-info=build/app/outputs/symbols --debug # Only on self hosted. Cleanup the files after the build # - name: '[Finish - Cleanup]'