Skip to content

Commit

Permalink
.github/workflows: cache droidctl
Browse files Browse the repository at this point in the history
  • Loading branch information
t184256 committed Jun 16, 2024
1 parent 82dad91 commit 495fc82
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,22 @@ jobs:
name: nix-on-droid
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"

- name: Build droidctl
run: nix build 'github:t184256/droidctl' --out-link droidctl
- name: Configure droidctl evaluation cache
uses: actions/cache@v4
id: droidctl-cache
with:
path: /tmp/droidctl
key: avd-${{ matrix.api-level }}-${{ matrix.way}} # concurrent save

- name: Build droidctl (anew and push to cachix)
if: steps.droidctl-cache.outputs.cache-hit != 'true'
run: |
nix build 'github:t184256/droidctl' --out-link /tmp/droidctl
realpath /tmp/droidctl | cachix push nix-on-droid
- name: Fetch droidctl (from cachix using cached eval)
if: steps.droidctl-cache.outputs.cache-hit == 'true'
run: nix build /tmp/droidctl

- name: Build zipball, channel tarball and flake to inject
run: |
Expand Down Expand Up @@ -92,7 +106,7 @@ jobs:
cd tests/emulator &&
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService &&
echo 'ready' &&
nix run 'github:t184256/droidctl' -- run ${{ matrix.way }}.py
/tmp/droidctl/bin/droidctl run ${{ matrix.way }}.py
# TODO: push to cachix from within the emulator
- name: Upload screenshots
Expand Down

0 comments on commit 495fc82

Please sign in to comment.