Skip to content

trying redhat again, added chmod for mac #17

trying redhat again, added chmod for mac

trying redhat again, added chmod for mac #17

Workflow file for this run

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
- name: Set permissions for macOS app
if: matrix.os == 'macos-latest'
run: |
chmod +x dist/SortingApp.app/Contents/MacOS/SortingApp
# Upload the native Ubuntu/macOS/Windows builds
- name: Upload executable (Native Builds)
uses: actions/upload-artifact@v3
with:
name: executable-${{ matrix.os }}
path: dist/*
# 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 groupinstall -y 'C Development Tools and Libraries' && \
yum install -y mesa-libGL-devel python3 python3-devel gcc zlib-devel qt5-qtbase-devel && \
python3 -m pip install wheel && \
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/*