Skip to content

Commit 016ff70

Browse files
committed
ci: change how we install jdk on macos
1 parent 8842a5a commit 016ff70

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/actions/prepare_env/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ runs:
55
using: composite
66
steps:
77
- name: Install System Dependencies
8+
if: matrix.os == 'ubuntu-latest'
89
run: apt-get -qq update && apt-get -qq install -y make curl wget libjemalloc2 libjemalloc-dev
910
shell: bash
11+
- name: Set up JDK ${{ matrix.java }}
12+
uses: actions/setup-java@v4
13+
with:
14+
java-version: ${{ matrix.java }}
15+
distribution: 'zulu'
16+
cache: 'gradle'
1017
- name: Cache JDKs
1118
id: cache-jdk
19+
if: matrix.os == 'ubuntu-latest'
1220
uses: actions/cache@v4
1321
continue-on-error: true
1422
with:
@@ -17,12 +25,9 @@ runs:
1725
restore-keys: |
1826
${{ runner.os }}-jdk-
1927
- name: Install JDK
20-
if: steps.cache-jdk.outputs.cache-hit != 'true'
28+
if: steps.cache-jdk.outputs.cache-hit != 'true' && matrix.os == 'ubuntu-latest'
2129
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
2230
shell: bash
23-
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
24-
# - name: Install Untested Nightly Swift
25-
# run: "bash -xc './docker/install_untested_nightly_swift.sh'"
2631
- name: Cache local Gradle repository
2732
uses: actions/cache@v4
2833
continue-on-error: true
@@ -34,6 +39,7 @@ runs:
3439
restore-keys: |
3540
${{ runner.os }}-gradle-
3641
- name: Cache local SwiftPM repository
42+
if: matrix.os == 'ubuntu-latest'
3743
uses: actions/cache@v4
3844
continue-on-error: true
3945
with:

0 commit comments

Comments
 (0)