Caching Flutter/iOS dependencies
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I declared those actions to cache dependencies for a Flutter app targeting iOS:
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_ROOT }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Cache pods
uses: actions/cache@v3
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
Those actions are (seems ?) to be working fine (cache is created, retrieved and restored) but my build action re-download everything every time as if nothing was restored. What I am missing ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cache steps in the workflow and compare their paths with the dependency locations used by the Flutter and iOS build. Inspect the cache logs and the contents keyed by pubspec.lock, Podfile.lock, and ios/Pods; done means a restored cache prevents the build from downloading those dependencies again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flutter, github-actions, ios
- Domain
- ci-cd, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100