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 | |
- name: Set up Python (Ubuntu/macOS/Windows) | |
if: matrix.os != 'ubuntu-latest' | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies (Ubuntu/macOS/Windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
- name: Build with PyInstaller (Ubuntu/macOS/Windows) | |
if: matrix.os != 'ubuntu-latest' | |
run: | | |
pyinstaller --onefile --windowed SortingApp.py | |
- name: Build for Red Hat using Docker on Ubuntu | |
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 pyinstaller && \ | |
pyinstaller --onefile --windowed SortingApp.py" | |
- name: Upload executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: executable | |
path: dist/* |