@@ -30,12 +30,21 @@ jobs:
3030 - uses : actions/checkout@v4
3131 - name : Install System Dependencies
3232 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-
3342 - name : Install JDK
43+ if : steps.cache-jdk.outputs.cache-hit != 'true'
3444 run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
3545 # TODO: not using setup-java since incompatible with the swiftlang/swift base image
3646 - name : Install Untested Nightly Swift
3747 run : " bash -xc './docker/install_untested_nightly_swift.sh'"
38- # setup caches
3948 - name : Cache local Gradle repository
4049 uses : actions/cache@v4
4150 continue-on-error : true
@@ -76,11 +85,21 @@ jobs:
7685 - uses : actions/checkout@v4
7786 - name : Install System Dependencies
7887 run : apt-get -qq update && apt-get -qq install -y make curl wget
88+ - name : Cache JDK
89+ id : cache-jdk
90+ uses : actions/cache@v4
91+ continue-on-error : true
92+ with :
93+ path : /usr/lib/jvm/default-jdk/
94+ key : ${{ runner.os }}-jdk-${{ matrix.jdk_vendor }}-${{ hashFiles('/usr/lib/jvm/default-jdk/*') }}
95+ restore-keys : |
96+ ${{ runner.os }}-jdk-
7997 - name : Install JDK
98+ if : steps.cache-jdk.outputs.cache-hit != 'true'
8099 run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
100+ # TODO: not using setup-java since incompatible with the swiftlang/swift base image
81101 - name : Install Untested Nightly Swift
82102 run : " bash -xc './docker/install_untested_nightly_swift.sh'"
83- # setup caches
84103 - name : Cache local Gradle repository
85104 uses : actions/cache@v4
86105 continue-on-error : true
0 commit comments