Merge pull request #19873 from botantony/github-runner-matrix

github_runner_matrix: emulate plaform when sending `compatible?` requests
This commit is contained in:
Mike McQuaid 2025-05-02 07:09:40 +00:00 committed by GitHub
commit b44a475728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -255,8 +255,18 @@ class GitHubRunnerMatrix
@testing_formulae.select do |formula|
next false if macos_version && !formula.compatible_with?(macos_version)
formula.public_send(:"#{platform}_compatible?") &&
formula.public_send(:"#{arch}_compatible?")
simulate_arch = case arch
when :x86_64
:intel
when :arm64
:arm
else
:dunno
end
Homebrew::SimulateSystem.with(os: platform, arch: simulate_arch) do
formula.public_send(:"#{platform}_compatible?") &&
formula.public_send(:"#{arch}_compatible?")
end
end
end
end