mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
Update and modernize create-executables action (#138)
* Modernize create-executables.yml * Update version numbers * Fix API version in test
This commit is contained in:
@@ -3,36 +3,64 @@ name: Create Executables
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
release:
|
release:
|
||||||
- types: [created]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pyinstaller-build-windows:
|
build:
|
||||||
runs-on: windows-latest
|
name: Build executables (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
artifact_suffix: windows
|
||||||
|
- os: ubuntu-latest
|
||||||
|
artifact_suffix: linux
|
||||||
|
- os: macos-latest
|
||||||
|
artifact_suffix: macos
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Create Executables (Windows)
|
- name: Checkout
|
||||||
uses: sayyid5416/pyinstaller@v1
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python_ver: '3.11'
|
python-version: '3.11'
|
||||||
spec: 'client.spec'
|
|
||||||
requirements: 'requirements.txt'
|
- name: Install Linux system dependencies
|
||||||
upload_exe_with_name: 'Zordon'
|
if: runner.os == 'Linux'
|
||||||
pyinstaller-build-linux:
|
run: sudo apt-get update && sudo apt-get install -y libxcb-cursor0 libxcb-xinerama0
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
- name: Install Python dependencies
|
||||||
- name: Create Executables (Linux)
|
run: |
|
||||||
uses: sayyid5416/pyinstaller@v1
|
python -m pip install --upgrade pip wheel setuptools
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
|
python -m pip install pyinstaller pyinstaller_versionfile
|
||||||
|
|
||||||
|
- name: Build client
|
||||||
|
run: pyinstaller --clean client.spec
|
||||||
|
|
||||||
|
- name: Build server
|
||||||
|
run: pyinstaller --clean server.spec
|
||||||
|
|
||||||
|
- name: Upload client artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
python_ver: '3.11'
|
name: Zordon-client-${{ matrix.artifact_suffix }}
|
||||||
spec: 'client.spec'
|
path: |
|
||||||
requirements: 'requirements.txt'
|
dist/Zordon-client
|
||||||
upload_exe_with_name: 'Zordon'
|
dist/Zordon-client.exe
|
||||||
pyinstaller-build-macos:
|
dist/Zordon-client.app
|
||||||
runs-on: macos-latest
|
if-no-files-found: error
|
||||||
steps:
|
|
||||||
- name: Create Executables (macOS)
|
- name: Upload server artifact
|
||||||
uses: sayyid5416/pyinstaller@v1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
python_ver: '3.11'
|
name: Zordon-server-${{ matrix.artifact_suffix }}
|
||||||
spec: 'client.spec'
|
path: |
|
||||||
requirements: 'requirements.txt'
|
dist/Zordon-server
|
||||||
upload_exe_with_name: 'Zordon'
|
dist/Zordon-server.exe
|
||||||
|
dist/Zordon-server.app
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ logger = logging.getLogger()
|
|||||||
server = Flask(__name__)
|
server = Flask(__name__)
|
||||||
ssl._create_default_https_context = ssl._create_unverified_context # disable SSL for downloads
|
ssl._create_default_https_context = ssl._create_unverified_context # disable SSL for downloads
|
||||||
|
|
||||||
API_VERSION = "0.1"
|
API_VERSION = "1.0"
|
||||||
|
|
||||||
def start_api_server(hostname: Optional[str] = None, bind_host: str = '0.0.0.0') -> None:
|
def start_api_server(hostname: Optional[str] = None, bind_host: str = '0.0.0.0') -> None:
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
APP_NAME = "Zordon"
|
APP_NAME = "Zordon"
|
||||||
APP_VERSION = "0.0.1"
|
APP_VERSION = "0.8.0"
|
||||||
APP_AUTHOR = "Brett Williams"
|
APP_AUTHOR = "Brett Williams"
|
||||||
APP_DESCRIPTION = "Distributed Render Farm Tools"
|
APP_DESCRIPTION = "Distributed Render Farm Tools"
|
||||||
APP_COPYRIGHT_YEAR = "2024"
|
APP_COPYRIGHT_YEAR = "2026"
|
||||||
APP_LICENSE = "MIT License"
|
APP_LICENSE = "MIT License"
|
||||||
APP_REPO_NAME = APP_NAME
|
APP_REPO_NAME = APP_NAME
|
||||||
APP_REPO_OWNER = "blw1138"
|
APP_REPO_OWNER = "blw1138"
|
||||||
|
|||||||
@@ -186,7 +186,9 @@ class TestFindAvailableServers:
|
|||||||
self, mock_proxy_class, mock_get_props, mock_found_hostnames,
|
self, mock_proxy_class, mock_get_props, mock_found_hostnames,
|
||||||
):
|
):
|
||||||
mock_found_hostnames.return_value = ['server-1.local']
|
mock_found_hostnames.return_value = ['server-1.local']
|
||||||
mock_get_props.return_value = {'api_version': '0.1', 'system_os': 'macos'}
|
from src.api.api_server import API_VERSION
|
||||||
|
|
||||||
|
mock_get_props.return_value = {'api_version': API_VERSION, 'system_os': 'macos'}
|
||||||
|
|
||||||
mock_proxy = MagicMock()
|
mock_proxy = MagicMock()
|
||||||
mock_proxy.get_engine_availability.return_value = {
|
mock_proxy.get_engine_availability.return_value = {
|
||||||
|
|||||||
Reference in New Issue
Block a user