github_runner_matrix: emulate plaform when sending compatible? requests

Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
botantony 2025-05-01 23:25:23 +02:00
parent bbac5be4d3
commit d8144ce5e3
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6

View File

@ -255,11 +255,21 @@ class GitHubRunnerMatrix
@testing_formulae.select do |formula| @testing_formulae.select do |formula|
next false if macos_version && !formula.compatible_with?(macos_version) next false if macos_version && !formula.compatible_with?(macos_version)
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(:"#{platform}_compatible?") &&
formula.public_send(:"#{arch}_compatible?") formula.public_send(:"#{arch}_compatible?")
end end
end end
end end
end
sig { params(runner: GitHubRunner).returns(T::Array[TestRunnerFormula]) } sig { params(runner: GitHubRunner).returns(T::Array[TestRunnerFormula]) }
def formulae_with_untested_dependents(runner) def formulae_with_untested_dependents(runner)