Skip to content

Commit 667d0d2

Browse files
authored
ci: storage cache (#403)
* Update android.yml * Update ios.yml
1 parent db44ce3 commit 667d0d2

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

.github/workflows/android.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,36 @@ jobs:
4141
with:
4242
path: ~/.pub-cache
4343
key: ubuntu-pub-${{ hashFiles('**/pubspec.lock') }}
44-
restore-keys: |
45-
ubuntu-pub-
44+
restore-keys: ubuntu-pub-
4645

4746
- name: Cache build_runner (Optional)
4847
uses: actions/cache@v3
4948
with:
5049
path: .dart_tool/build
51-
key: ubuntu-build-runner-${{ hashFiles('**/*.dart') }}
52-
restore-keys: |
53-
ubuntu-build-runner-
50+
key: ubuntu-build-runner-${{ hashFiles('lib/api/model/**/*.dart') }}
51+
restore-keys: ubuntu-build-runner-
52+
53+
- name: Cache Gradle
54+
uses: actions/cache@v3
55+
with:
56+
path: |
57+
~/.gradle/caches
58+
~/.gradle/wrapper
59+
key: ubuntu-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
60+
restore-keys: ubuntu-gradle-
61+
62+
- name: Cache CMake
63+
uses: actions/cache@v3
64+
with:
65+
path: /usr/local/lib/android/sdk/cmake
66+
key: ubuntu-android-cmake
67+
restore-keys: ubuntu-android-cmake-
5468

5569
- name: Install dependencies
5670
run: flutter pub get
5771

5872
- name: Prebuild with build_runner
59-
run: dart run build_runner build --delete-conflicting-outputs
73+
run: dart run build_runner build
6074

6175
- name: Build apk
6276
run: |

.github/workflows/ios.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,24 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v4
3333

34-
- name: Switch Xcode
35-
run: sudo xcode-select -s /Applications/Xcode_16.4.app
34+
- name: Setup Flutter
35+
uses: subosito/flutter-action@v2
36+
with:
37+
flutter-version: ${{ env.FLUTTER_VERSION }}
3638

37-
- name: Cache Flutter SDK
39+
- name: Cache Pub Packages
3840
uses: actions/cache@v3
3941
with:
4042
path: ~/.pub-cache
4143
key: macos-pub-${{ hashFiles('**/pubspec.lock') }}
42-
restore-keys: |
43-
macos-pub-
44-
45-
- name: Setup Flutter
46-
uses: subosito/flutter-action@v2
47-
with:
48-
flutter-version: ${{ env.FLUTTER_VERSION }}
44+
restore-keys: macos-pub-
4945

5046
- name: Cache build_runner (Optional)
5147
uses: actions/cache@v3
5248
with:
5349
path: .dart_tool/build
54-
key: macos-build-runner-${{ hashFiles('**/*.dart') }}
55-
restore-keys: |
56-
macos-build-runner-
50+
key: macos-build-runner-${{ hashFiles('lib/api/model/**/*.dart') }}
51+
restore-keys: macos-build-runner-
5752

5853
- name: Cache CocoaPods Pods
5954
uses: actions/cache@v3
@@ -78,7 +73,7 @@ jobs:
7873
pod install
7974
8075
- name: Prebuild with build_runner
81-
run: dart run build_runner build --delete-conflicting-outputs
76+
run: dart run build_runner build
8277

8378
- name: Build iOS App and IPA
8479
run: |

0 commit comments

Comments
 (0)