Skip to content

Commit

Permalink
ci: optimise build cache
Browse files Browse the repository at this point in the history
Make sure we only use one gradle cache in each build, instead of two (setup-java + gradle-build-action).
Also, prefer Buildjet actions instead of default ones when available.

(cherry picked from commit dd43c56)
  • Loading branch information
vitorhugods committed Oct 25, 2023
1 parent 98883fd commit 898cc8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/gradle-android-instrumented-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ jobs:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v3
uses: buildjet/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Gradle Setup
uses: gradle/gradle-build-action@v2

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/gradle-ios-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
# cache: gradle # Cache disabled as we use Gradle Setup below

- name: Gradle Setup
uses: gradle/gradle-build-action@v2
with:
cache-disabled: true

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
Expand Down

0 comments on commit 898cc8a

Please sign in to comment.