From a1179d53712a12433f5adee33e84512724cb6ad1 Mon Sep 17 00:00:00 2001 From: Vishal Bhat Soori Date: Sat, 7 Mar 2026 11:10:48 +0000 Subject: [PATCH 1/3] added the manual caching since setup-gradles built in caching is not working --- .github/workflows/qa.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index d38c247..b9217ef 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -20,13 +20,24 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-disabled: true - name: Run Detekt run: ./gradlew detekt + # here we test and build the app in the same github runner so that no extra runner is used and saves time in setting up the environment again during build test-and-build: runs-on: ubuntu-latest @@ -39,10 +50,20 @@ jobs: java-version: '17' distribution: 'temurin' #caches the gradle builds and tests and hence skip unit tests and builds for unchanged modules saving a lot of time + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: false + cache-disabled: true - name: Grant execute permission for gradlew run: chmod +x gradlew From 30423bfb8136004a1c843f9378b4b38dada5b950 Mon Sep 17 00:00:00 2001 From: Vishal Bhat Soori Date: Sat, 7 Mar 2026 11:33:31 +0000 Subject: [PATCH 2/3] fixed the key collision issue between the 2 jobs by using the prefix of the jobs for each runner --- .github/workflows/qa.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index b9217ef..6a64018 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -26,8 +26,9 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-gradle-detekt-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | + ${{ runner.os }}-gradle-detekt- ${{ runner.os }}-gradle- - name: Setup Gradle @@ -56,8 +57,9 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | + ${{ runner.os }}-gradle-build- ${{ runner.os }}-gradle- - name: Setup Gradle From bbe3202c67c05b648f45369b6d54c55885566339 Mon Sep 17 00:00:00 2001 From: Vishal Bhat Soori Date: Sat, 7 Mar 2026 11:46:14 +0000 Subject: [PATCH 3/3] testing the manual caching --- .../kotlin/com/deepfakeshield/av/engine/AntivirusEngineTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/av/src/test/kotlin/com/deepfakeshield/av/engine/AntivirusEngineTest.kt b/av/src/test/kotlin/com/deepfakeshield/av/engine/AntivirusEngineTest.kt index a16ee8f..be3b175 100644 --- a/av/src/test/kotlin/com/deepfakeshield/av/engine/AntivirusEngineTest.kt +++ b/av/src/test/kotlin/com/deepfakeshield/av/engine/AntivirusEngineTest.kt @@ -110,3 +110,5 @@ class AntivirusEngineTest { } } + +