From 898cc8ab3f43bb477c70407035d45e696889b183 Mon Sep 17 00:00:00 2001 From: Vitor Hugo Schwaab Date: Wed, 25 Oct 2023 14:39:28 +0200 Subject: [PATCH] ci: optimise build cache 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 dd43c569fd8da3ac25aca5e43cb474b7a5945630) --- .github/workflows/gradle-android-instrumented-tests.yml | 5 +---- .github/workflows/gradle-ios-tests.yml | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gradle-android-instrumented-tests.yml b/.github/workflows/gradle-android-instrumented-tests.yml index 5c4dca8f263..b757468eb3c 100644 --- a/.github/workflows/gradle-android-instrumented-tests.yml +++ b/.github/workflows/gradle-android-instrumented-tests.yml @@ -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 diff --git a/.github/workflows/gradle-ios-tests.yml b/.github/workflows/gradle-ios-tests.yml index 5a598edc03c..3272cc6476c 100644 --- a/.github/workflows/gradle-ios-tests.yml +++ b/.github/workflows/gradle-ios-tests.yml @@ -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