Halloween Update #23
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: PyInstaller build | |
on: [push] | |
jobs: | |
build_ubuntu_20_04: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.11 x64 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install --upgrade Pillow | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py | |
run: python3 -m PyInstaller Catmaker.spec | |
- name: Create archive (.tar.xz) | |
run: tar -caf Catmaker_Linux64_glibc2.31+.tar.xz -C dist Catmaker | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_Linux64_glibc2.31+.tar.xz | |
path: Catmaker_Linux64_glibc2.31+.tar.xz | |
build_ubuntu_22_04: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.11 x64 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install --upgrade Pillow | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py | |
run: python3 -m PyInstaller Catmaker.spec | |
- name: Create archive (.tar.xz) | |
run: tar -caf Catmaker_Linux64_glibc2.35+.tar.xz -C dist Catmaker | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_Linux64_glibc2.35+.tar.xz | |
path: Catmaker_Linux64_glibc2.35+.tar.xz | |
build_win32: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.8 x86 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' # 3.8 to support older versions of Windows | |
architecture: 'x86' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install Pillow==9.4.0 | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py | |
run: python -m PyInstaller Catmaker.spec | |
- name: Create archive (.zip) | |
run: tar.exe -a -c -f Catmaker_Win32.zip -C dist Catmaker | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_Win32 | |
path: Catmaker_Win32.zip | |
build_win64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.8 x86 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' # 3.8 to support older versions of Windows | |
architecture: 'x86' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install Pillow==9.4.0 | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py | |
run: python -m PyInstaller Catmaker.spec | |
- name: Create archive (.zip) | |
run: tar.exe -a -c -f Catmaker_Win32.zip -C dist Catmaker | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_Win32 | |
path: Catmaker_Win32.zip | |
build_win64_py311: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.11 x64 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install --upgrade Pillow | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
# Example of an upx install, also requires adding "--upx-dir upx-4.0.0-win64" to the pyinst run | |
#- name: Setup UPX | |
# run: | | |
# curl -L -O https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-win64.zip | |
# tar.exe -x -v -f upx-4.0.0-win64.zip | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --noupx --onedir --clean --add-data "sprites;sprites" --add-data "resources;resources" --add-data "README.md;." main.py | |
run: python -m PyInstaller Catmaker.spec | |
- name: Create archive (.zip) | |
run: tar.exe -a -c -f Catmaker_Win64_Windows10+.zip -C dist Catmaker | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_Win64_Windows10+ | |
path: Catmaker_Win64_Windows10+.zip | |
build_macos64: | |
# For commits to the original mac build action see: | |
# https://github.com/Thlumyn/clangen/blob/29c9e39fed9a09b8de906f5c3b91dc044fe9b9a5/.github/workflows/main.yml | |
runs-on: macos-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python 3.11 x64 | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: "3.11" | |
# - name: Install poetry | |
# uses: abatilo/actions-poetry@v2 | |
# with: | |
# poetry-version: 1.4.1 | |
# - name: install dependencies | |
# run: poetry install --with build -E discord | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Update setuptools and wheel | |
run: python -m pip install --upgrade setuptools wheel | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Install Pillow for icon format conversion | |
run: python -m pip install --upgrade Pillow | |
- name: Install PyInstaller | |
run: python -m pip install --upgrade PyInstaller | |
- name: Run PyInstaller | |
#run: poetry run python3 -m PyInstaller -i resources/images/icon.png --name clangen --windowed --onedir --clean --add-data sprites:sprites --add-data resources:resources --add-data README.md:. main.py | |
# run: poetry run python3 -m PyInstaller Clangen.spec | |
run: python -m PyInstaller Catmaker.spec | |
- name: Create archive (.tar.xz) | |
run: rm -r dist/Catmaker | |
- name: Install appdmg | |
run: "npm install -g appdmg" | |
- name: Generate .dmg | |
run: "appdmg appdmg.json Catmaker_macOS64.dmg" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Catmaker_macOS64.dmg | |
path: Catmaker_macOS64.dmg |