Skip to content

Commit 7467385

Browse files
Shegoxskateball
andauthored
feat: add support for SapMachine JDK/JRE (actions#614)
Co-authored-by: Christian Schwaninger <christian.schwaninger@sap.com>
1 parent 8e04ddf commit 7467385

File tree

9 files changed

+88071
-8
lines changed

9 files changed

+88071
-8
lines changed

.github/workflows/e2e-versions.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
'microsoft',
3131
'semeru',
3232
'corretto',
33-
'dragonwell'
33+
'dragonwell',
34+
'sapmachine'
3435
] # internally 'adopt-hotspot' is the same as 'adopt'
3536
version: ['21', '11', '17']
3637
exclude:
@@ -85,6 +86,9 @@ jobs:
8586
- distribution: dragonwell
8687
os: ubuntu-latest
8788
version: '11.0.13+9'
89+
- distribution: sapmachine
90+
os: ubuntu-latest
91+
version: '17.0.7'
8892
steps:
8993
- name: Checkout
9094
uses: actions/checkout@v4
@@ -106,7 +110,8 @@ jobs:
106110
fail-fast: false
107111
matrix:
108112
os: [macos-latest, windows-latest, ubuntu-latest]
109-
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
113+
distribution:
114+
['temurin', 'zulu', 'liberica', 'dragonwell', 'sapmachine']
110115
exclude:
111116
- distribution: dragonwell
112117
os: macos-latest
@@ -132,7 +137,8 @@ jobs:
132137
fail-fast: false
133138
matrix:
134139
os: [macos-latest, windows-latest, ubuntu-latest]
135-
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
140+
distribution:
141+
['temurin', 'zulu', 'liberica', 'dragonwell', 'sapmachine']
136142
exclude:
137143
- distribution: dragonwell
138144
os: macos-latest
@@ -154,10 +160,10 @@ jobs:
154160
{
155161
$envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}"
156162
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
157-
if (-not (Test-Path "$JavaVersionPath")) {
163+
if (-not (Test-Path "$JavaVersionPath")) {
158164
Write-Host "$envName is not found"
159165
exit 1
160-
}
166+
}
161167
}
162168
shell: pwsh
163169
- name: Verify Java
@@ -208,6 +214,28 @@ jobs:
208214
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
209215
shell: bash
210216

217+
setup-java-ea-versions-sapmachine:
218+
name: sapmachine ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
219+
needs: setup-java-major-minor-versions
220+
runs-on: ${{ matrix.os }}
221+
strategy:
222+
fail-fast: false
223+
matrix:
224+
os: [macos-latest, windows-latest, ubuntu-latest]
225+
version: ['17-ea', '21-ea']
226+
steps:
227+
- name: Checkout
228+
uses: actions/checkout@v4
229+
- name: setup-java
230+
uses: ./
231+
id: setup-java
232+
with:
233+
java-version: ${{ matrix.version }}
234+
distribution: sapmachine
235+
- name: Verify Java
236+
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
237+
shell: bash
238+
211239
setup-java-custom-package-type:
212240
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }}
213241
needs: setup-java-major-minor-versions
@@ -216,7 +244,7 @@ jobs:
216244
fail-fast: false
217245
matrix:
218246
os: [macos-13, windows-latest, ubuntu-latest]
219-
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
247+
distribution: ['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine']
220248
java-package: ['jre']
221249
version: ['17.0']
222250
include:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This action allows you to work with Java and Scala projects.
2828
- `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified.
2929

3030
- `java-version-file`: The path to a file containing java version. Supported file types are `.java-version` and `.tool-versions`. See more details in [about .java-version-file](docs/advanced-usage.md#Java-version-file).
31-
31+
3232
- `distribution`: _(required)_ Java [distribution](#supported-distributions).
3333

3434
- `java-package`: The packaging variant of the chosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`.
@@ -108,6 +108,7 @@ Currently, the following distributions are supported:
108108
| `semeru` | IBM Semeru Runtime Open Edition | [Link](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [Link](https://openjdk.java.net/legal/gplv2+ce.html) |
109109
| `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense)
110110
| `dragonwell` | Alibaba Dragonwell JDK | [Link](https://dragonwell-jdk.io/) | [Link](https://www.aliyun.com/product/dragonwell/)
111+
| `sapmachine` | SAP SapMachine JDK/JRE | [Link](https://sapmachine.io/) | [Link](https://github.com/SAP/SapMachine/blob/sapmachine/LICENSE)
111112

112113
**NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions.
113114

@@ -257,6 +258,7 @@ In the example above multiple JDKs are installed for the same job. The result af
257258
- [Amazon Corretto](docs/advanced-usage.md#Amazon-Corretto)
258259
- [Oracle](docs/advanced-usage.md#Oracle)
259260
- [Alibaba Dragonwell](docs/advanced-usage.md#Alibaba-Dragonwell)
261+
- [SapMachine](docs/advanced-usage.md#SapMachine)
260262
- [Installing custom Java package type](docs/advanced-usage.md#Installing-custom-Java-package-type)
261263
- [Installing custom Java architecture](docs/advanced-usage.md#Installing-custom-Java-architecture)
262264
- [Installing custom Java distribution from local file](docs/advanced-usage.md#Installing-Java-from-local-file)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy