Bundle #51
Workflow file for this run
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: Bundle | |
on: workflow_dispatch | |
jobs: | |
bundle: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r dev_requirements.txt | |
- name: Bundle (MacOS) | |
run: | | |
python -m nuitka --onefile --standalone --include-data-dir=source=source --remove-output --assume-yes-for-downloads --macos-create-app-bundle --macos-app-icon=source/resources/icon.png microcosm.py | |
ditto -c -k --sequesterRsrc --keepParent microcosm.app microcosm-osx.zip | |
if: matrix.os == 'macos-latest' | |
- name: Bundle (Ubuntu) | |
run: | | |
python -m nuitka --onefile --standalone --include-data-dir=source=source --remove-output --assume-yes-for-downloads --linux-icon=source/resources/icon.png -o microcosm microcosm.py | |
chmod 744 microcosm | |
tar -czvf microcosm.tar.gz microcosm | |
if: matrix.os == 'ubuntu-latest' | |
- name: Bundle (Windows) | |
run: | | |
cp source/resources/dll/miniupnpc.dll C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\ | |
python -m nuitka --onefile --standalone --include-data-dir=source=source --remove-output --assume-yes-for-downloads --mingw64 --windows-icon-from-ico=source/resources/icon.png --user-package-configuration-file=windows-nuitka-package.config.yml microcosm.py | |
# TODO Bundle miniupnpc with Windows? Remove bit from readme if it works | |
if: matrix.os == 'windows-latest' | |
- name: Upload artifact (MacOS) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: microcosm-osx | |
path: microcosm-osx.zip | |
if: matrix.os == 'macos-latest' | |
- name: Upload artifact (Ubuntu) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: microcosm-ubuntu-x86 | |
path: microcosm.tar.gz | |
if: matrix.os == 'ubuntu-latest' | |
- name: Upload artifact (Windows) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: microcosm-windows | |
path: microcosm.exe | |
if: matrix.os == 'windows-latest' | |
bundle-fedora: | |
runs-on: ubuntu-latest | |
container: fedora | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install system packages | |
run: | | |
dnf update -y | |
dnf install -y patchelf gcc-c++ | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r dev_requirements.txt | |
- name: Bundle | |
run: | | |
python -m nuitka --onefile --standalone --include-data-dir=source=source --remove-output --assume-yes-for-downloads --linux-icon=source/resources/icon.png -o microcosm microcosm.py | |
chmod 744 microcosm | |
tar -czvf microcosm.tar.gz microcosm | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: microcosm-fedora-x86 | |
path: microcosm.tar.gz |