-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from ChrisNeedham24/MCR-124
MCR-124 Added bundling as an Action for all operating systems.
- Loading branch information
Showing
31 changed files
with
144 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Bundle | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
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 --standalone --include-data-dir=source=source --noinclude-data-files='*.json' --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 --noinclude-data-files='*.json' --remove-output --assume-yes-for-downloads --linux-icon=source/resources/icon.png -o microcosm microcosm.py | ||
chmod 744 microcosm | ||
tar -cvf microcosm.tar.gz microcosm | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Bundle (Windows) | ||
run: | | ||
python -m nuitka --onefile --standalone --include-data-dir=source=source --noinclude-data-files='*.json' --remove-output --assume-yes-for-downloads --mingw64 microcosm.py | ||
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 --noinclude-data-files='*.json' --remove-output --assume-yes-for-downloads --linux-icon=source/resources/icon.png -o microcosm microcosm.py | ||
chmod 744 microcosm | ||
tar -cvf microcosm.tar.gz microcosm | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: microcosm-fedora-x86 | ||
path: microcosm.tar.gz |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-r requirements.txt | ||
pylint==2.17.1 | ||
coverage==6.5.0 | ||
nuitka==1.5.3 | ||
imageio==2.26.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pyxel==1.9.0 | ||
python-vlc==3.0.16120 | ||
pylint==2.13.9 | ||
coverage==6.5.0 | ||
platformdirs==3.1.1 |
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
Oops, something went wrong.