Skip to content

Commit

Permalink
feat: add support for SapMachine JDK/JRE (#614)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Schwaninger <christian.schwaninger@sap.com>
  • Loading branch information
Shegox and skateball authored Sep 5, 2024
1 parent 8e04ddf commit 7467385
Show file tree
Hide file tree
Showing 9 changed files with 88,071 additions and 8 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/e2e-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
'microsoft',
'semeru',
'corretto',
'dragonwell'
'dragonwell',
'sapmachine'
] # internally 'adopt-hotspot' is the same as 'adopt'
version: ['21', '11', '17']
exclude:
Expand Down Expand Up @@ -85,6 +86,9 @@ jobs:
- distribution: dragonwell
os: ubuntu-latest
version: '11.0.13+9'
- distribution: sapmachine
os: ubuntu-latest
version: '17.0.7'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -106,7 +110,8 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
distribution:
['temurin', 'zulu', 'liberica', 'dragonwell', 'sapmachine']
exclude:
- distribution: dragonwell
os: macos-latest
Expand All @@ -132,7 +137,8 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
distribution:
['temurin', 'zulu', 'liberica', 'dragonwell', 'sapmachine']
exclude:
- distribution: dragonwell
os: macos-latest
Expand All @@ -154,10 +160,10 @@ jobs:
{
$envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}"
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
if (-not (Test-Path "$JavaVersionPath")) {
if (-not (Test-Path "$JavaVersionPath")) {
Write-Host "$envName is not found"
exit 1
}
}
}
shell: pwsh
- name: Verify Java
Expand Down Expand Up @@ -208,6 +214,28 @@ jobs:
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
shell: bash

setup-java-ea-versions-sapmachine:
name: sapmachine ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
needs: setup-java-major-minor-versions
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
version: ['17-ea', '21-ea']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup-java
uses: ./
id: setup-java
with:
java-version: ${{ matrix.version }}
distribution: sapmachine
- name: Verify Java
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
shell: bash

setup-java-custom-package-type:
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }}
needs: setup-java-major-minor-versions
Expand All @@ -216,7 +244,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-13, windows-latest, ubuntu-latest]
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
distribution: ['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine']
java-package: ['jre']
version: ['17.0']
include:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This action allows you to work with Java and Scala projects.
- `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.

- `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).

- `distribution`: _(required)_ Java [distribution](#supported-distributions).

- `java-package`: The packaging variant of the chosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`.
Expand Down Expand Up @@ -108,6 +108,7 @@ Currently, the following distributions are supported:
| `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) |
| `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense)
| `dragonwell` | Alibaba Dragonwell JDK | [Link](https://dragonwell-jdk.io/) | [Link](https://www.aliyun.com/product/dragonwell/)
| `sapmachine` | SAP SapMachine JDK/JRE | [Link](https://sapmachine.io/) | [Link](https://github.com/SAP/SapMachine/blob/sapmachine/LICENSE)

**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.

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

0 comments on commit 7467385

Please sign in to comment.