android-emulator-runner icon indicating copy to clipboard operation
android-emulator-runner copied to clipboard

allow to cache everything or allow to disable sdk install

Open farfromrefug opened this issue 1 month ago • 0 comments

Every time i run my workflow i see this:

/usr/bin/sh -c \yes | sdkmanager --licenses > /dev/null
  Installing latest build tools, platform tools, and platform.
  /usr/bin/sh -c \sdkmanager --install 'build-tools;35.0.0' platform-tools 'platforms;android-28'> /dev/null
  Installing latest emulator.
  /usr/bin/sh -c \sdkmanager --install emulator --channel=0 > /dev/null
  Installing system images.
  /usr/bin/sh -c \sdkmanager --install 'system-images;android-28;android-tv;x86' --channel=0 > /dev/null

and it takes around 10min. Even though i setup cache using:

- name: AVD cache
        uses: actions/cache@v4
        id: avd-cache
        with:
          path: |
            ~/.android/avd/*
            ~/.android/adb*
          key: avd-cache

      
      - name: Enable KVM
        if: runner.os == 'Linux'
        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: create AVD and generate snapshot for caching
        if: steps.avd-cache.outputs.cache-hit != 'true'
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 28
          force-avd-creation: false
          emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
          disable-animations: false
          cores: 2
          ndk: 27.3.13750724
          target: android-tv
          ram-size: 4096M
          profile: tv_1080p
          script: echo "Generated AVD snapshot for caching."

the workflow tells me it hit the cache for avd-cache but still the time i try to run the actual test those steps takes more than 10min

farfromrefug avatar Nov 17 '25 21:11 farfromrefug