Skip to content

Commit

Permalink
Enable Gradle Configuration Caching on CI
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Feb 19, 2025
1 parent d69874f commit 9f21b1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ runs:
# release: we want to build all archs (default)
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
fi
./gradlew $TASKS -PenableWarningsAsErrors=true
./gradlew $TASKS -PenableWarningsAsErrors=true --configuration-cache
- name: Save Android ccache
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
uses: actions/cache/save@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/actions/setup-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ runs:
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }}
# 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).
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }}
# Temporarily disabling to try resolve a cache cleanup failure
# gradle-home-cache-cleanup: true
add-job-summary-as-pr-comment: on-failure
# Encryption key for the Gradle Configuration Cache.
# See https://docs.gradle.org/8.6/userguide/configuration_cache.html#config_cache:secrets:configuring_encryption_key
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}

0 comments on commit 9f21b1e

Please sign in to comment.