Skip to content

更新

更新 #16

Workflow file for this run

# 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: nuitka-build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ windows-latest ]
# ubuntu-latest,
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- uses: Gr1N/setup-poetry@v9
- run: poetry --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install --no-root
# if [ -f pyproject.toml ]; then poetry update; fi
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Build Executable with Nuitka
- name: Setup Environment Variables
shell: bash
run: |
echo "NUITKA_CACHE_DIR=${{ github.action_path }}/nuitka/cache" >> $GITHUB_ENV
echo "PYTHON_VERSION=$(python --version | awk '{print $2}' | cut -d '.' -f 1,2)" >> $GITHUB_ENV
# - name: Install Nuitka
# shell: bash
# run: |
# repo_url="git+https://$@github.com/Nuitka/Nuitka.git"
#
# pip install "${repo_url}/@main#egg=nuitka"
- name: Cache Nuitka cache directory
uses: actions/cache@v4
with:
path: ${{ env.NUITKA_CACHE_DIR }}
key: ${{ runner.os }}-python-${{ env.PYTHON_VERSION }}-nuitka-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-${{ env.PYTHON_VERSION }}-
${{ runner.os }}-python-
${{ runner.os }}-
- name: Build with Nuitka
run: |
# poetry shell
poetry run pip list
poetry run nuitka --mingw64 --standalone --lto=no --show-memory --disable-console --enable-plugins=pyside6 launcher.py
working-directory: app
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: | # match what's created for the 3 OSes
build/*.exe
build/*.bin
build/*.app/**/*