Skip to content

ci: cache Flutter pub packages in the Mobile job#1128

Merged
wpfleger96 merged 1 commit into
mainfrom
worktree-wpfleger-ci-flutter-pub-cache
Jun 19, 2026
Merged

ci: cache Flutter pub packages in the Mobile job#1128
wpfleger96 merged 1 commit into
mainfrom
worktree-wpfleger-ci-flutter-pub-cache

Conversation

@wpfleger96

Copy link
Copy Markdown
Collaborator

The Mobile CI job ran flutter pub get from scratch on every run with no package caching. Under degraded network conditions on GitHub Actions runners, this caused the "Install dependencies" step to block for 13+ minutes against the 15-minute job timeout.

Every other dependency store in the workflow is already cached — pnpm via actions/cache, Playwright browsers via actions/cache, and Rust via Swatinem/rust-cache. The Mobile job was the only gap.

Adds a Restore pub cache step before flutter pub get and a Save pub cache step after flutter test, following the exact same split restore/save pattern as the pnpm cache:

  • Path: ~/.pub-cache (default Dart/Flutter pub cache on Linux)
  • Key: pub-{os}-{hash(mobile/pubspec.lock)} with pub-{os}- as the fallback restore key
  • Save only on push events (same gate as pnpm), so PR runs restore from the cache seeded by the last main merge
  • Uses the same pinned actions/cache SHA already in the file

The Mobile CI job ran flutter pub get from scratch on every run. Under
degraded network conditions on GitHub Actions runners, this step blocked
for 13+ minutes against the 15-minute job timeout. Every other dependency
store in the workflow is cached (pnpm, Playwright, Rust); pub was the
only gap.
@wpfleger96 wpfleger96 merged commit ceb5eff into main Jun 19, 2026
22 checks passed
@wpfleger96 wpfleger96 deleted the worktree-wpfleger-ci-flutter-pub-cache branch June 19, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant