diff --git a/.github/actions/setup-coldvox/action.yml b/.github/actions/setup-coldvox/action.yml index a77e846c..f0b6ae3f 100644 --- a/.github/actions/setup-coldvox/action.yml +++ b/.github/actions/setup-coldvox/action.yml @@ -15,8 +15,8 @@ runs: echo "--- Verifying Provisioned System Dependencies ---" # List of essential commands the runner MUST have - # This replaces the sudo dnf/apt install commands - required_commands="xdotool wget unzip gcc g++ make Xvfb openbox dbus-launch wl-paste xclip ydotool xprop wmctrl pkg-config pulseaudio" + # Note: No Xvfb/openbox - we use live KDE Plasma session with DISPLAY=:0 + required_commands="xdotool wget unzip gcc g++ make dbus-launch wl-paste xclip ydotool xprop wmctrl pkg-config pulseaudio" failed=0 echo "Checking for required commands..." diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66b77d88..3a874b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,15 +199,12 @@ jobs: export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])") cargo test -p coldvox-app --test golden_master -- --nocapture - - name: Run Moonshine E2E Tests + # Moonshine E2E skipped on GitHub-hosted: PyTorch+CUDA deps (4GB+) exceed disk space + # These tests run on self-hosted via moonshine_check job instead + - name: Skip Moonshine E2E Tests (runs on self-hosted) if: matrix.rust-version == 'stable' run: | - echo "=== Running Moonshine E2E Tests ===" - # Install Python dependencies for Moonshine - pip install transformers torch librosa accelerate - export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])") - # Run the specific E2E test with the moonshine feature enabled - cargo test -p coldvox-stt --features moonshine --test moonshine_e2e -- --nocapture + echo "::notice::Moonshine E2E tests skipped on GitHub-hosted (disk space). See moonshine_check job." # GUI groundwork check integrated here - name: Detect and test Qt 6 GUI @@ -232,11 +229,16 @@ jobs: needs: [setup-whisper-dependencies] timeout-minutes: 30 env: - # DISPLAY inherited from runner's live KDE session (do NOT hardcode :99) + # Runner's live KDE Wayland session with XWayland + DISPLAY: ":0" + WAYLAND_DISPLAY: "wayland-0" RUST_LOG: debug RUST_TEST_TIME_UNIT: 10000 RUST_TEST_TIME_INTEGRATION: 30000 SCCACHE_DIR: $HOME/.cache/sccache + # Build optimizations + CARGO_INCREMENTAL: "1" + RUSTFLAGS: "-C link-arg=-fuse-ld=mold" steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5.0.0 - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 @@ -281,17 +283,51 @@ jobs: echo "DBUS_SESSION_BUS_PID=$DBUS_SESSION_BUS_PID" >> $GITHUB_ENV echo "D-Bus session started." + - name: Setup X11 access + run: | + set -euo pipefail + echo "=== Setting up X11 access ===" + + # Find XWayland auth file (KDE Wayland uses /run/user/UID/xauth_*) + XAUTH_FILE=$(ls /run/user/1000/xauth_* 2>/dev/null | head -1 || true) + if [[ -n "$XAUTH_FILE" && -f "$XAUTH_FILE" ]]; then + echo "Found XAUTHORITY: $XAUTH_FILE" + echo "XAUTHORITY=$XAUTH_FILE" >> $GITHUB_ENV + export XAUTHORITY="$XAUTH_FILE" + else + echo "::warning::No xauth file found in /run/user/1000/" + fi + + # Verify X11 access + if xset -q >/dev/null 2>&1; then + echo "X11 accessible via XWayland" + else + echo "::warning::X11 not accessible via xset" + fi + - name: Validate test prerequisites run: | set -euo pipefail echo "=== Test Environment Validation ===" - echo "Display: $DISPLAY" - # Verify that an X server is running + echo "DISPLAY: $DISPLAY" + echo "XAUTHORITY: ${XAUTHORITY:-not set}" + echo "WAYLAND_DISPLAY: ${WAYLAND_DISPLAY:-not set}" + + # Check if XAUTHORITY file exists + if [[ -f "${XAUTHORITY:-}" ]]; then + echo "XAUTHORITY file exists: $XAUTHORITY" + else + echo "::warning::XAUTHORITY file not found at ${XAUTHORITY:-unset}" + fi + + # Verify X server is accessible if ! xset -q >/dev/null 2>&1; then - echo "Error: No X server running on display $DISPLAY" + echo "::error::Cannot connect to X server on display $DISPLAY" + echo "Trying xhost diagnostics..." + xhost 2>&1 || true exit 1 fi - echo "X server is running." + echo "X server is accessible." echo "Available text injection backends:" command -v xdotool >/dev/null && echo " - xdotool: $(xdotool --version 2>/dev/null || echo 'available')" command -v ydotool >/dev/null && echo " - ydotool: available" @@ -359,13 +395,8 @@ jobs: run: | set -euo pipefail echo "Cleaning up background processes..." - # Kill Xvfb - pkill -f "Xvfb.*:99" || true - # Kill fluxbox - pkill -f "fluxbox.*:99" || true # Kill dbus-daemon if it was started by this session - if [[ -n "${DBUS_SESSION_BUS_PID:-}" ]] - then + if [[ -n "${DBUS_SESSION_BUS_PID:-}" ]]; then kill "$DBUS_SESSION_BUS_PID" 2>/dev/null || true fi echo "Cleanup completed."