Docker for redhat since github doesnt give me runners #5
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 | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, centos] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
if: matrix.os != 'centos' | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies (Ubuntu/macOS/Windows) | |
if: matrix.os != 'centos' | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
- name: Install dependencies in CentOS via Docker | |
if: matrix.os == 'centos' | |
run: | | |
docker run --rm -v $(pwd):/src -w /src centos:8 \ | |
bash -c "yum install -y python3 python3-devel gcc && \ | |
pip3 install pyinstaller && \ | |
pyinstaller --onefile --windowed SortingApp.py" | |
- name: Build with PyInstaller (Ubuntu/macOS/Windows) | |
if: matrix.os != 'centos' | |
run: | | |
pyinstaller --onefile --windowed SortingApp.py | |
- name: Upload executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: executable | |
path: dist/* |