Skip to content

Commit

Permalink
Disable build cache since Github Action runners fail with 'no space l…
Browse files Browse the repository at this point in the history
…eft on device'

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Oct 5, 2023
1 parent 1eec0f1 commit 81275c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
with:
java-version: 11
distribution: temurin
cache: gradle
- name: Run Gradle (precommit)
run: |
./gradlew javadoc precommit --parallel
./gradlew javadoc precommit --parallel --no-build-cache -PDISABLE_BUILD_CACHE
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
Expand All @@ -27,4 +26,4 @@ jobs:
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Run Gradle (assemble)
run: |
./gradlew assemble --parallel
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

# Enable build caching
org.gradle.caching=true
org.gradle.caching=false
org.gradle.warning.mode=none
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ plugins {
id "com.gradle.enterprise" version "3.14.1"
}

ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE')

buildCache {
local {
enabled = true
enabled = !disableBuildCache
removeUnusedEntriesAfterDays = 14
}
}
Expand Down

0 comments on commit 81275c6

Please sign in to comment.