@@ -30,12 +30,21 @@ jobs:
30
30
- uses : actions/checkout@v4
31
31
- name : Install System Dependencies
32
32
run : apt-get -qq update && apt-get -qq install -y make curl wget
33
+ - name : Cache JDK
34
+ id : cache-jdk
35
+ uses : actions/cache@v4
36
+ continue-on-error : true
37
+ with :
38
+ path : /usr/lib/jvm/default-jdk/
39
+ key : ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
40
+ restore-keys : |
41
+ ${{ runner.os }}-jdk-
33
42
- name : Install JDK
43
+ if : steps.cache-jdk.outputs.cache-hit != 'true'
34
44
run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
35
45
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
36
46
- name : Install Untested Nightly Swift
37
47
run : " bash -xc './docker/install_untested_nightly_swift.sh'"
38
- # setup caches
39
48
- name : Cache local Gradle repository
40
49
uses : actions/cache@v4
41
50
continue-on-error : true
@@ -79,11 +88,21 @@ jobs:
79
88
- uses : actions/checkout@v4
80
89
- name : Install System Dependencies
81
90
run : apt-get -qq update && apt-get -qq install -y make curl wget
91
+ - name : Cache JDK
92
+ id : cache-jdk
93
+ uses : actions/cache@v4
94
+ continue-on-error : true
95
+ with :
96
+ path : /usr/lib/jvm/default-jdk/
97
+ key : ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
98
+ restore-keys : |
99
+ ${{ runner.os }}-jdk-
82
100
- name : Install JDK
101
+ if : steps.cache-jdk.outputs.cache-hit != 'true'
83
102
run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
103
+ # TODO: not using setup-java since incompatible with the swiftlang/swift base image
84
104
- name : Install Untested Nightly Swift
85
105
run : " bash -xc './docker/install_untested_nightly_swift.sh'"
86
- # setup caches
87
106
- name : Cache local Gradle repository
88
107
uses : actions/cache@v4
89
108
continue-on-error : true
0 commit comments