mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Add support for Eclipse Temurin (#201)
* Add support for Adoptium OpenJDK Refs https://github.com/actions/setup-java/issues/191 * Rename distribution to Eclipse Temurin * Update end-to-end tests in GitHub workflows * Exclude e2e tests for Temurin JREs for now * fix version * Update e2e-versions.yml * Handle Eclipse Temurin version suffixes ("beta") * Add test for new version suffix "beta" * Add updated `index.js` * fix an issue Co-authored-by: Maxim Lobanov <maxim-lobanov@github.com>
This commit is contained in:
parent
ad01d131cc
commit
4b1b3d4a82
10 changed files with 9484 additions and 11 deletions
39
.github/workflows/e2e-local-file.yml
vendored
39
.github/workflows/e2e-local-file.yml
vendored
|
@ -83,4 +83,41 @@ jobs:
|
|||
architecture: x64
|
||||
- name: Verify Java version
|
||||
run: bash __tests__/verify-java.sh "11.0" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
shell: bash
|
||||
|
||||
setup-java-local-file-temurin:
|
||||
name: Validate installation from local file Eclipse Temurin
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download Eclipse Temurin file
|
||||
run: |
|
||||
if ($IsLinux) {
|
||||
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz"
|
||||
$localFilename = "java_package.tar.gz"
|
||||
} elseif ($IsMacOS) {
|
||||
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.12_7.tar.gz"
|
||||
$localFilename = "java_package.tar.gz"
|
||||
} elseif ($IsWindows) {
|
||||
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.12_7.zip"
|
||||
$localFilename = "java_package.zip"
|
||||
}
|
||||
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
|
||||
shell: pwsh
|
||||
- name: setup-java
|
||||
uses: ./
|
||||
id: setup-java
|
||||
with:
|
||||
distribution: 'jdkfile'
|
||||
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||
java-version: '11.0.0-ea'
|
||||
architecture: x64
|
||||
- name: Verify Java version
|
||||
run: bash __tests__/verify-java.sh "11.0.12" "${{ steps.setup-java.outputs.path }}"
|
||||
shell: bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue