Files
software-mansion__argent/.github/workflows/vega-vvd-e2e.yml
Piotr Krawiec 22ff30acb4 ci(vega-vvd-e2e): build host image on runner, drop prebuilt GHCR image (#445)
## Summary


[`finloop/vega-virtual-device-action`](https://github.com/finloop/vega-virtual-device-action)
shipped a new version that **builds the `vega-virtual-device-host` image
on the consumer runner** from its bundled Dockerfile (cached via the
GitHub Actions cache).

## Changes (`.github/workflows/vega-vvd-e2e.yml`)

- **Re-pin the action** `fe151d9 → a0f1776` ([latest
`main`](https://github.com/finloop/vega-virtual-device-action/commit/a0f17767abafb27ec9b58974d94643fc46a4a35d)).
That commit's bundled Dockerfile carries the latest Vega SDK
(`.sdk-version` = `0.23.8358`), so the image the action builds uses it.
- **Drop the prebuilt SDK image.** Removed the `image:`/`pull:` inputs
and the pinned `HOST_IMAGE` GHCR digest
(`ghcr.io/finloop/vega-virtual-device-host@sha256:2110746…`). With no
`image:`, the action builds the host image locally with the pinned SDK.
Also removed the now-unused `host-image` `workflow_dispatch` input.
2026-07-02 12:33:31 +02:00

132 lines
5.4 KiB
YAML

name: Vega VVD E2E (remote + screenshot)
# Regression guard for argent's Vega (Fire TV) `remote` + `screenshot` tools on a
# free GitHub-hosted runner. Builds THIS branch's tool-server, boots the Vega
# Virtual Device (VVD) via finloop/vega-virtual-device-action (a QEMU emulator in
# a Docker container, KVM-accelerated, software-GL — no GPU, no self-hosted
# runner), installs the kepler video sample app, and drives the two tools over
# the tool-server HTTP API (scripts/ci/vega-vvd-test.sh).
#
# Both tools are pure adb now: screenshot → `adb emu screenrecord`, remote →
# `adb shell inputd-cli button_press` (the channel proven to work on the CI VVD;
# the old vega-fast-cli host binary was a no-op there). So there is no
# per-platform binary, no glibc/arch handling, nothing to bundle. The Vega
# analogue of wayland-e2e.yml.
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- "packages/tool-server/src/tools/tv-remote/**"
- "packages/tool-server/src/tools/keyboard/index.ts"
- "packages/tool-server/src/tools/screenshot/index.ts"
- "packages/tool-server/src/tools/describe/platforms/vega/**"
- "packages/tool-server/src/tools/describe/platforms/vega.ts"
- "packages/tool-server/src/tools/devices/boot-device.ts"
- "packages/tool-server/src/tools/devices/list-devices.ts"
- "packages/tool-server/src/utils/vega-*.ts"
- "packages/tool-server/src/utils/device-info.ts"
- "scripts/ci/vega-vvd-test.sh"
- ".github/workflows/vega-vvd-e2e.yml"
concurrency:
group: vega-vvd-e2e-${{ github.ref }}
cancel-in-progress: true
# Third-party actions and the fixture are pinned to immutable refs (this job runs
# on untrusted `pull_request`). Re-pin deliberately when bumping.
env:
KEPLER_FIXTURE_URL: "https://github.com/finloop/vega-virtual-device-action/releases/download/fixtures-keplervideoapp-0.22.1/keplervideoapp_aarch64.vpkg"
# Verified against the downloaded fixture below (the release tag is mutable).
KEPLER_FIXTURE_SHA256: "4ec7e0db348fe53bf3798410b4de1cf4aed5fc1f6935dff0b890d0611559201e"
jobs:
vega-vvd-e2e:
name: Boot VVD, drive remote + screenshot
# Pin to 24.04 to match the host container (ubuntu:24.04), so the
# runner-built node_modules native prebuilts (tree-sitter, esbuild) run
# unchanged inside it — same glibc, no cross-version skew.
runs-on: ubuntu-24.04
timeout-minutes: 60
# The action builds the host image on the runner (no registry pull).
permissions:
contents: read
steps:
# The host image is large (Vega SDK + emulator); reclaim runner disk first.
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
- name: Checkout
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
# Build this branch's tool-server. The action runs it (node dist/index.js)
# inside the container against this bind-mounted node_modules + dist.
- name: Build tool-server
run: |
npm ci
npx tsc --build
- name: Enable KVM
# The VVD's QEMU needs /dev/kvm; ubuntu runners expose it but the runner
# user isn't in the kvm group until this rule lands.
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: Download kepler video app fixture
# Prebuilt aarch64 Release vpkg (AmazonAppDev/vega-video-sample@v0.22.1),
# hosted on the action repo's fixtures release. Lands in the checkout so
# the action bind-mounts it into the container at /workspace/fixtures.
run: |
mkdir -p fixtures
curl -fsSL -o fixtures/keplervideoapp_aarch64.vpkg "$KEPLER_FIXTURE_URL"
# The release tag is mutable, so verify the asset's content against the
# pinned checksum — fail loudly if it changed under us.
echo "${KEPLER_FIXTURE_SHA256} fixtures/keplervideoapp_aarch64.vpkg" | sha256sum -c -
ls -la fixtures
- name: Boot VVD; drive remote + screenshot
id: vvd
# No `image:` → the action builds the host image on the runner, with the
# SDK version pinned via the action's `.sdk-version`.
uses: finloop/vega-virtual-device-action/vega-virtual-device-action@a0f17767abafb27ec9b58974d94643fc46a4a35d # main
with:
boot-timeout: 420
screenshot-path: artifacts/vvd-ready.png
container-options: -e KEPLER_VPKG=fixtures/keplervideoapp_aarch64.vpkg
script: |
set -ex
bash scripts/ci/vega-vvd-test.sh
- name: Show action outputs
if: always()
run: |
echo "boot-status=${{ steps.vvd.outputs.boot-status }}"
echo "screenshot=${{ steps.vvd.outputs.screenshot }}"
- name: Upload screenshots + logs
if: always()
uses: actions/upload-artifact@v7
with:
name: vega-vvd-e2e-artifacts
path: artifacts/
if-no-files-found: warn
retention-days: 7