- 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
This commit is contained in:
@@ -15,19 +15,45 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- name: Set up Wine
|
||||
uses: egor-tensin/setup-wine@v2
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: "pip"
|
||||
prefix: /home/runner/wine-prefix
|
||||
version: "9.0"
|
||||
|
||||
- name: Install dependencies
|
||||
- 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
|
||||
@@ -39,10 +65,16 @@ jobs:
|
||||
pip install pytest pytest-asyncio
|
||||
pytest tests/ -v
|
||||
|
||||
- name: Build .exe
|
||||
- name: Build .exe with PyInstaller
|
||||
run: |
|
||||
cd server
|
||||
python build_exe.py
|
||||
python -m PyInstaller \
|
||||
tray_wrapper.py \
|
||||
--name PaperDash \
|
||||
--onefile \
|
||||
--noconsole \
|
||||
--clean
|
||||
ls -la dist/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -60,5 +92,6 @@ jobs:
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user