ci: Xvfb started manually
Build Server .exe / build (push) Failing after 2m50s

This commit is contained in:
2026-07-01 14:36:07 +02:00
parent 7dd7ac7004
commit f99ae2570d
+27 -14
View File
@@ -16,7 +16,8 @@ on:
env: env:
WINEPREFIX: ${{ github.workspace }}/wine-prefix WINEPREFIX: ${{ github.workspace }}/wine-prefix
WINEPYTHON: ${{ github.workspace }}/wine-prefix/drive_c/Python312/python.exe WINEPYTHON: ${{ github.workspace }}/wine-prefix/drive_c/Python312/python.exe
XDG_RUNTIME_DIR: /tmp # Suppress harmless warning DISPLAY: :99.0
WINEDLLOVERRIDES: "mscoree,mshtml=;winemenubuilder.exe=d"
jobs: jobs:
build: build:
@@ -26,7 +27,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Wine & xvfb - name: Install Wine & Xvfb
run: | run: |
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo mkdir -p /etc/apt/keyrings sudo mkdir -p /etc/apt/keyrings
@@ -38,10 +39,18 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install --install-recommends winehq-stable xvfb -y sudo apt-get install --install-recommends winehq-stable xvfb -y
- name: Set up Wine prefix (headless) - name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x16 &
sleep 2 # give Xvfb a moment
- name: Set up Wine prefix
run: | run: |
mkdir -p "$WINEPREFIX" mkdir -p "$WINEPREFIX"
xvfb-run wineboot --init # Initialize the prefix without Mono/Gecko timeouts
wineboot --init --update
# Set Windows version to 10 (or your target)
winecfg -v win10
- name: Download Python installer - name: Download Python installer
run: | run: |
@@ -49,31 +58,31 @@ jobs:
https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe \ https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe \
-O /tmp/python.exe -O /tmp/python.exe
- name: Install Python in Wine (headless) - name: Install Python in Wine
run: | run: |
xvfb-run wine /tmp/python.exe \ wine /tmp/python.exe \
/quiet \ /quiet \
InstallAllUsers=1 \ InstallAllUsers=1 \
PrependPath=1 \ PrependPath=1 \
Include_test=0 Include_test=0
rm /tmp/python.exe rm /tmp/python.exe
- name: Install Python dependencies (headless) - name: Install Python dependencies
run: | run: |
cd server cd server
xvfb-run wine "$WINEPYTHON" -m pip install --upgrade pip wine "$WINEPYTHON" -m pip install --upgrade pip
xvfb-run wine "$WINEPYTHON" -m pip install -r requirements.txt wine "$WINEPYTHON" -m pip install -r requirements.txt
- name: Run tests (headless) - name: Run tests
run: | run: |
cd server cd server
xvfb-run wine "$WINEPYTHON" -m pip install pytest pytest-asyncio wine "$WINEPYTHON" -m pip install pytest pytest-asyncio
xvfb-run wine "$WINEPYTHON" -m pytest tests/ -v wine "$WINEPYTHON" -m pytest tests/ -v
- name: Build .exe with PyInstaller (headless) - name: Build .exe with PyInstaller
run: | run: |
cd server cd server
xvfb-run wine "$WINEPYTHON" -m PyInstaller \ wine "$WINEPYTHON" -m PyInstaller \
tray_wrapper.py \ tray_wrapper.py \
--name PaperDash \ --name PaperDash \
--onefile \ --onefile \
@@ -81,6 +90,10 @@ jobs:
--clean --clean
ls -la dist/ ls -la dist/
- name: Stop Xvfb
if: always()
run: killall Xvfb || true
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with: