@@ -4,54 +4,18 @@ set -euo pipefail
44# This is deliberately a real Omarchy installation, not an Arch container
55# dressed up with a few Omarchy files. The official ISO acceptance harness
66# drives the installer through QEMU screenshots, OCR and virtual keystrokes.
7- readonly ISO_VERSION=" 4.0.3"
8- readonly ISO_SHA256=" 03d60bc74306dca51f96e1a84b690871d8d606826b260edd0208962da8507d14"
9- readonly ISO_HARNESS_SHA=" a23f8d464dcb0616a61bfaa8026e23d0533da209"
107readonly WORK_DIR=" $PWD /.midscene-omarchy"
11- readonly ISO_PATH=" $WORK_DIR /omarchy-${ISO_VERSION} .iso"
8+ source " $PWD /tests/midscene/omarchy-vm.env"
9+ readonly ISO_PATH=" $WORK_DIR /omarchy-${OMARCHY_ISO_VERSION} .iso"
1210readonly HARNESS_DIR=" $WORK_DIR /omarchy-iso"
1311
14- if [[ ! -c /dev/kvm ]]; then
15- echo " ::error::This GitHub runner does not expose /dev/kvm; a real Omarchy VM cannot be started."
16- exit 1
17- fi
18-
19- sudo chmod 0666 /dev/kvm
20-
21- # The ISO is about 6 GB and the installed qcow2 image is sparse but sizeable.
22- # GitHub's image includes large SDKs that this isolated job does not need.
23- sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
24- sudo apt-get update
25- sudo apt-get install -y --no-install-recommends \
26- curl git imagemagick ovmf qemu-system-x86 qemu-utils socat \
27- tesseract-ocr tesseract-ocr-eng
28-
29- mkdir -p " $WORK_DIR "
12+ tests/midscene/prepare-omarchy-host.sh
3013df -h " $WORK_DIR "
3114
3215curl --fail --location --retry 5 --retry-all-errors \
33- " https://iso.omarchy.org/omarchy-${ISO_VERSION } .iso" \
16+ " https://iso.omarchy.org/omarchy-${OMARCHY_ISO_VERSION } .iso" \
3417 --output " $ISO_PATH "
35- printf ' %s %s\n' " $ISO_SHA256 " " $ISO_PATH " | sha256sum --check --strict
36-
37- git init --quiet " $HARNESS_DIR "
38- git -C " $HARNESS_DIR " remote add origin https://github.com/omacom/omarchy-iso.git
39- git -C " $HARNESS_DIR " fetch --quiet --depth 1 origin " $ISO_HARNESS_SHA "
40- git -C " $HARNESS_DIR " checkout --quiet --detach FETCH_HEAD
41-
42- # Omarchy 4.0.3's welcome tagline says "Agentic Linux" while this pinned
43- # harness revision still waits for the former "Opinionated" tagline. Keep the
44- # test on the official ISO and change only the OCR readiness marker.
45- grep -q ' wait_for_screen "Opinionated"' " $HARNESS_DIR /bin/omarchy-iso-test"
46- sed -i ' s/wait_for_screen "Opinionated"/wait_for_screen "Agentic"/g' \
47- " $HARNESS_DIR /bin/omarchy-iso-test"
48-
49- # The official harness names Arch paths and its package helper. Adapt only
50- # those host-side dependencies; the guest still boots and installs the exact
51- # verified official ISO.
52- sudo mkdir -p /usr/share/edk2/x64
53- sudo ln -sf /usr/share/OVMF/OVMF_CODE_4M.fd /usr/share/edk2/x64/OVMF_CODE.4m.fd
54- sudo ln -sf /usr/share/OVMF/OVMF_VARS_4M.fd /usr/share/edk2/x64/OVMF_VARS.4m.fd
18+ printf ' %s %s\n' " $OMARCHY_ISO_SHA256 " " $ISO_PATH " | sha256sum --check --strict
5519
5620readonly SHIM_DIR=" $( mktemp -d) "
5721trap ' rm -rf "$SHIM_DIR"' EXIT
@@ -66,5 +30,5 @@ PATH="$SHIM_DIR:$PATH" "$HARNESS_DIR/bin/omarchy-iso-test" \
6630 --timeout 3000 \
6731 --no-preview
6832
69- test -s " $HARNESS_DIR /test-runs/omarchy-${ISO_VERSION } /base.qcow2"
70- echo " PASS: a complete Omarchy ${ISO_VERSION } base VM was installed on the GitHub runner"
33+ test -s " $HARNESS_DIR /test-runs/omarchy-${OMARCHY_ISO_VERSION } /base.qcow2"
34+ echo " PASS: a complete Omarchy ${OMARCHY_ISO_VERSION } base VM was installed on the GitHub runner"
0 commit comments