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 abef784
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Gradle Precommit and Assemble
on: [pull_request]

jobs:

precommit:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ${{ matrix.os }}
Expand All @@ -15,16 +16,12 @@ jobs:
with:
java-version: 11
distribution: temurin
cache: gradle
- name: Run Gradle (precommit)
run: |
./gradlew javadoc precommit --parallel
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Run Gradle (assemble)
- name: Run Gradle (precommit & assemble)
run: |
./gradlew assemble --parallel
./gradlew javadoc precommit assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE -Dorg.gradle.caching=false
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 abef784

Please sign in to comment.