Skip to content

Commit c2a6fbe

Browse files
committed
Change avd config
1 parent 9e45478 commit c2a6fbe

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/NativePipeline.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,25 @@ jobs:
381381
steps:
382382
- name: "Check out code"
383383
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
384+
- name: "Install Android SDK"
385+
run: |
386+
mkdir -p $HOME/android-sdk
387+
cd $HOME/android-sdk
388+
curl -O https://dl.google.com/android/repository/commandlinetools-mac-6609375_latest.zip
389+
unzip commandlinetools-mac-6609375_latest.zip
390+
# Check the contents of the extracted directory
391+
ls -R $HOME/android-sdk
392+
# Install command line tools
393+
yes | $HOME/android-sdk/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk --install "cmdline-tools;latest"
394+
echo "export ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV
395+
echo "export PATH=\$PATH:\$ANDROID_HOME/tools/bin" >> $GITHUB_ENV
396+
echo "export PATH=\$PATH:\$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_ENV
397+
- name: "Accept SDK licenses"
398+
run: |
399+
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
400+
- name: "Install required SDK components"
401+
run: |
402+
yes | $ANDROID_HOME/tools/bin/sdkmanager --install 'build-tools;34.0.0' 'platform-tools' 'system-images;android-34;default;arm64-v8a'
384403
- name: "Setup AVD cache"
385404
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2
386405
id: avd-cache
@@ -389,20 +408,20 @@ jobs:
389408
/Users/runner/.android/avd/*
390409
/Users/runner/.android/adb*
391410
/Users/runner/Library/Android/sdk/system-images/**/*
392-
key: pixel_30_x86_64_default_3core_and_system_images
411+
key: pixel_34_arm64_default_3core_and_system_images
393412
- name: "Create AVD and generate snapshot for caching"
394413
if: steps.avd-cache.outputs.cache-hit != 'true'
395414
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
396415
with:
397-
api-level: 30
416+
api-level: 34
398417
target: default
399-
arch: x86_64
418+
arch: arm64-v8a
400419
profile: pixel
401420
cores: 3
402421
ram-size: 4096M
403422
heap-size: 512M
404-
avd-name: NATIVE_pixel_30
405-
force-avd-creation: false
423+
avd-name: NATIVE_pixel_34
424+
force-avd-creation: true
406425
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
407426
disable-animations: true
408427
script: echo "AVD created"

0 commit comments

Comments
 (0)