-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace macos with ubuntu and cache VM
- Loading branch information
1 parent
379b60e
commit e2559d2
Showing
1 changed file
with
35 additions
and
3 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ on: | |
jobs: | ||
run: | ||
name: try-${{ inputs.try }} | ||
runs-on: macos-13 | ||
runs-on: ubuntu-latest | ||
env: | ||
ARTIFACTS_PATH: samples/IntegrationTest/test-artifacts/ | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
|
@@ -39,6 +39,13 @@ jobs: | |
name: testapp-Android-compiled-${{ inputs.unity-version }} | ||
path: samples/IntegrationTest/Build | ||
|
||
# Not required for MacOS. | ||
- name: Enable KVM group perms | ||
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 | ||
# outputs variables: api-level, label, target | ||
- name: Configure Android Settings | ||
id: config | ||
|
@@ -64,9 +71,34 @@ jobs: | |
"target=$target" >> $env:GITHUB_OUTPUT | ||
"api-level=$apiLevel" >> $env:GITHUB_OUTPUT | ||
"label=$($label ?? $apiLevel)" >> $env:GITHUB_OUTPUT | ||
- name: Gradle cache | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: AVD cache | ||
uses: actions/cache@v4 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ steps.config.outputs.api-level }} | ||
|
||
- name: create Android Emulator Image | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # [email protected] | ||
with: | ||
api-level: ${{ steps.config.outputs.api-level }} | ||
force-avd-creation: false | ||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: false | ||
ram-size: 2048M | ||
arch: x86_64 | ||
cores: 3 | ||
disk-size: 4096M | ||
script: echo "Generated AVD snapshot for caching." | ||
|
||
- name: Android API ${{ steps.config.outputs.label }} emulator setup + Smoke test | ||
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2.28.0 | ||
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v233.0 | ||
id: smoke-test | ||
timeout-minutes: 40 | ||
continue-on-error: true | ||
|
@@ -79,7 +111,7 @@ jobs: | |
cores: 3 | ||
emulator-boot-timeout: 1800 | ||
disk-size: 4096M # Some runs have out of storage error when installing the smoke test. | ||
emulator-options: -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -accel on | ||
emulator-options: -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: true | ||
script: pwsh ./scripts/smoke-test-android.ps1 -IsIntegrationTest -WarnIfFlaky | ||
|
||
|