Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Cache generated Flutter localizations in CI

Manav Rathi64201622fdce
diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml
index 53c1909efb..13081bfc57 100644
--- a/.github/workflows/mobile-lint.yml
+++ b/.github/workflows/mobile-lint.yml
@@ -80,6 +80,15 @@ jobs:
- run: cargo clippy -p ente-locker-frb --features flutter --all-targets --locked
working-directory: rust
+ - name: Restore localizations
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ key: mobile-l10n-${{ hashFiles('.github/actions/setup-flutter/action.yml', 'mobile/analysis_options.yaml', 'mobile/packages/strings/*.yaml', 'mobile/packages/strings/lib/l10n/arb/*.arb') }}
+ path: |
+ mobile/packages/strings/build
+ mobile/packages/strings/lib/l10n/strings_localizations*.dart
+ mobile/packages/strings/lib/l10n/untranslated_messages.json
+
- run: flutter pub get --enforce-lockfile
working-directory: mobile
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index 8c6e998f17..e22532b320 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -129,7 +129,7 @@ jobs:
path: rust/target
rust-flutter:
- # For the cargo steps of mobile-lint.yml.
+ # For mobile-lint.yml.
runs-on: ubuntu-latest
defaults:
run:
@@ -175,6 +175,18 @@ jobs:
key: ${{ steps.rust-target.outputs.cache-key }}
path: rust/target
+ - name: Cache localizations
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ key: mobile-l10n-${{ hashFiles('.github/actions/setup-flutter/action.yml', 'mobile/analysis_options.yaml', 'mobile/packages/strings/*.yaml', 'mobile/packages/strings/lib/l10n/arb/*.arb') }}
+ path: |
+ mobile/packages/strings/build
+ mobile/packages/strings/lib/l10n/strings_localizations*.dart
+ mobile/packages/strings/lib/l10n/untranslated_messages.json
+
+ - run: flutter pub get --enforce-lockfile
+ working-directory: mobile
+
web:
# For web-lint.yml.
runs-on: ubuntu-latest