From 9a8c300417ea445eef881a0596bff2698f097c7b Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Thu, 30 Jul 2026 15:57:15 -0400 Subject: [PATCH] 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 --- .github/workflows/e2e-versions.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 5d02fe3e..7a69b348 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -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"