From d8144ce5e370fd2f0aadf3fdb804e7f396069752 Mon Sep 17 00:00:00 2001 From: botantony Date: Thu, 1 May 2025 23:25:23 +0200 Subject: [PATCH] github_runner_matrix: emulate plaform when sending `compatible?` requests Signed-off-by: botantony --- Library/Homebrew/github_runner_matrix.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/github_runner_matrix.rb b/Library/Homebrew/github_runner_matrix.rb index c3e13c7967..2e424c479d 100644 --- a/Library/Homebrew/github_runner_matrix.rb +++ b/Library/Homebrew/github_runner_matrix.rb @@ -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