Skip to content

Commit f824042

Browse files
committed
fix(ci): cache maven without relying on repo pom files
Remove setup-java's built-in Maven cache from the repository root and restore ~/.m2/repository via actions/cache so the workflow can run before tfjava is cloned.
1 parent d41e80b commit f824042

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/build-android-arm64.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
with:
4242
distribution: temurin
4343
java-version: "11"
44-
cache: maven
4544

4645
- name: Restore Bazel caches
4746
uses: actions/cache@v4
@@ -54,6 +53,15 @@ jobs:
5453
${{ runner.os }}-bazel-${{ env.ANDROID_PLATFORM }}-${{ env.TFJAVA_COMMIT }}-
5554
${{ runner.os }}-bazel-${{ env.ANDROID_PLATFORM }}-
5655
56+
- name: Restore Maven repository cache
57+
uses: actions/cache@v4
58+
with:
59+
path: /home/runner/.m2/repository
60+
key: ${{ runner.os }}-m2-${{ env.TFJAVA_COMMIT }}-${{ hashFiles('scripts/patch_tfjava.py', '.github/workflows/build-android-arm64.yml') }}
61+
restore-keys: |
62+
${{ runner.os }}-m2-${{ env.TFJAVA_COMMIT }}-
63+
${{ runner.os }}-m2-
64+
5765
- name: Clone TensorFlow Java
5866
shell: bash
5967
run: |

0 commit comments

Comments
 (0)