diff --git a/.github/workflows/create-executables.yml b/.github/workflows/create-executables.yml index 54497f8..d884c96 100644 --- a/.github/workflows/create-executables.yml +++ b/.github/workflows/create-executables.yml @@ -1,38 +1,66 @@ name: Create Executables - + on: workflow_dispatch: release: - - types: [created] + types: [published] jobs: - pyinstaller-build-windows: - runs-on: windows-latest + build: + 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: - - name: Create Executables (Windows) - uses: sayyid5416/pyinstaller@v1 + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: - python_ver: '3.11' - spec: 'client.spec' - requirements: 'requirements.txt' - upload_exe_with_name: 'Zordon' - pyinstaller-build-linux: - runs-on: ubuntu-latest - steps: - - name: Create Executables (Linux) - uses: sayyid5416/pyinstaller@v1 + python-version: '3.11' + + - name: Install Linux system dependencies + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libxcb-cursor0 libxcb-xinerama0 + + - name: Install Python dependencies + run: | + 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: - python_ver: '3.11' - spec: 'client.spec' - requirements: 'requirements.txt' - upload_exe_with_name: 'Zordon' - pyinstaller-build-macos: - runs-on: macos-latest - steps: - - name: Create Executables (macOS) - uses: sayyid5416/pyinstaller@v1 + name: Zordon-client-${{ matrix.artifact_suffix }} + path: | + dist/Zordon-client + dist/Zordon-client.exe + dist/Zordon-client.app + if-no-files-found: error + + - name: Upload server artifact + uses: actions/upload-artifact@v4 with: - python_ver: '3.11' - spec: 'client.spec' - requirements: 'requirements.txt' - upload_exe_with_name: 'Zordon' + name: Zordon-server-${{ matrix.artifact_suffix }} + path: | + dist/Zordon-server + dist/Zordon-server.exe + dist/Zordon-server.app + if-no-files-found: error diff --git a/src/api/api_server.py b/src/api/api_server.py index 1a8c694..7253c23 100755 --- a/src/api/api_server.py +++ b/src/api/api_server.py @@ -34,7 +34,7 @@ logger = logging.getLogger() server = Flask(__name__) 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: diff --git a/src/version.py b/src/version.py index f1c9abd..b0fe42c 100644 --- a/src/version.py +++ b/src/version.py @@ -1,8 +1,8 @@ APP_NAME = "Zordon" -APP_VERSION = "0.0.1" +APP_VERSION = "0.8.0" APP_AUTHOR = "Brett Williams" APP_DESCRIPTION = "Distributed Render Farm Tools" -APP_COPYRIGHT_YEAR = "2024" +APP_COPYRIGHT_YEAR = "2026" APP_LICENSE = "MIT License" APP_REPO_NAME = APP_NAME APP_REPO_OWNER = "blw1138" diff --git a/tests/test_distributed_job_manager.py b/tests/test_distributed_job_manager.py index bbc0e79..785a6f4 100644 --- a/tests/test_distributed_job_manager.py +++ b/tests/test_distributed_job_manager.py @@ -186,7 +186,9 @@ class TestFindAvailableServers: self, mock_proxy_class, mock_get_props, mock_found_hostnames, ): 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.get_engine_availability.return_value = {