-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add extra warning text if Step fails on an ARM (Apple Silicon/M1) machine #41
Add extra warning text if Step fails on an ARM (Apple Silicon/M1) machine #41
Conversation
@@ -81,6 +82,14 @@ func runningDeviceInfos(androidHome string) (map[string]string, error) { | |||
|
|||
func failf(msg string, args ...interface{}) { | |||
log.Errorf(msg, args...) | |||
|
|||
cpuIsARM, err := system.CPU.IsARM() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use runtime.GOARCH? https://pkg.go.dev/runtime#pkg-constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. That was my initial thought as well, but GOARCH
is actually recorded at compile time, and may not be exactly accurate at runtime.
From that documentation:
GOARCH, GOOS, and GOROOT are recorded at compile time and made available by constants or functions in this package, but they do not influence the execution of the run-time system.
It's an edge case that this would even matter, but I opted to be accurate. The new code to do this is using an official Go lib, which essentially is calling uname -m
from what I gather. https://github.com/bitrise-io/go-utils/blob/b7cacea4faebb77a89cc6ebdb50165188ff5e3aa/system/cpu.go#L14-L29
@@ -9,6 +9,8 @@ Create and boot an Android emulator used for device testing | |||
|
|||
Run instrumented and UI tests on a virtual Android device. Once some basic inputs are set, the Step checks the requirements, downloads the selected system image before creating and starting the emulator. | |||
|
|||
**Warning:** This Step is not yet supported on Apple Silicon (M1) machines. If you cannot find a solution to this error, try running this Workflow on an Intel-based machine type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to just panic or fail
if this is true in the step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wanted to still allow people to run the Step for development and testing, but just add an extra warning if it does fail. It is possible to run these Steps on Apple Silicon in certain circumstances, it's just not yet officially supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see this below - is it possible to do this deeper into the system? perhaps at the yml validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So like throw a warning before it runs? We'd probably have to generalize it then, and add a flag to the step.yml file or something to say is_not_compatible_with_apple_silicon: true
or something, and then update the check Step to check that. That seems like more work than it's worth, being these are the only 2 Steps that we don't support on Apple Silicon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Hello, Is it going to supported anytime soon? |
Hi @ErickMaeda, I don't work on this project any longer. Maybe @ofalvai knows? |
@ErickMaeda Android emulator requires nested virtualization, and sadly this feature is not yet available in the underlying framework on Apple Silicon. We are just as excited about running emulators on Apple Silicon and will support this as soon as Apple adds the required support for it! |
Got it! So far I can still use the emulators on linux stack's while it's not available yet, Thanks for the explanation! @ofalvai |
Note: A matching PR to the
wait-for-android-emulator
Step can be found here: bitrise-steplib/steps-wait-for-android-emulator#29Checklist
step.yml
andREADME.md
is updated with the changes (if needed)Version
Requires a PATCH version update
Context
Running this Step on Apple Silicon machines is not officially supported. This change adds some additional warning text to help make that clear to users if the step fails and they don't expect it.
Changes
step.yml
andREADME.md
.failf
method to display the additional warning text if the Step fails on an ARM-based machine.Screenshots
Failure on Intel machine:
Failure on Apple Silicon machine: