Separate x86 and arm builds for macOS; remove unnecessary print #138
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: Python package | |
on: | |
push: | |
branches: | |
- poetry | |
jobs: | |
build: | |
env: | |
PYTHONIOENCODING: utf-8 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13, macos-latest, windows-latest, ubuntu-latest] | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.8.3" | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies | |
run: | | |
poetry install | |
poetry run python scripts/render_templates.py | |
- name: Package application (MacOS) | |
if: runner.os == 'macOS' | |
run: | | |
poetry run maturin develop --release | |
poetry run pyinstaller -F -n paragon -i paragon.ico paragon/ui/main.py | |
rm -rf dist/paragon.app | |
cp paragon.ico dist/paragon.ico | |
cp -R Data dist/Data | |
cp -R resources dist/resources | |
cp -R third-party-licenses dist/third-party-licenses | |
cp -R LICENSE.txt dist/LICENSE.txt | |
- name: Package application (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
.\package.bat | |
- name: Package application (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libxkbcommon-x11-0 | |
poetry run maturin develop --release | |
poetry run pyinstaller -F -n paragon -i paragon.ico paragon/ui/main.py | |
cp paragon.ico dist/paragon.ico | |
cp -R Data dist/Data | |
cp -R resources dist/resources | |
cp -R third-party-licenses dist/third-party-licenses | |
cp -R LICENSE.txt dist/LICENSE.txt | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Paragon-${{ matrix.os }} | |
path: dist |