Skip to content

Commit b1fddde

Browse files
authored
Use built-in caching functionality when setting up JDK in GH Actions (simpledotorg#4338)
* Use built-in caching functionality when setting up JDK in GH Actions * Update CHANGELOG
1 parent 612367a commit b1fddde

File tree

5 files changed

+12
-60
lines changed

5 files changed

+12
-60
lines changed

.github/workflows/benchmark_suite.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
distribution: 'zulu'
2626
java-version: 11
27+
cache: 'gradle'
2728

2829
- name: Benchmark tests
2930
id: run-benchmark-tests

.github/workflows/ci_checks.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v3
2020

21-
- name: Cache Gradle build
22-
uses: actions/cache@v3
23-
with:
24-
path: |
25-
~/.gradle/caches
26-
~/.gradle/wrapper
27-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
28-
restore-keys: |
29-
${{ runner.os }}-gradle-
30-
3121
- name: set up JDK
3222
uses: actions/setup-java@v3
3323
with:
3424
distribution: 'zulu'
3525
java-version: 11
26+
cache: 'gradle'
3627

3728
- name: QA Lint
3829
run: ./gradlew --build-cache --no-daemon lintQaDebug
@@ -42,21 +33,12 @@ jobs:
4233
steps:
4334
- uses: actions/checkout@v3
4435

45-
- name: Cache Gradle build
46-
uses: actions/cache@v3
47-
with:
48-
path: |
49-
~/.gradle/caches
50-
~/.gradle/wrapper
51-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
52-
restore-keys: |
53-
${{ runner.os }}-gradle-
54-
5536
- name: set up JDK
5637
uses: actions/setup-java@v3
5738
with:
5839
distribution: 'zulu'
5940
java-version: 11
41+
cache: 'gradle'
6042

6143
- name: QA Unit Tests
6244
run: ./gradlew --build-cache --no-daemon testQaDebugUnitTest
@@ -109,16 +91,6 @@ jobs:
10991
- name: Link Heroku CLI globally
11092
run: heroku plugins:install buildpacks
11193

112-
- name: Cache Gradle build
113-
uses: actions/cache@v3
114-
with:
115-
path: |
116-
~/.gradle/caches
117-
~/.gradle/wrapper
118-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
119-
restore-keys: |
120-
${{ runner.os }}-gradle-
121-
12294
- name: Cache AVD
12395
uses: actions/cache@v3
12496
id: avd-cache
@@ -145,6 +117,7 @@ jobs:
145117
with:
146118
distribution: 'zulu'
147119
java-version: 11
120+
cache: 'gradle'
148121

149122
- name: Generate server app name
150123
id: generate-server-app-name
@@ -205,6 +178,7 @@ jobs:
205178
with:
206179
distribution: 'zulu'
207180
java-version: 11
181+
cache: 'gradle'
208182

209183
- name: Mobius Migration Tests
210184
run: ./gradlew :mobius-migration:test
@@ -222,6 +196,7 @@ jobs:
222196
with:
223197
distribution: 'zulu'
224198
java-version: 11
199+
cache: 'gradle'
225200

226201
- name: Build ${{ matrix.buildType }} Release bundle
227202
run: |

.github/workflows/maestro_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
distribution: 'zulu'
2525
java-version: 11
26+
cache: 'gradle'
2627

2728
- name: Install Maestro
2829
run: |

.github/workflows/trigger_release.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,12 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- name: Cache Gradle build
19-
uses: actions/cache@v3
20-
with:
21-
path: |
22-
~/.gradle/caches
23-
~/.gradle/wrapper
24-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
25-
restore-keys: |
26-
${{ runner.os }}-gradle-
27-
2818
- name: set up JDK
2919
uses: actions/setup-java@v3
3020
with:
3121
distribution: 'zulu'
3222
java-version: 11
23+
cache: 'gradle'
3324

3425
- name: QA Lint
3526
run: ./gradlew --build-cache --no-daemon lintQaDebug
@@ -40,21 +31,12 @@ jobs:
4031
steps:
4132
- uses: actions/checkout@v3
4233

43-
- name: Cache Gradle build
44-
uses: actions/cache@v3
45-
with:
46-
path: |
47-
~/.gradle/caches
48-
~/.gradle/wrapper
49-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
50-
restore-keys: |
51-
${{ runner.os }}-gradle-
52-
5334
- name: set up JDK
5435
uses: actions/setup-java@v3
5536
with:
5637
distribution: 'zulu'
5738
java-version: 11
39+
cache: 'gradle'
5840

5941
- name: QA Unit Tests
6042
run: ./gradlew --build-cache --no-daemon testQaDebugUnitTest
@@ -108,16 +90,6 @@ jobs:
10890
- name: Link Heroku CLI globally
10991
run: heroku plugins:install buildpacks
11092

111-
- name: Cache Gradle build
112-
uses: actions/cache@v3
113-
with:
114-
path: |
115-
~/.gradle/caches
116-
~/.gradle/wrapper
117-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
118-
restore-keys: |
119-
${{ runner.os }}-gradle-
120-
12193
- name: Cache AVD
12294
uses: actions/cache@v3
12395
id: avd-cache
@@ -144,6 +116,7 @@ jobs:
144116
with:
145117
distribution: 'zulu'
146118
java-version: 11
119+
cache: 'gradle'
147120

148121
- name: Generate server app name
149122
id: generate-server-app-name
@@ -212,6 +185,7 @@ jobs:
212185
with:
213186
distribution: 'zulu'
214187
java-version: 11
188+
cache: 'gradle'
215189

216190
- name: Build ${{ matrix.buildType }} Release bundle
217191
run: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Replace Tamil Nadu app logo and illustrations with DPH logo
1212
- Bump Benchmark Gradle Plugin to v1.1.1
1313
- Bump sentry to v6.7.1
14+
- Use built-in caching functionality when setting up JDK in GH Actions
1415

1516
## 2022-11-14-8505
1617

0 commit comments

Comments
 (0)