Skip to content

armgit / ente

Public Imported from GitHub
0

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

Reuse warmed build caches for Android lint

Manav Rathi9d12a12fb7f3
diff --git a/.github/scripts/ci/paths.json b/.github/scripts/ci/paths.json
index fb4aeedf09..e1b2d4cb3e 100644
--- a/.github/scripts/ci/paths.json
+++ b/.github/scripts/ci/paths.json
@@ -1,5 +1,6 @@
{
"android-lint": [
+ ".github/actions/restore-rust-target/**",
".github/workflows/android-lint.yml",
"android/**",
"rust/.cargo/config.toml",
diff --git a/.github/workflows/android-lint.yml b/.github/workflows/android-lint.yml
index a4ecc18b7a..59ad472336 100644
--- a/.github/workflows/android-lint.yml
+++ b/.github/workflows/android-lint.yml
@@ -19,11 +19,26 @@ jobs:
with:
workspaces: rust
shared-key: photos-desktop-ensu-android
+ cache-targets: false
save-if: false
+ - name: Restore Rust target
+ uses: ./.github/actions/restore-rust-target
+ with:
+ shared-key: photos-desktop-ensu-android
+
- name: Install Vulkan build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libvulkan-dev glslc
+ - name: Restore Gradle cache
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ key: gradle-${{ github.sha }}
+ restore-keys: gradle-
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+
- run: ./android/scripts/lint.sh
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index 8c6e998f17..367f406be5 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -236,7 +236,7 @@ jobs:
path: rust/target
photos-desktop-ensu-android:
- # For desktop-lint.yml and ensu-android-build.yml.
+ # For desktop-lint.yml, android-lint.yml and ensu-android-build.yml.
runs-on: ubuntu-latest
steps:
- name: Checkout
diff --git a/android/scripts/lint.sh b/android/scripts/lint.sh
index df58d5d102..064a26c6fa 100755
--- a/android/scripts/lint.sh
+++ b/android/scripts/lint.sh
@@ -6,4 +6,4 @@ python3 checks/gradle-order/check.py .
python3 checks/gradle-order/test.py
(cd ../rust && cargo codegen native)
-./gradlew :lint
+./gradlew --build-cache :lint