Skip to content
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

hardware/cpu: add virtualized? check #16500

Merged
merged 1 commit into from Jan 19, 2024

Conversation

p-linnane
Copy link
Member

  • 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?

This PR adds a check for virtualization, so we no longer have to use the ENV["HOMEBREW_GITHUB_ACTIONS"] hack to work around CI failures.

@p-linnane
Copy link
Member Author

Thank you to @Bo98 for the idea & guidance here 🙇‍♂️

Library/Homebrew/hardware.rb Outdated Show resolved Hide resolved
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

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

Thanks!

@p-linnane p-linnane merged commit 0ef5c28 into Homebrew:master Jan 19, 2024
24 checks passed
@p-linnane p-linnane deleted the add-virtualized-check branch January 19, 2024 01:29
@MikeMcQuaid
Copy link
Member

Good idea @p-linnane!

@MikeMcQuaid
Copy link
Member

so we no longer have to use the ENV["HOMEBREW_GITHUB_ACTIONS"] hack to work around CI failures.

@p-linnane although: please note on this that this should never be used in test do blocks as those should be consistent between CI and run on contributors' machines. No sense in having brew tests that aren't run in CI. For build differences: fair enough.

@p-linnane
Copy link
Member Author

This is primarily to deal with things like OpenCL, which doesn't work on ephemeral ARM, or other GPU related things. Here's an example of a test update I made yesterday, and @Bo98 weighed in on adding this check: Homebrew/homebrew-core#160229

@Bo98
Copy link
Member

Bo98 commented Jan 19, 2024

Yeah OpenCL not working is not a CI limitation but rather a virtualisation limitation. So this is a more correct check than HOMEBREW_GITHUB_ACTIONS in those situations as it will be correct should anyone run the test in a local VM.

@MikeMcQuaid
Copy link
Member

@p-linnane @Bo98 Gotcha, thanks, seems reasonable. I guess what I'm suggesting is that we avoid brew test lines that are never exercised in CI but that's not the case here 👍🏻

@github-actions github-actions bot added the outdated PR was locked due to age label Feb 19, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants