Skip to content

github_runner_matrix: emulate plaform when sending compatible? requests #19873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025

Conversation

botantony
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Closes #19838

There is a problem when CI determines which runners it needs when testing formulae. If a formula has on_linux do block with depends_on arch: requirement, it'll be added to formula.requirements list, even if there's no such restriction on macOS. The opposite problem happens with on_macos block. Because CI runs on Linux, it is not able to check depends_on arch: there. To solve this problem, we need to simulate the specific platform when sending #{arch}_compatible? request.

Unfortunately, I don't know how to check if it works (I didn't find how to test on_* block in github_runner_matrix_spec.rb), but I hope it will work as expected

Sorry, something went wrong.

…ests

Signed-off-by: botantony <antonsm21@gmail.com>
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 2, 2025
Merged via the queue into Homebrew:master with commit b44a475 May 2, 2025
35 checks passed
@botantony botantony deleted the github-runner-matrix branch May 2, 2025 12:53
@botantony
Copy link
Contributor Author

Unfortunately it didn't fix the issue, I'll investigate further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brew determine-test-runners may exclude runners for supported architectures
2 participants