pip deps added for build #11
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 | |
# 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 python3 python3-devel gcc zlib-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/* |