WiiPy/.github/workflows/python-build.yaml
NinjaCheetah 76c78e6d85
Added tmd edit command to change properties of a TMD file, same options as wad edit
Stubbed theme command temporarily as it will not be part of WiiPy v1.4.0. Workflow also adjusted to build for x86_64 and arm64 on macOS
2024-11-16 15:13:48 -05:00

121 lines
3.0 KiB
YAML

# This workflow will install Python dependencies and then build WiiPy for all platforms
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ccache for Nuitka
run: sudo apt update && sudo apt install -y ccache libicu70
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Application
run: make all
- name: Prepare Package for Upload
run: |
mv wiipy ~/wiipy
cd ~
tar cvf WiiPy.tar wiipy
- name: Upload Application
uses: actions/upload-artifact@v4.3.0
with:
path: ~/WiiPy.tar
name: WiiPy-Linux-bin
build-macos-x86_64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Application
run: ARCH_FLAGS=--macos-target-arch=x86_64 make all
- name: Prepare Package for Upload
run: |
mv wiipy ~/wiipy
cd ~
tar cvf WiiPy.tar wiipy
- name: Upload Application
uses: actions/upload-artifact@v4.3.0
with:
path: ~/WiiPy.tar
name: WiiPy-macOS-x86_64-bin
build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Application
run: ARCH_FLAGS=--macos-target-arch=arm64 make all
- name: Prepare Package for Upload
run: |
mv wiipy ~/wiipy
cd ~
tar cvf WiiPy.tar wiipy
- name: Upload Application
uses: actions/upload-artifact@v4.3.0
with:
path: ~/WiiPy.tar
name: WiiPy-macOS-arm64-bin
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Application
run: .\Build.ps1
- name: Upload Application
uses: actions/upload-artifact@v4.3.0
with:
path: D:\a\WiiPy\WiiPy\wiipy.exe
name: WiiPy-Windows-bin