-
-
Notifications
You must be signed in to change notification settings - Fork 454
Cache Android Emulator generation #4605
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
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
42c8101
Cache Android Emulator generation
markushi 7c1e504
Fix whitespace
markushi 2dca2fc
Update agp-matrix.yml
markushi 7cbebb7
Update agp-matrix.yml
markushi d822e58
Improve Cache key
markushi be0f7c6
Merge branch 'main' into markushi/chore/speedup-agp-test-matrix
markushi 2f9e2ce
Merge branch 'main' into markushi/chore/speedup-agp-test-matrix
markushi 177088e
Add AVD caching to integration tests too
markushi 4155679
Update integration-tests-ui-critical.yml
markushi 9293838
Fix missing target spec
markushi 32e0a23
Update agp-matrix.yml
markushi 7c8a416
Merge branch 'main' into markushi/chore/speedup-agp-test-matrix
markushi 378f301
Merge branch 'main' into markushi/chore/speedup-agp-test-matrix
markushi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -79,17 +79,36 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup KVM | ||
shell: bash | ||
- name: Enable KVM | ||
run: | | ||
# check if virtualization is supported... | ||
sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok | ||
# allow access to KVM to run the emulator | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \ | ||
| sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
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: AVD cache | ||
uses: actions/cache@v4 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-api-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }} | ||
|
||
- name: Create AVD and generate snapshot for caching | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
target: ${{ matrix.target }} | ||
channel: ${{ matrix.channel }} | ||
arch: ${{ matrix.arch }} | ||
force-avd-creation: false | ||
disable-animations: true | ||
disable-spellchecker: true | ||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disk-size: 4096M | ||
script: echo "Generated AVD snapshot for caching." | ||
|
||
- name: Download APK artifact | ||
uses: actions/download-artifact@v5 | ||
with: | ||
|
@@ -104,21 +123,13 @@ jobs: | |
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # [email protected] | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
force-avd-creation: false | ||
disable-animations: true | ||
disable-spellchecker: true | ||
target: ${{ matrix.target }} | ||
channel: ${{ matrix.channel }} | ||
arch: ${{ matrix.arch }} | ||
emulator-options: > | ||
-no-window | ||
-no-snapshot-save | ||
-gpu swiftshader_indirect | ||
-noaudio | ||
-no-boot-anim | ||
-camera-back none | ||
-camera-front none | ||
-timezone US/Pacific | ||
force-avd-creation: false | ||
disable-animations: true | ||
disable-spellchecker: true | ||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save | ||
markushi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
script: | | ||
adb install -r -d "${{env.APK_NAME}}" | ||
maestro test "${{env.BASE_PATH}}/maestro" --debug-output "${{env.BASE_PATH}}/maestro-logs" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.