Merge pull request #19873 from botantony/github-runner-matrix
github_runner_matrix: emulate plaform when sending `compatible?` requests
This commit is contained in:
commit
b44a475728
@ -255,8 +255,18 @@ 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)
|
||||||
|
|
||||||
formula.public_send(:"#{platform}_compatible?") &&
|
simulate_arch = case arch
|
||||||
formula.public_send(:"#{arch}_compatible?")
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user