From 2dabcbfac9eabac408ce44a73a651a3ca7d07855 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:13:57 +0100 Subject: [PATCH 1/4] 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/4] 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/4] 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/4] 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: |