Skip to content

Commit e4c477a

Browse files
authored
Disable build cache since Github Action runners fail with 'no space left on device' (#10409)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
1 parent dad525a commit e4c477a

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

.github/workflows/assemble.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Gradle Assemble
2+
on: [pull_request]
3+
4+
jobs:
5+
assemble:
6+
if: github.repository == 'opensearch-project/OpenSearch'
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up JDK 11
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: 11
17+
distribution: temurin
18+
- name: Setup docker (missing on MacOS)
19+
if: runner.os == 'macos'
20+
run: |
21+
brew install docker
22+
colima start
23+
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
24+
- name: Run Gradle (assemble)
25+
run: |
26+
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE

.github/workflows/precommit.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Gradle Precommit and Assemble
1+
name: Gradle Precommit
22
on: [pull_request]
33

44
jobs:
@@ -19,12 +19,3 @@ jobs:
1919
- name: Run Gradle (precommit)
2020
run: |
2121
./gradlew javadoc precommit --parallel
22-
- name: Setup docker (missing on MacOS)
23-
if: runner.os == 'macos'
24-
run: |
25-
brew install docker
26-
colima start
27-
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
28-
- name: Run Gradle (assemble)
29-
run: |
30-
./gradlew assemble --parallel

settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ plugins {
1313
id "com.gradle.enterprise" version "3.14.1"
1414
}
1515

16+
ext.disableBuildCache = hasProperty('DISABLE_BUILD_CACHE') || System.getenv().containsKey('DISABLE_BUILD_CACHE')
17+
1618
buildCache {
1719
local {
18-
enabled = true
20+
enabled = !disableBuildCache
1921
removeUnusedEntriesAfterDays = 14
2022
}
2123
}

0 commit comments

Comments
 (0)