Skip to content

Commit 9f21b1e

Browse files
cortinicofacebook-github-bot
authored andcommitted
Enable Gradle Configuration Caching on CI
Summary: This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save. There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut. Changelog: [Internal] [Changed] - Differential Revision: D69846848
1 parent d69874f commit 9f21b1e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/actions/build-android/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ runs:
5454
# release: we want to build all archs (default)
5555
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
5656
fi
57-
./gradlew $TASKS -PenableWarningsAsErrors=true
57+
./gradlew $TASKS -PenableWarningsAsErrors=true --configuration-cache
5858
- name: Save Android ccache
5959
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
6060
uses: actions/cache/save@v4

.github/actions/setup-gradle/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ runs:
1515
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }}
1616
# Similarly, for those jobs we want to start with a clean cache so it doesn't grow without limits (this is the negation of the previous condition).
1717
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }}
18-
# Temporarily disabling to try resolve a cache cleanup failure
19-
# gradle-home-cache-cleanup: true
2018
add-job-summary-as-pr-comment: on-failure
19+
# Encryption key for the Gradle Configuration Cache.
20+
# See https://docs.gradle.org/8.6/userguide/configuration_cache.html#config_cache:secrets:configuring_encryption_key
21+
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}

0 commit comments

Comments
 (0)