Mac works now, pyqt6 from source for redhat? #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Executable for Multiple Platforms | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
# Set up Python for Ubuntu, macOS, and Windows | |
- name: Set up Python (Ubuntu/macOS/Windows) | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
# Install dependencies and PyInstaller for Ubuntu, macOS, and Windows using requirements.txt | |
- name: Install dependencies (Ubuntu/macOS/Windows) | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# Build with PyInstaller for Ubuntu, macOS, and Windows | |
- name: Build with PyInstaller (Ubuntu/macOS/Windows) | |
run: | | |
pyinstaller --onefile --windowed SortingApp.py | |
# macOS-specific step to set executable permissions and zip the .app bundle | |
- name: Set permissions and zip .app for macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
chmod +x dist/SortingApp.app/Contents/MacOS/SortingApp | |
cd dist | |
zip -r SortingApp-macOS.zip SortingApp.app | |
# Upload the native Ubuntu/macOS/Windows builds | |
- name: Upload executable (Native Builds) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: executable-${{ matrix.os }} | |
path: | | |
dist/*.zip | |
dist/*.exe | |
dist/*.AppImage | |
# Additional step: Build for Red Hat-compatible (via Docker) on Ubuntu | |
- name: Build for Red Hat-compatible (via Docker) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/src -w /src almalinux:8 \ | |
bash -c "yum install -y epel-release && \ | |
yum install -y mesa-libGL-devel python3 python3-devel gcc zlib-devel qt5-qtbase-devel qt5-qtbase-gui qt5-qtwebsockets qt5-qtsvg && \ | |
python3 -m pip install wheel && \ | |
python3 -m pip install --upgrade pip setuptools && \ | |
python3 -m pip install --user --no-binary :all: PyQt6 && \ | |
python3 -m pip install -r requirements.txt && \ | |
pyinstaller --onefile --windowed SortingApp.py" | |
# Upload the Red Hat-compatible build | |
- name: Upload Red Hat-compatible executable | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: executable-redhat | |
path: dist/* |