react-native-circleci-orb
react-native-circleci-orb copied to clipboard
Running into hardware acceleration issues with the android_test job
Orb version
6.8.1
What happened
When running the android_test
job we run into the following issue during the Start Android Emulator (background)
step:
ERROR | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator requires an Intel processor with VT-x and NX support. (VT-x is not supported)
More info on configuring VM acceleration on macOS:
https://developer.android.com/studio/run/emulator-acceleration#vm-mac
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
This is our current config for the android_test
job
- rn/android_test:
detox_configuration: android.emu.release
node_version: '16.9.1'
# Disabled Yarn cache because of issues: https://github.com/react-native-community/react-native-circleci-orb/issues/66
yarn_cache: false
xcode_version: '13.2.1'
# requires:
# - build_android_release
Expected behavior
To be able to run the emulator in the rn/android_test
I'm having the same issue. Thought I could try running $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
but extras
doesn't seem to exist on the VM.
I finally got Detox on Android emulator working on CircleCI using their Android orb:
version: 2.1
orbs:
rn: react-native-community/[email protected]
android: circleci/[email protected] # Added orb
jobs:
android_build_detox:
executor:
name: rn/linux_android
resource_class: 'medium'
steps:
- checkout
- rn/yarn_install
- run: yarn detox build -c android.emu.release
- persist_to_workspace:
root: ~/project
paths:
- android/app/build
# Added job
android_test:
executor:
name: android/android-machine
resource-class: medium
tag: 2021.10.1
steps:
- attach_workspace:
at: .
- android/create-avd:
avd-name: Pixel_API_29_AOSP
install: true
system-image: system-images;android-29;default;x86
- android/start-emulator:
avd-name: Pixel_API_29_AOSP
no-window: true
post-emulator-launch-assemble-command: ""
- run: npm install --global yarn
- run: yarn detox test -c android.emu.release
@jesperjohansson Thanks for this! We also switched to the android-machine
yesterday and we almost got it working.
However, I do think that this should work in the orb without the use of a different orb/executor.