Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.
Swift apple-silicond3dmetaldxmtdxvkfexgame-porting-toolkitgamingmac-gamingmacosmetalmoltenvksteamswiftuivkd3d-protonwhisky-alternativewindows-gameswinewine-wrapper
ci: nightly fresh-install E2E + canary, render-smoke release gate
Gauthier Piarrette7e70806f9700
diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.ymlnew file mode 100644index 0000000..fe18e9b--- /dev/null+++ b/.github/workflows/canary.yml@@ -0,0 +1,77 @@+# Canary — do the bytes users depend on still exist and match their pins?+# Runs Scripts/e2e-canary.sh: re-hashes every engine-manifest component URL in+# BOTH the repo manifest and the manifest inside the latest release bundle,+# re-validates the published DMG/zip notarization, and checks appcast consistency.+# Independent from nightly-e2e on purpose: this job keeps producing signal even+# while the E2E is red, and an aka.ms hiccup there can never mask drift here.+#+# NOTE: scheduled workflows are auto-disabled after 60 days of repo inactivity+# (GitHub emails first; re-enable is one click). No keepalive hacks by design.+name: canary+on:+ schedule:+ - cron: '43 7 * * *'+ workflow_dispatch: {}++permissions:+ contents: read++concurrency:+ group: canary+ cancel-in-progress: false++jobs:+ canary:+ runs-on: macos-15 # needs xcrun stapler + spctl, hence macOS+ timeout-minutes: 30+ outputs:+ kind: ${{ steps.run.outputs.kind }}+ steps:+ - uses: actions/checkout@v4+ - name: run canary+ id: run+ run: Scripts/e2e-canary.sh++ # Separate job for the token: the canary itself only downloads and hashes, but+ # keeping issues:write out of any job that touches third-party bytes is cheap.+ alert:+ needs: [canary]+ if: always()+ runs-on: ubuntu-latest+ permissions:+ issues: write+ steps:+ - name: create/update or auto-close the dedup issue+ env:+ GH_TOKEN: ${{ github.token }}+ RESULT: ${{ needs.canary.result }}+ KIND: ${{ needs.canary.outputs.kind }}+ RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}+ run: |+ gh label create canary-drift -R "$GITHUB_REPOSITORY" --color B60205 \+ --description "pinned upstream bytes or published assets drifted" --force+ gh label create canary-availability -R "$GITHUB_REPOSITORY" --color D93F0B \+ --description "an upstream host was unreachable" --force+ if [ "$RESULT" = "failure" ]; then+ case "$KIND" in+ drift) LABEL=canary-drift; TITLE="canary: pinned bytes or published assets drifted" ;;+ *) LABEL=canary-availability; TITLE="canary: upstream availability failure" ;;+ esac+ NUM=$(gh issue list -R "$GITHUB_REPOSITORY" --label "$LABEL" --state open \+ --json number --jq '.[0].number // empty')+ if [ -n "$NUM" ]; then+ gh issue comment "$NUM" -R "$GITHUB_REPOSITORY" --body "Still failing ($KIND): $RUN_URL"+ else+ gh issue create -R "$GITHUB_REPOSITORY" --title "$TITLE" --label "$LABEL" \+ --body "The canary failed ($KIND): $RUN_URL++Drift = a pinned URL now serves different bytes, a published asset fails notarization checks, or the appcast disagrees with the latest release — real users are (or will be) affected. Availability = an upstream host was unreachable; usually transient, watch for repeats."+ fi+ elif [ "$RESULT" = "success" ]; then+ for LABEL in canary-drift canary-availability; do+ NUM=$(gh issue list -R "$GITHUB_REPOSITORY" --label "$LABEL" --state open \+ --json number --jq '.[0].number // empty')+ [ -n "$NUM" ] && gh issue close "$NUM" -R "$GITHUB_REPOSITORY" --comment "Green again: $RUN_URL"+ done+ true+ fidiff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.ymlnew file mode 100644index 0000000..6e827fd--- /dev/null+++ b/.github/workflows/nightly-e2e.yml@@ -0,0 +1,124 @@+# Nightly fresh-install E2E — replays the bug classes that actually shipped:+# winetricks pin drift (#27/#28), broken engine symlinks (0.7.9), the winetricks/+# bash/SIP chain (#16). Runs Scripts/e2e-install.sh in an isolated HIGHBALL_HOME,+# installing from the BUILT BUNDLE's manifest like a real user.+#+# NOTE: GitHub disables scheduled workflows after 60 days without repo activity+# (one warning email; re-enabling is one click in the Actions tab). That is why+# nightlies can silently stop — no keepalive hacks by design, the email is the+# signal. workflow_dispatch always stays available.+name: nightly-e2e+on:+ schedule:+ - cron: '17 8 * * *' # nightly (UTC, off-peak minute per GH docs)+ - cron: '23 9 * * 6' # Saturday: adds the dotnet48 chain+ workflow_dispatch:+ inputs:+ dotnet48:+ description: also run the dotnet48 recipe (adds up to ~90 min)+ type: boolean+ default: false++permissions:+ contents: read++concurrency:+ group: nightly-e2e+ cancel-in-progress: false # a canary you cancel is a canary that lies++jobs:+ e2e:+ runs-on: macos-15 # pinned: macos-latest re-points silently (it became 26 in mid-2026)+ # Cold install ≈25-45 min on these runners; the Saturday dotnet48 chain can+ # pessimistically add 1-2 h of virtualized ngen. Hangs are caught same-night+ # by the alert job either way.+ timeout-minutes: 180+ steps:+ - uses: actions/checkout@v4+ - name: rosetta (idempotent; image rotations have shipped without it)+ run: sudo softwareupdate --install-rosetta --agree-to-license || true+ - name: disk headroom+ run: df -h /+ - name: cache engine downloads (sha256-reverified on every reuse; the script keeps winetricks out)+ uses: actions/cache@v4+ with:+ path: ~/hb-e2e/downloads+ key: engine-dl-${{ hashFiles('spike/engine-manifest.json') }}+ restore-keys: engine-dl-+ - name: cache winetricks payloads (winetricks sha-verifies its own cache entries)+ uses: actions/cache@v4+ with:+ path: ~/hb-e2e/xdg-cache+ key: winetricks-cache-v1+ - name: run E2E+ run: |+ FLAGS=""+ if [ "${{ github.event.schedule }}" = "23 9 * * 6" ] || [ "${{ inputs.dotnet48 }}" = "true" ]; then+ FLAGS="--with-dotnet48"+ fi+ Scripts/e2e-install.sh $FLAGS+ - name: teardown+ if: always()+ run: |+ for ws in "$HOME"/hb-e2e/engines/*/engine/bin/wineserver; do+ [ -x "$ws" ] && "$ws" -k 2>/dev/null || true+ done++ # Advisory forward-coverage on the newest macOS image. Failures here never block+ # and never page; promote to a blocking row after a month of green.+ e2e-macos26-advisory:+ runs-on: macos-26+ continue-on-error: true+ timeout-minutes: 90+ steps:+ - uses: actions/checkout@v4+ - name: rosetta+ run: sudo softwareupdate --install-rosetta --agree-to-license || true+ - name: cache engine downloads+ uses: actions/cache@v4+ with:+ path: ~/hb-e2e/downloads+ key: engine-dl-${{ hashFiles('spike/engine-manifest.json') }}+ restore-keys: engine-dl-+ - name: run E2E (no dotnet48)+ run: Scripts/e2e-install.sh+ - name: teardown+ if: always()+ run: |+ for ws in "$HOME"/hb-e2e/engines/*/engine/bin/wineserver; do+ [ -x "$ws" ] && "$ws" -k 2>/dev/null || true+ done++ # Issue filing lives in its own job on a fresh VM: the E2E jobs execute+ # third-party binaries (wine, vc_redist from aka.ms) and therefore run with+ # contents:read only — this job runs no third-party code and holds issues:write.+ alert:+ needs: [e2e]+ if: always()+ runs-on: ubuntu-latest+ permissions:+ issues: write+ steps:+ - name: create/update or auto-close the dedup issue+ env:+ GH_TOKEN: ${{ github.token }}+ RESULT: ${{ needs.e2e.result }}+ RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}+ run: |+ gh label create e2e-failure -R "$GITHUB_REPOSITORY" --color B60205 \+ --description "the nightly fresh-install E2E is red" --force+ TITLE="nightly install E2E failing"+ NUM=$(gh issue list -R "$GITHUB_REPOSITORY" --label e2e-failure --state open \+ --json number --jq '.[0].number // empty')+ if [ "$RESULT" = "failure" ]; then+ if [ -n "$NUM" ]; then+ gh issue comment "$NUM" -R "$GITHUB_REPOSITORY" --body "Still failing: $RUN_URL"+ else+ gh issue create -R "$GITHUB_REPOSITORY" --title "$TITLE" --label e2e-failure \+ --body "The nightly fresh-install E2E failed: $RUN_URL++This guard replays the fresh-user path: engine download from the bundled manifest (winetricks fetched live), layout audit, wineboot, vcrun2022. A failure here usually means new users cannot install."+ fi+ elif [ "$RESULT" = "success" ] && [ -n "$NUM" ]; then+ gh issue close "$NUM" -R "$GITHUB_REPOSITORY" --comment "Green again: $RUN_URL"+ fidiff --git a/Scripts/e2e-canary.sh b/Scripts/e2e-canary.shnew file mode 100755index 0000000..c380cae--- /dev/null+++ b/Scripts/e2e-canary.sh@@ -0,0 +1,105 @@+#!/bin/bash+# Nightly canary: do the bytes users depend on still exist and match their pins?+# 1. Re-hash every component URL in BOTH the repo manifest and the manifest inside+# the latest RELEASE bundle. Checking only repo HEAD recreates the #27/#28 blast+# pattern: shipped users install from the bundled copy, not from main.+# 2. Validate the published DMG + zip exactly as release.sh's post-publish gate does.+# 3. Appcast consistency: newest item version == latest release tag, enclosure fetchable.+#+# Drift and availability are DIFFERENT signals: a hash mismatch (DRIFT) is never+# retried; transport problems (AVAILABILITY) get curl's --retry. When run in CI,+# kind=drift|availability|none lands in $GITHUB_OUTPUT for the alerting job.+set -uo pipefail # deliberately not -e: failures are aggregated, not fatal mid-run+cd "$(dirname "$0")/.."++REPO=gauthierpiarrette/highball+DRIFT=0; AVAIL=0++hash_check() { # name url expected-sha+ local name="$1" url="$2" sha="$3" got+ got=$(curl -fsSL --retry 3 --max-time 900 "$url" | shasum -a 256 | awk '{print $1}') || got=DOWNLOAD-FAILED+ if [ "$got" = "$sha" ]; then+ echo "ok: $name"+ elif [ "$got" = "DOWNLOAD-FAILED" ]; then+ echo "AVAILABILITY: $name unreachable: $url"; AVAIL=1+ else+ echo "DRIFT: $name expected=$sha got=$got url=$url"; DRIFT=1+ fi+}++manifest_sweep() { # manifest-path label+ echo "--- manifest sweep: $2 ($1)"+ while read -r name url sha; do+ hash_check "$2/$name" "$url" "$sha"+ done < <(python3 -c 'import json,sys+for k, v in json.load(open(sys.argv[1]))["components"].items(): print(k, v["url"], v["sha256"])' "$1")+ # The alternatives block is informational — EngineManifest never decodes or+ # downloads it (Manifest.swift) — so it is not hashed here; the unit tripwire+ # testManifestURLsAreImmutablyPinned guards its URL shape statically.+}++manifest_sweep spike/engine-manifest.json repo++G=$(mktemp -d); trap 'rm -rf "$G"' EXIT++echo "--- published DMG (the download every new user gets)"+if curl -fsSL --retry 3 --max-time 900 -o "$G/app.dmg" "https://github.com/$REPO/releases/latest/download/Highball.dmg"; then+ xcrun stapler validate "$G/app.dmg" || { echo "DRIFT: DMG stapler validation failed"; DRIFT=1; }+ spctl --assess --type open --context context:primary-signature "$G/app.dmg" || { echo "DRIFT: DMG spctl assessment failed"; DRIFT=1; }+else+ echo "AVAILABILITY: latest DMG unreachable"; AVAIL=1+fi++echo "--- published zip (the Sparkle update enclosure) + its bundled manifest"+TAG=$(curl -fsSL --retry 3 "https://api.github.com/repos/$REPO/releases/latest" | python3 -c 'import json,sys; print(json.load(sys.stdin)["tag_name"])') || TAG=""+if [ -n "$TAG" ] && [ "$TAG" != "null" ]; then+ VER=${TAG#v}+ if curl -fsSL --retry 3 --max-time 900 -o "$G/app.zip" "https://github.com/$REPO/releases/download/$TAG/Highball-$VER.zip"; then+ # ditto, never unzip: unzip flattens Sparkle's symlinks and manufactures a+ # codesign failure (the proven 2026-08-25 Gatekeeper incident).+ ditto -x -k "$G/app.zip" "$G/x"+ xcrun stapler validate "$G/x/Highball.app" || { echo "DRIFT: zip app stapler validation failed"; DRIFT=1; }+ spctl --assess --type execute "$G/x/Highball.app" || { echo "DRIFT: zip app spctl assessment failed"; DRIFT=1; }+ if [ -f "$G/x/Highball.app/Contents/Resources/engine-manifest.json" ]; then+ manifest_sweep "$G/x/Highball.app/Contents/Resources/engine-manifest.json" "released-bundle-$TAG"+ else+ echo "DRIFT: released bundle carries no engine-manifest.json"; DRIFT=1+ fi+ else+ echo "AVAILABILITY: release zip unreachable for $TAG"; AVAIL=1+ fi+else+ echo "AVAILABILITY: could not resolve the latest release tag"; AVAIL=1+fi++echo "--- appcast consistency"+if curl -fsSL --retry 3 -o "$G/appcast.xml" "https://raw.githubusercontent.com/$REPO/main/appcast.xml"; then+ PARSED=$(python3 - "$G/appcast.xml" <<'PY'+import sys, xml.etree.ElementTree as ET+root = ET.parse(sys.argv[1]).getroot()+item = root.find('./channel/item') # release.sh inserts newest first+enc = item.find('enclosure')+print(enc.get('{http://www.andymatuschak.org/xml-namespaces/sparkle}version'), enc.get('url'))+PY+) || PARSED=""+ if [ -n "$PARSED" ]; then+ ac_ver=${PARSED%% *}; ac_url=${PARSED#* }+ if [ -n "$TAG" ] && [ "$TAG" != "null" ] && [ "v$ac_ver" != "$TAG" ]; then+ echo "DRIFT: appcast newest ($ac_ver) != latest release tag ($TAG)"; DRIFT=1+ fi+ curl -fsIL --retry 3 -o /dev/null "$ac_url" || { echo "DRIFT: appcast enclosure not fetchable: $ac_url"; DRIFT=1; }+ else+ echo "DRIFT: appcast unparsable"; DRIFT=1+ fi+else+ echo "AVAILABILITY: appcast unreachable"; AVAIL=1+fi++if [ -n "${GITHUB_OUTPUT:-}" ]; then+ kind=none+ [ "$AVAIL" -eq 1 ] && kind=availability+ [ "$DRIFT" -eq 1 ] && kind=drift # drift outranks availability for labeling+ echo "kind=$kind" >> "$GITHUB_OUTPUT"+fi+if [ "$DRIFT" -eq 0 ] && [ "$AVAIL" -eq 0 ]; then echo; echo "CANARY PASSED"; exit 0; fi+echo; echo "CANARY FAILED (drift=$DRIFT availability=$AVAIL)"; exit 1diff --git a/Scripts/e2e-install.sh b/Scripts/e2e-install.shnew file mode 100755index 0000000..4d1c5bc--- /dev/null+++ b/Scripts/e2e-install.sh@@ -0,0 +1,118 @@+#!/bin/bash+# Fresh-install E2E guard. Replays the bug classes that actually shipped:+# winetricks pin drift broke every fresh install (#27/#28), fresh engines shipped+# broken runtime symlinks (0.7.9), and the winetricks/bash chain died under SIP (#16).+# Installs the engine the way a real user gets it — from the BUILT APP BUNDLE's+# manifest, winetricks fetched live — into an isolated HIGHBALL_HOME, then audits.+#+# Usage: Scripts/e2e-install.sh [--with-dotnet48] [--db <highball-db checkout>]+# Env: HIGHBALL_HOME (default $HOME/hb-e2e). Everything except downloads/ and+# xdg-cache/ is wiped at start; those two persist so CI can cache them+# (every reused download is sha256-reverified by the app / by winetricks).+set -euo pipefail+cd "$(dirname "$0")/.."++WITH_DOTNET=0; DB=""+while [ $# -gt 0 ]; do+ case "$1" in+ --with-dotnet48) WITH_DOTNET=1 ;;+ --db) DB="$2"; shift ;;+ *) echo "unknown arg: $1" >&2; exit 2 ;;+ esac+ shift+done++export HIGHBALL_HOME="${HIGHBALL_HOME:-$HOME/hb-e2e}"+# winetricks caches to ~/Library/Caches otherwise — keep the escape inside the home.+export XDG_CACHE_HOME="$HIGHBALL_HOME/xdg-cache"+step() { echo; echo "=== $1"; }++step "environment"+df -h / | tail -1+echo "HIGHBALL_HOME=$HIGHBALL_HOME"+mkdir -p "$HIGHBALL_HOME/downloads"+find "$HIGHBALL_HOME" -mindepth 1 -maxdepth 1 ! -name downloads ! -name xdg-cache -exec rm -rf {} +++step "build app bundle (debug, ad-hoc signed) — users install from ITS manifest, not the repo's"+Scripts/make-app.sh debug 0.0.0-e2e+MANIFEST=dist/Highball.app/Contents/Resources/engine-manifest.json+for f in "$MANIFEST" dist/Highball.app/Contents/Resources/vcrun2022.json dist/Highball.app/Contents/Resources/dotnet48.json; do+ test -f "$f" || { echo "bundle resource missing: $f"; exit 1; }+done++step "build CLI (release configuration, like shipped code)"+swift build -c release --product highball+HB=.build/release/highball++ENGINE_ID=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["id"])' "$MANIFEST")+ENGINE="$HIGHBALL_HOME/engines/$ENGINE_ID"+B="$HIGHBALL_HOME/bottles/e2e"+echo "engine id: $ENGINE_ID"++step "engine install from the bundled manifest (winetricks fetched live, never cached)"+rm -f "$HIGHBALL_HOME/downloads/winetricks" # a cached copy would hide upstream drift+"$HB" engine install "$MANIFEST" | tr '\r' '\n'+"$HB" engine list+"$HB" engine list | grep -q "^$ENGINE_ID" || { echo "engine not listed after install"; exit 1; }+"$HB" engine list | grep "^$ENGINE_ID" | grep -q "dxvk" || { echo "dxvk renderer missing from listing"; exit 1; }+rm -f "$HIGHBALL_HOME/downloads/winetricks" # and keep it out of the CI cache save++step "symlink audit (the 0.7.9 staging bug: absolute targets orphaned by the rename)"+abs=0; broken=0+while IFS= read -r -d '' l; do+ t=$(readlink "$l")+ case "$t" in /*) echo "ABSOLUTE: $l -> $t"; abs=1 ;; esac+ if [ ! -e "$l" ]; then echo "BROKEN: $l -> $t"; broken=1; fi+done < <(find "$ENGINE" -type l -print0)+[ "$abs" -eq 0 ] || { echo "absolute symlink targets found"; exit 1; }+[ "$broken" -eq 0 ] || { echo "broken symlinks found"; exit 1; }+n=$(find "$ENGINE/engine/lib" -maxdepth 1 -type l | wc -l | tr -d ' ')+[ "$n" -gt 0 ] || { echo "engine/lib has zero runtime links — linkRuntime no-op?"; exit 1; }+echo "symlinks ok: $n runtime links, none broken, none absolute"++step "bottle create (wineboot)"+"$HB" bottle create e2e++step "bare wine smoke — runtime must resolve through engine/lib with NO DYLD vars (the SIP/winetricks path)"+# Kill the create-step's wineserver first: it runs WITH the bottle's msync env, and a+# bare env-less wine against a live msync server dies on the sync-mode mismatch+# ("Server is running with WINEMSYNC but this process is not") — silently under -all.+"$HB" bottle kill e2e || true+sleep 3+st=0+out=$(WINEPREFIX="$B" WINEDEBUG=err+all "$ENGINE/engine/bin/wine" cmd.exe /c echo e2e-ok 2>&1) || st=$?+echo "$out" | grep -q 'e2e-ok' || { echo "smoke marker missing; output:"; echo "$out"; exit 1; }+if echo "$out" | grep -qi 'Library not loaded'; then echo "broken engine/lib runtime links"; exit 1; fi+[ "$st" -eq 0 ] || { echo "wine smoke exited $st"; exit 1; }+echo "wine smoke ok"++step "vcrun2022 recipe (live aka.ms fetch — its sha256 is null by design, Microsoft rotates in place)"+if [ -z "$DB" ]; then+ DB="$HIGHBALL_HOME/highball-db"+ git clone --depth 1 https://github.com/gauthierpiarrette/highball-db.git "$DB"+fi+"$HB" recipe apply e2e "$DB/recipes/tweaks/vcrun2022.json"+test -f "$B/drive_c/windows/system32/vcruntime140.dll" || { echo "vcruntime140 (x64) missing"; exit 1; }+test -f "$B/drive_c/windows/syswow64/vcruntime140.dll" || { echo "vcruntime140 (x86) missing"; exit 1; }+# NOTE: 'highball run' always exits 0 — assert on its output, never on $?.+out=$("$HB" run e2e reg --verbose -- query 'HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64' /v Installed)+echo "$out" | grep -qE 'Installed[[:space:]]+REG_DWORD[[:space:]]+0x1' || { echo "VC++ x64 marker missing:"; echo "$out"; exit 1; }+echo "$out" | grep -q 'exit=0' || { echo "reg query wine process failed:"; echo "$out"; exit 1; }+echo "vcrun2022 ok"++if [ "$WITH_DOTNET" -eq 1 ]; then+ step "dotnet48 recipe (winetricks through bash — the #16 chain; 5-40 min depending on cache)"+ "$HB" recipe apply e2e "$DB/recipes/tweaks/dotnet48.json"+ # 0x80eb1 = 528049 = .NET Framework 4.8's release id (update if the recipe ever targets a newer 4.x).+ out=$("$HB" run e2e reg --verbose -- query 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' /v Release)+ echo "$out" | grep -qi '0x80eb1' || { echo ".NET 4.8 marker (528049) missing:"; echo "$out"; exit 1; }+ echo "dotnet48 ok"+fi++step "teardown"+"$HB" bottle kill e2e || true+"$HB" bottle delete e2e || true+"$ENGINE/engine/bin/wineserver" -k 2>/dev/null || true+rm -rf "$HIGHBALL_HOME/engines/.$ENGINE_ID.partial"+echo+echo "E2E PASSED"diff --git a/Scripts/release.sh b/Scripts/release.shindex 52e39b0..c07013b 100755--- a/Scripts/release.sh+++ b/Scripts/release.sh@@ -11,6 +11,22 @@ NOTES_FILE="${3:-}"# The tag below marks HEAD as the source of this build, so the tree must be clean.git diff-index --quiet HEAD -- || { echo "tracked files modified; commit before releasing" >&2; exit 1; }+# Renderer regressions (the issue #21 class) ship via code/engine changes, not time,+# so a release wants a recent Scripts/render-smoke.sh result. Warn, don't block:+# hotfixes (like 0.7.9) must never be hostage to a benchmark run.+if ! python3 - <<'PY' 2>/dev/null+import json, sys, time+d = json.load(open("private/render-smoke/latest.json"))+sys.exit(0 if d.get("passed") and time.time() - d.get("epoch", 0) < 14*86400 else 1)+PY+then+ echo "" >&2+ echo "WARNING: no passing render-smoke result from the last 14 days." >&2+ echo " Run Scripts/render-smoke.sh when convenient — renderer regressions ship silently without it." >&2+ echo " Continuing in 5s…" >&2+ sleep 5+fi+Scripts/make-app.sh release "$VERSION"ZIP="dist/Highball-$VERSION.zip"ditto -c -k --keepParent dist/Highball.app "$ZIP"diff --git a/Scripts/render-smoke.sh b/Scripts/render-smoke.shnew file mode 100755index 0000000..31746c8--- /dev/null+++ b/Scripts/render-smoke.sh@@ -0,0 +1,86 @@+#!/bin/bash+# On-demand renderer smoke (the release gate's evidence). Runs Unigine Heaven in a+# scratch bottle across the renderer matrix that issue #21 taught us to cover:+# dxmt/D3D11, dxvk/D3D11, dxvk/D3D9 with async on, dxvk/D3D9 with async off.+# Pass criterion is liveness (still rendering at T+45 s, no dyld/library failure,+# expected DXVK banner state) — a headless script cannot judge pixels; real-game+# verification stays a human job. Result lands in private/render-smoke/latest.json,+# which release.sh checks for freshness.+#+# Run it on the dev machine when convenient (windows will appear briefly).+set -euo pipefail+cd "$(dirname "$0")/.."++HEAVEN_URL="https://assets.unigine.com/d/Unigine_Heaven-4.0.exe"+HEAVEN_SHA="497865a09af205a7d2e8812bfc2dd54870216cc1e95541b63cef89a4433b0e5f"+HOLD=45+BOTTLE=rsmoke++swift build --product highball+HB=.build/debug/highball++DL="$HOME/Library/Application Support/Highball/downloads/Unigine_Heaven-4.0.exe"+if [ ! -f "$DL" ] || [ "$(shasum -a 256 "$DL" | awk '{print $1}')" != "$HEAVEN_SHA" ]; then+ echo "downloading Heaven (~260 MB, one-time)…"+ curl -fSL --retry 3 -o "$DL" "$HEAVEN_URL"+ [ "$(shasum -a 256 "$DL" | awk '{print $1}')" = "$HEAVEN_SHA" ] || { echo "Heaven installer sha mismatch"; exit 1; }+fi++"$HB" bottle delete "$BOTTLE" 2>/dev/null || true+"$HB" bottle create "$BOTTLE"+"$HB" run "$BOTTLE" "$DL" -- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-+EXE="$HOME/Library/Application Support/Highball/bottles/$BOTTLE/drive_c/Program Files (x86)/Unigine/Heaven Benchmark 4.0/bin/Heaven.exe"+test -f "$EXE" || { echo "Heaven install failed"; exit 1; }+ARGS_COMMON=(-project_name Heaven -data_path ../ -engine_config ../data/heaven_4.0.cfg+ -system_script heaven/unigine.cpp -sound_app null -video_multisample 0+ -video_fullscreen 0 -video_mode -1 -video_width 800 -video_height 600 -extern_define RELEASE)++run_case() { # name renderer video_app async(0|1|-)+ local name="$1" renderer="$2" vapp="$3" async="$4" out pass=1+ echo; echo "=== $name"+ [ "$async" != "-" ] && "$HB" bottle set "$BOTTLE" dxvkasync "$async" >/dev/null+ local tmp; tmp=$(mktemp)+ "$HB" run "$BOTTLE" "$EXE" --renderer "$renderer" -- -video_app "$vapp" "${ARGS_COMMON[@]}" >"$tmp" 2>&1 &+ local shpid=$!+ sleep "$HOLD"+ if ! pgrep -qf "Heaven.exe"; then echo "FAIL: process died before T+${HOLD}s"; pass=0; fi+ "$HB" bottle kill "$BOTTLE" >/dev/null 2>&1 || true+ wait "$shpid" 2>/dev/null || true+ local log; log=$(sed -n 's/.*log: //p' "$tmp" | tail -1)+ if [ -n "$log" ] && [ -f "$log" ]; then+ if grep -qi 'Library not loaded' "$log"; then echo "FAIL: runtime dylib failure"; pass=0; fi+ case "$renderer:$async" in+ dxvk:1) grep -q 'async compiler threads' "$log" || { echo "FAIL: async expected but absent"; pass=0; } ;;+ dxvk:0) grep -q 'async compiler threads' "$log" && { echo "FAIL: async present despite toggle off"; pass=0; } ;;+ esac+ if [ "$renderer" = dxvk ]; then+ grep -q 'DXVK' "$log" || { echo "FAIL: no DXVK banner"; pass=0; }+ fi+ else+ echo "FAIL: no run log found"; pass=0+ fi+ rm -f "$tmp"+ [ "$pass" -eq 1 ] && echo "PASS: $name"+ RESULTS="$RESULTS{\"name\":\"$name\",\"pass\":$([ "$pass" -eq 1 ] && echo true || echo false)},"+ [ "$pass" -eq 1 ] || ALL=0+}++RESULTS=""; ALL=1+run_case "dxmt-d3d11" dxmt direct3d11 "-"+run_case "dxvk-d3d11" dxvk direct3d11 "1"+run_case "dxvk-d3d9-async" dxvk direct3d9 "1"+run_case "dxvk-d3d9-sync" dxvk direct3d9 "0"++"$HB" bottle kill "$BOTTLE" >/dev/null 2>&1 || true+"$HB" bottle delete "$BOTTLE" || true++ENGINE_ID=$("$HB" engine list | head -1 | cut -f1)+mkdir -p private/render-smoke+python3 - "$ENGINE_ID" "$ALL" "${RESULTS%,}" <<'PY'+import json, sys, time+engine, ok, results = sys.argv[1], sys.argv[2] == "1", json.loads("[" + sys.argv[3] + "]")+json.dump({"epoch": int(time.time()), "date": time.strftime("%Y-%m-%d"), "engineId": engine,+ "passed": ok, "results": results}, open("private/render-smoke/latest.json", "w"), indent=2)+PY+echo+[ "$ALL" -eq 1 ] && echo "RENDER SMOKE PASSED (private/render-smoke/latest.json)" || { echo "RENDER SMOKE FAILED"; exit 1; }