Skip to content

Commit fd50a57

Browse files
authored
Populate and save CI cache (#80)
Signed-off-by: Pavol Loffay <[email protected]>
1 parent 3bfd719 commit fd50a57

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.circleci/config.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2.1
22

33
commands:
44
setup_build_environment:
5-
description: 'Checkout, update submodules, restore the cache, and setup docker'
5+
description: "Checkout, update submodules, restore the cache, and setup docker"
66
steps:
77
- checkout
88
- run:
@@ -13,6 +13,14 @@ commands:
1313
- v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
1414
# fallback to using the latest cache if no exact match is found
1515
- v1-dependencies-
16+
populate_and_save_cache:
17+
description: "Downloads all gradle dependencies and uploads cache for later use"
18+
steps:
19+
- run: ./gradlew downloadDependencies
20+
- save_cache:
21+
paths:
22+
- ~/.gradle
23+
key: v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
1624

1725
jobs:
1826
build:
@@ -26,6 +34,7 @@ jobs:
2634
TERM: dumb
2735
steps:
2836
- setup_build_environment
37+
- populate_and_save_cache
2938
- run: make build
3039

3140
muzzle:

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
`java-library`
33
id("com.diffplug.spotless") version "5.2.0" apply false
44
id("org.hypertrace.publish-plugin") version "0.3.3" apply false
5+
id("org.hypertrace.ci-utils-plugin") version "0.1.4"
56
}
67

78
allprojects {

0 commit comments

Comments
 (0)