Skip to content

Commit c8bbbc0

Browse files
committed
ci: harden windows android emulator setup
1 parent 65a6a7e commit c8bbbc0

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,11 @@ jobs:
375375
$adb = Join-Path $sdk "platform-tools\adb.exe"
376376
$emulator = Join-Path $sdk "emulator\emulator.exe"
377377
378-
& $sdkmanager --install "platform-tools" "emulator" "platforms;android-35" "system-images;android-35;google_apis;x86_64"
379-
1..50 | ForEach-Object { "y" } | & $sdkmanager --licenses
378+
Write-Host "Accepting Android SDK licenses"
379+
1..100 | ForEach-Object { "y" } | & $sdkmanager --licenses
380+
Write-Host "Installing Android SDK emulator packages"
381+
1..100 | ForEach-Object { "y" } | & $sdkmanager --install "platform-tools" "emulator" "platforms;android-35" "system-images;android-35;google_apis;x86_64"
382+
Write-Host "Creating Android AVD"
380383
"no" | & $avdmanager create avd --force --name SimDeck_Pixel_CI --package "system-images;android-35;google_apis;x86_64" --device "pixel_6"
381384
382385
$args = @(
@@ -388,10 +391,11 @@ jobs:
388391
"-gpu", "swiftshader_indirect",
389392
"-grpc", "8554"
390393
)
394+
Write-Host "Starting Android emulator"
391395
$process = Start-Process -FilePath $emulator -ArgumentList $args -PassThru
392396
$process.Id | Out-File -FilePath emulator.pid -Encoding ascii
393397
& $adb wait-for-device
394-
$deadline = (Get-Date).AddMinutes(8)
398+
$deadline = (Get-Date).AddMinutes(12)
395399
do {
396400
if ($process.HasExited) {
397401
throw "Android emulator exited early with code $($process.ExitCode)."

0 commit comments

Comments
 (0)