Skip to content

allow to cache everything or allow to disable sdk install #454

Description

@farfromrefug

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions