mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2025-04-25 23:21:02 -04:00
99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
|
|
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.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Build Package
|
|
run: |
|
|
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSD-Py.py
|
|
- name: Prepare Package for Upload
|
|
run: |
|
|
mv NUSD-Py.bin ~/NUSD-Py.bin
|
|
cd ~
|
|
tar cvf NUSD-Py.tar NUSD-Py.bin
|
|
- name: Upload Package
|
|
uses: actions/upload-artifact@v4.3.0
|
|
with:
|
|
path: ~/NUSD-Py.tar
|
|
name: NUSD-Py-linux-bin
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Build Package
|
|
run: |
|
|
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSD-Py.py --macos-create-app-bundle --disable-console
|
|
- name: Prepare Package for Upload
|
|
run: |
|
|
mv NUSD-Py.app ~/NUSD-Py.app
|
|
cd ~
|
|
tar cvf NUSD-Py.tar NUSD-Py.app
|
|
- name: Upload Package
|
|
uses: actions/upload-artifact@v4.3.0
|
|
with:
|
|
path: ~/NUSD-Py.tar
|
|
name: NUSD-Py-macos-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.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Build Package
|
|
run: |
|
|
nuitka --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSD-Py.py --disable-console
|
|
- name: Upload Package
|
|
uses: actions/upload-artifact@v4.3.0
|
|
with:
|
|
path: D:\a\NUSD-Py\NUSD-Py\NUSD-Py.exe
|
|
name: NUSD-Py-windows-bin
|
|
|