e1637b56a5
Build Server .exe / build (push) Failing after 3s
- Removed windows-latest runner requirement - Installs Wine 9.0 and Python 3.12 inside the Wine prefix - Builds PaperDash.exe cross-platform on ubuntu-latest
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
name: Build Server .exe
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "server/**"
|
|
- ".gitea/workflows/build-exe.yml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "server/**"
|
|
- ".gitea/workflows/build-exe.yml"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Wine
|
|
uses: egor-tensin/setup-wine@v2
|
|
with:
|
|
prefix: /home/runner/wine-prefix
|
|
version: "9.0"
|
|
|
|
- name: Configure Wine prefix (64-bit)
|
|
run: |
|
|
export WINEPREFIX=/home/runner/wine-prefix
|
|
wineboot --init
|
|
wine reg add \
|
|
"HKLM\\Software\\Wine\\DllOverrides" \
|
|
/v "*" /t REG_MULTI_SZ /d "" /f
|
|
|
|
- name: Set up Python in Wine
|
|
run: |
|
|
export WINEPREFIX=/home/runner/wine-prefix
|
|
wget -q \
|
|
https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe \
|
|
-O /tmp/python.exe
|
|
wine /tmp/python.exe \
|
|
/quiet \
|
|
InstallAllUsers=1 \
|
|
PrependPath=1 \
|
|
Include_test=0
|
|
rm /tmp/python.exe
|
|
|
|
- name: Add Python to PATH
|
|
run: |
|
|
echo "/home/runner/wine-prefix/drive_c/Python312" >> $GITHUB_PATH
|
|
echo "${WINEPREFIX}/drive_c/Python312/Scripts" >> $GITHUB_PATH
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
cd server
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd server
|
|
pip install pytest pytest-asyncio
|
|
pytest tests/ -v
|
|
|
|
- name: Build .exe with PyInstaller
|
|
run: |
|
|
cd server
|
|
python -m PyInstaller \
|
|
tray_wrapper.py \
|
|
--name PaperDash \
|
|
--onefile \
|
|
--noconsole \
|
|
--clean
|
|
ls -la dist/
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: PaperDash.exe
|
|
path: server/dist/PaperDash.exe
|
|
if-no-files-found: error
|
|
|
|
- name: Update Rolling Draft Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
allowUpdates: true
|
|
draft: true
|
|
tag: rolling-draft
|
|
name: "Draft (latest build)"
|
|
body: |
|
|
Latest PaperDash server build from commit ${{ gitea.sha }}.
|
|
Built on Linux via Wine + PyInstaller.
|
|
Edit tag, name, and notes before publishing.
|
|
artifacts: "server/dist/PaperDash.exe"
|