Skip to content

Commit

Permalink
Remove default Java installs so they are not used
Browse files Browse the repository at this point in the history
This installs openjdk-17-jdk as the only system JDK so that if
maven subcommands fall back on the system they can still run JRuby
build for 17+. It should only get used in that case.

See actions/setup-java#701
  • Loading branch information
headius committed Oct 30, 2024
1 parent d13e518 commit e863e7a
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
Expand All @@ -50,6 +52,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand All @@ -75,6 +79,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -105,6 +111,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -132,6 +140,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -162,6 +172,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -189,6 +201,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -217,6 +231,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand All @@ -242,6 +258,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand All @@ -263,6 +281,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -298,7 +318,9 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up java
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand All @@ -320,6 +342,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -396,6 +420,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -424,6 +450,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: remove default java except 17
run: sudo apt remove temurin-8-jdk temurin-11-jdk temurin-21-jdk
- name: set up java 17
uses: actions/setup-java@v3
with:
Expand Down

0 comments on commit e863e7a

Please sign in to comment.