Skip to content

feat: Implement cross-platform executable compilation and distribution (WIP) #4

feat: Implement cross-platform executable compilation and distribution (WIP)

feat: Implement cross-platform executable compilation and distribution (WIP) #4

Workflow file for this run

name: Build Standalone Executables
on:
push:
branches:
- main
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl libgmp-dev libmpfr-dev libmpc-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev wine64
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel pyinstaller
pip install .
- name: Build Linux executable
run: |
source venv/bin/activate
EXO_NAME=exo-linux pyinstaller exo.spec
- name: Zip output (Linux)
run: zip -r dist-linux.zip dist/
- name: Upload artifact (Linux)
uses: actions/upload-artifact@v3
with:
name: linux-executable
path: dist-linux.zip
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel pyinstaller
pip install .
- name: Build macOS executable
run: |
source venv/bin/activate
EXO_NAME=exo-macos pyinstaller exo.spec
- name: Zip output (macOS)
run: zip -r dist-macos.zip dist/
- name: Upload artifact (macOS)
uses: actions/upload-artifact@v3
with:
name: macos-executable
path: dist-macos.zip
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m venv venv
.\venv\Scripts\activate
pip install --upgrade pip setuptools wheel pyinstaller
pip install .
shell: cmd
- name: Build Windows executable
run: |
.\venv\Scripts\activate
set EXO_NAME=exo-windows
pyinstaller exo.spec
shell: cmd
- name: Zip output (Windows)
run: Compress-Archive -Path dist -DestinationPath dist-windows.zip
shell: pwsh
- name: Upload artifact (Windows)
uses: actions/upload-artifact@v3
with:
name: windows-executable
path: dist-windows.zip