Skip to content

Commit 9aff9a5

Browse files
committed
final take on caches?
1 parent 3843238 commit 9aff9a5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
3939
- name: Install Untested Nightly Swift
4040
run: "bash -xc './docker/install_untested_nightly_swift.sh'"
41+
# setup caches
4142
- name: Cache local Gradle repository
4243
uses: actions/cache@v4
4344
continue-on-error: true
@@ -57,6 +58,7 @@ jobs:
5758
restore-keys: |
5859
${{ runner.os }}-swiftpm-cache
5960
${{ runner.os }}-swiftpm-
61+
# run the actual build
6062
- name: Gradle build
6163
run: ./gradlew update --info --no-daemon
6264
- name: Debug HOME Paths
@@ -87,15 +89,27 @@ jobs:
8789
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
8890
- name: Install Untested Nightly Swift
8991
run: "bash -xc './docker/install_untested_nightly_swift.sh'"
92+
# setup caches
93+
- name: Cache local Gradle repository
94+
uses: actions/cache@v4
95+
continue-on-error: true
96+
with:
97+
path: |
98+
/root/.gradle/caches
99+
/root/.gradle/wrapper
100+
key: ${{ runner.os }}-gradle-${{ hashFiles('*/*.gradle*', 'settings.gradle') }}
101+
restore-keys: |
102+
${{ runner.os }}-gradle-
90103
- name: Cache local SwiftPM repository
91104
uses: actions/cache@v4
92105
continue-on-error: true
93106
with:
94-
path: ~/.build/checkouts
107+
path: /__w/swift-java/swift-java/.build/checkouts
95108
key: ${{ runner.os }}-swiftpm-cache-${{ hashFiles('Package.swift') }}
96109
restore-keys: |
97110
${{ runner.os }}-swiftpm-cache
98111
${{ runner.os }}-swiftpm-
112+
# run the actual build
99113
- name: Generate sources (make) (Temporary)
100114
# TODO: this should be triggered by the respective builds
101115
run: "make jextract-run"

0 commit comments

Comments
 (0)