Skip to content

Commit

Permalink
Cherry pick PR #3348: Switch to caching Gradle wrapper and components (
Browse files Browse the repository at this point in the history
…#3353)

Refer to the original PR: #3348

Adds a cache for Gradle components. Cache will be saved on successful
build and keyed off Android gradle build files.

b/337337924

---------

Co-authored-by: Kaido Kert <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and kaidokert committed May 24, 2024
1 parent 9ad9a4a commit f979638
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ jobs:
# Use fetch depth of 0 to get full history for a valid build id.
fetch-depth: 0
persist-credentials: false
- name: Setup Gradle
- name: Cache Gradle
uses: actions/cache@v3
if: startsWith( matrix.target_platform , 'android')
run: |
for i in `seq 1 5`; do
starboard/android/apk/gradlew --version || true
done
with:
key: gradle-cache-${{ hashFiles('starboard/android/apk/**/*gradle*') }}
path: |
/root/.gradle/caches
/root/.gradle/wrapper
- name: GN
uses: ./.github/actions/gn
- name: Build Cobalt
Expand Down

0 comments on commit f979638

Please sign in to comment.