Doubao-powered voice input for Linux, Wayland and Omarchy
ci: probe headless Omarchy VM
quanru5dbaa2f94c03
diff --git a/.github/workflows/midscene-experimental.yml b/.github/workflows/midscene-experimental.ymlnew file mode 100644index 0000000..8bd7cb8--- /dev/null+++ b/.github/workflows/midscene-experimental.yml@@ -0,0 +1,39 @@+name: Midscene experimental++on:+ push:+ branches: [ci/midscene-e2e]+ paths:+ - ".github/workflows/midscene-experimental.yml"+ - "tests/midscene/**"+ workflow_dispatch:++permissions:+ contents: read++concurrency:+ group: midscene-experimental-${{ github.ref }}+ cancel-in-progress: true++jobs:+ omarchy-vm:+ name: Install real Omarchy in a headless VM+ runs-on: ubuntu-latest+ timeout-minutes: 70+ steps:+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+ with:+ persist-credentials: false++ - name: Install Omarchy VM+ run: tests/midscene/install-omarchy-vm.sh++ - name: Upload installer evidence+ if: always()+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1+ with:+ name: omarchy-vm-installer-evidence+ path: .midscene-omarchy/omarchy-iso/test-runs/**/runs/**+ if-no-files-found: warn+ retention-days: 3+diff --git a/.gitignore b/.gitignoreindex 84f4a90..6e7db1a 100644--- a/.gitignore+++ b/.gitignore@@ -90,6 +90,7 @@ settings.json/recordings//screenshots//backups/+/.midscene-omarchy/*.bak*.orig*.rejdiff --git a/tests/midscene/README.md b/tests/midscene/README.mdnew file mode 100644index 0000000..983ad27--- /dev/null+++ b/tests/midscene/README.md@@ -0,0 +1,20 @@+# Midscene experimental branch++Everything under this directory is developed on `ci/midscene-e2e`; it is not+part of the release branch.++The first CI stage proves that a GitHub-hosted runner can install the exact+official Omarchy ISO in a headless QEMU/KVM VM. It reuses Omarchy's own ISO+acceptance harness and saves installer screenshots and logs as short-lived+artifacts. It does not upload the VM disk or its temporary SSH key.++After that probe is stable, the next stages are:++1. Boot a throwaway overlay from the installed base image.+2. install and enable this checkout as `md.lifeos.doubao-say` in the guest.+3. Run deterministic GTK UI fixtures with `@midscene/computer` on ordinary+ Ubuntu for every trusted change.+4. Run a smaller Omarchy/Hyprland Midscene suite manually in the guest.++The AI stage needs a multimodal model credential. No local credential is+copied into GitHub automatically, and tests must contain only synthetic data.diff --git a/tests/midscene/install-omarchy-vm.sh b/tests/midscene/install-omarchy-vm.shnew file mode 100755index 0000000..d5af7ed--- /dev/null+++ b/tests/midscene/install-omarchy-vm.sh@@ -0,0 +1,64 @@+#!/bin/bash+set -euo pipefail++# This is deliberately a real Omarchy installation, not an Arch container+# dressed up with a few Omarchy files. The official ISO acceptance harness+# drives the installer through QEMU screenshots, OCR and virtual keystrokes.+readonly ISO_VERSION="4.0.3"+readonly ISO_SHA256="03d60bc74306dca51f96e1a84b690871d8d606826b260edd0208962da8507d14"+readonly ISO_HARNESS_SHA="a23f8d464dcb0616a61bfaa8026e23d0533da209"+readonly WORK_DIR="$PWD/.midscene-omarchy"+readonly ISO_PATH="$WORK_DIR/omarchy-${ISO_VERSION}.iso"+readonly HARNESS_DIR="$WORK_DIR/omarchy-iso"++if [[ ! -c /dev/kvm ]]; then+ echo "::error::This GitHub runner does not expose /dev/kvm; a real Omarchy VM cannot be started."+ exit 1+fi++sudo chmod 0666 /dev/kvm++# The ISO is about 6 GB and the installed qcow2 image is sparse but sizeable.+# GitHub's image includes large SDKs that this isolated job does not need.+sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc+sudo apt-get update+sudo apt-get install -y --no-install-recommends \+ curl git imagemagick ovmf qemu-system-x86 qemu-utils socat \+ tesseract-ocr tesseract-ocr-eng++mkdir -p "$WORK_DIR"+df -h "$WORK_DIR"++curl --fail --location --retry 5 --retry-all-errors \+ "https://iso.omarchy.org/omarchy-${ISO_VERSION}.iso" \+ --output "$ISO_PATH"+printf '%s %s\n' "$ISO_SHA256" "$ISO_PATH" | sha256sum --check --strict++git init --quiet "$HARNESS_DIR"+git -C "$HARNESS_DIR" remote add origin https://github.com/omacom/omarchy-iso.git+git -C "$HARNESS_DIR" fetch --quiet --depth 1 origin "$ISO_HARNESS_SHA"+git -C "$HARNESS_DIR" checkout --quiet --detach FETCH_HEAD++# The official harness names Arch paths and its package helper. Adapt only+# those host-side dependencies; the guest still boots and installs the exact+# verified official ISO.+sudo mkdir -p /usr/share/edk2/x64+sudo ln -sf /usr/share/OVMF/OVMF_CODE_4M.fd /usr/share/edk2/x64/OVMF_CODE.4m.fd+sudo ln -sf /usr/share/OVMF/OVMF_VARS_4M.fd /usr/share/edk2/x64/OVMF_VARS.4m.fd++readonly SHIM_DIR="$(mktemp -d)"+trap 'rm -rf "$SHIM_DIR"' EXIT+printf '#!/bin/sh\nexit 0\n' >"$SHIM_DIR/omarchy-pkg-add"+printf '#!/bin/sh\nexec convert "$@"\n' >"$SHIM_DIR/magick"+chmod 0755 "$SHIM_DIR/omarchy-pkg-add" "$SHIM_DIR/magick"++PATH="$SHIM_DIR:$PATH" "$HARNESS_DIR/bin/omarchy-iso-test" \+ "$ISO_PATH" \+ --install-only \+ --memory 4096 \+ --timeout 3000 \+ --no-preview++test -s "$HARNESS_DIR/test-runs/omarchy-${ISO_VERSION}/base.qcow2"+echo "PASS: a complete Omarchy ${ISO_VERSION} base VM was installed on the GitHub runner"+