mirror of
https://github.com/actions/setup-java.git
synced 2026-07-31 22:51:39 +08:00
Fix macOS e2e workflow assertions (#1184)
Normalize ARM64 runner architecture when checking exported JAVA_HOME variables and skip the unsupported adopt-openj9 macOS arm64 version-file matrix entry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e78541cb-82b7-4fc2-8ffc-b1e5799efbce
This commit is contained in:
parent
5827477733
commit
9a8c300417
9
.github/workflows/e2e-versions.yml
vendored
9
.github/workflows/e2e-versions.yml
vendored
@ -290,10 +290,11 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Verify Java env variables
|
||||
run: |
|
||||
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||
$versionsArr = "11","17"
|
||||
foreach ($version in $versionsArr)
|
||||
{
|
||||
$envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}"
|
||||
$envName = "JAVA_HOME_${version}_${javaArch}"
|
||||
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||
if (-not (Test-Path "$JavaVersionPath")) {
|
||||
Write-Host "$envName is not found"
|
||||
@ -582,6 +583,9 @@ jobs:
|
||||
os: *default_os
|
||||
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
||||
java-version-file: ['.java-version', '.tool-versions']
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
distribution: adopt-openj9
|
||||
steps:
|
||||
- *checkout_step
|
||||
- name: Create .java-version file
|
||||
@ -683,7 +687,8 @@ jobs:
|
||||
shell: bash
|
||||
- name: Verify JAVA_HOME_21 env var is set
|
||||
run: |
|
||||
$envName = "JAVA_HOME_21_${env:RUNNER_ARCH}"
|
||||
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||
$envName = "JAVA_HOME_21_${javaArch}"
|
||||
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||
if (-not $JavaVersionPath) {
|
||||
Write-Host "$envName is not set"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user