Cache Flutter SDK, Gradle, and CocoaPods in CI

Cold Gradle builds were taking ~8.5 min for the APK job. Add
caching for Flutter/pub (via flutter-action), Gradle deps, and
CocoaPods to speed up subsequent runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Doug Borg
2026-02-24 18:23:20 -07:00
parent 8a759e88e9
commit 348256270d
+17
View File
@@ -16,6 +16,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter pub get
@@ -40,6 +41,15 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-
- run: flutter pub get
@@ -69,6 +79,13 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- uses: actions/cache@v4
with:
path: ios/Pods
key: pods-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: pods-${{ runner.os }}-
- run: flutter pub get