-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce action for setting up running Android emulator
- Loading branch information
Showing
2 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Setup to Run Android Emulator | ||
description: Configures Linux to run the emulator and returns Briefcase args to run emulator. | ||
|
||
inputs: | ||
emulator-config: | ||
description: 'Configuration definition of emulator; defaults to {"avd":"beePhone"}.' | ||
required: false | ||
default: '{"avd":"beePhone"}' | ||
|
||
outputs: | ||
briefcase-run-args: | ||
value: ${{ steps.briefcase-run-args.outputs.run-args }} | ||
description: "The version or branch of Briefcase that was installed." | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: Enable KVM Access | ||
shell: bash | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ | ||
| sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Briefcase Run Arguemnts for Emulator | ||
id: briefcase-run-args | ||
env: | ||
RUN_ARGS: > | ||
--Xemulator=-no-window | ||
--Xemulator=-no-snapshot | ||
--Xemulator=-no-audio | ||
--Xemulator=-no-boot-anim | ||
--shutdown-on-exit | ||
shell: bash | ||
run: | | ||
echo "run-args=$(printf -- "--device %q %s" '${{ inputs.emulator-config }}' "${RUN_ARGS}")" | tee -a ${GITHUB_OUTPUT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters