-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Oracle JDK #401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2910f33
to
43a44e9
Compare
Thanks for approving, @brunoborges. I just pushed a commit that should make the tests work on macOS and Windows. |
|
||
protected async findPackageForDownload(range: string): Promise<JavaDownloadRelease> { | ||
const arch = this.distributionArchitecture(); | ||
if (arch !== 'x64' && arch !== 'aarch64') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Oralce provides java binaries for aarch64
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Oracle does provide x64
and aarch64
binaries for Linux and macOS. That's why this check throws an error for non-x64
and non-aarch64
architectures.
Note: no aarch64
binaries for Windows, though https://www.oracle.com/java/technologies/downloads/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (parseInt(major) < 17) { | ||
throw new Error('Oracle JDK is only supported for JDK 17 and later'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove and add it to the documentation because if the versions is not found it will return 404 code. It can be handled further code checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this limitation to the documentation is a good point.
Keeping it here has also an additional value, as users passing lower values for Java's "major" version will see an explicit error message that this vendor only supports "JDK 17 and later".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also the following note in https://github.com/actions/setup-java#supported-distributions section.
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.
Doesn't this suffice?
Hello @fniephaus. Could you please update documentation for advanced configuration with examples for Oracle JDK ? Besides, If I understood correctly, it is impossible to grab all versions from API ? |
I'll add an example to https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md
What do you mean with "grab all version from API" ? Find a list and a description of supported versions at https://www.oracle.com/java/technologies/jdk-script-friendly-urls/ |
For now the logic constructs url from major or full version. Is it possible to get all available versions ? |
Ah, understood. AFAIK, it's not possible to get a list of all binaries via an API call. There is however a listing available per "major" version at: https://www.oracle.com/java/technologies/downloads/archive/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for your description @sormuras. In this case I'm going to merge the pull request. |
Thanks for merging this, @dmitry-shibanov. When can we expect a new release of this action so that users can use Oracle JDK and |
Hello @fniephaus. We've released a new version of setup-java v3.7.0. Later we'll update the major tag |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-java](https://togithub.com/actions/setup-java) | action | minor | `v3.6.0` -> `v3.7.0` | --- ### Release Notes <details> <summary>actions/setup-java</summary> ### [`v3.7.0`](https://togithub.com/actions/setup-java/releases/tag/v3.7.0) [Compare Source](https://togithub.com/actions/setup-java/compare/v3.6.0...v3.7.0) In scope of this release we added support for Oracle JDK ([https://github.com/actions/setup-java/pull/401](https://togithub.com/actions/setup-java/pull/401)). Besides, we added logic to Pass the token input through on GHES for Microsoft Build of OpenJDK ([https://github.com/actions/setup-java/pull/395](https://togithub.com/actions/setup-java/pull/395)) and updated [minimatch](https://togithub.com/actions/setup-java/pull/413) dependency. ```yaml steps: - name: Checkout uses: actions/checkout@v3 - name: Setup-java uses: actions/setup-java@v3 with: distribution: oracle java-version: 17 ``` ##### Supported distributions Currently, the following distributions are supported: | Keyword | Distribution | Official site | License |-|-|-|-| | `temurin` | Eclipse Temurin | [Link](https://adoptium.net/) | [Link](https://adoptium.net/about.html) | `zulu` | Azul Zulu OpenJDK | [Link](https://www.azul.com/downloads/zulu-community/?package=jdk) | [Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) | | `adopt` or `adopt-hotspot` | AdoptOpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | `adopt-openj9` | AdoptOpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | `liberica` | Liberica JDK | [Link](https://bell-sw.com/) | [Link](https://bell-sw.com/liberica_eula/) | | `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq) | `corretto` | Amazon Corretto Build of OpenJDK | [Link](https://aws.amazon.com/corretto/) | [Link](https://aws.amazon.com/corretto/faqs/) | `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/Yash-Garg/qBittorrent-Manager). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40NC4wIiwidXBkYXRlZEluVmVyIjoiMzQuNDQuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Hey I thing this tag was a mistake I have nothing to do with this issue (wrong person). Can you fix it please? Thanks! |
* Fix typo in README.md (actions#419) `diractory` -> `directory` * Revert "Add support for Oracle JDK (actions#401)" (actions#421) This reverts commit 6cdf39a. Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com> * adding check for prerelease * add debug lines * add minor fix * expand e2e tests with corretto Co-authored-by: Ashley <73482956+ascopes@users.noreply.github.com> Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
This reverts commit 6cdf39a. Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
…" (actions#450) This reverts commit c3ac5dd.
…" (actions#450) This reverts commit c3ac5dd.
Description:
This PR adds Oracle JDK to the list of supported distributions.
Related issue: #69
Check list: