Skip to content

Merge pull request #6 from sltlala/pre-commit-ci-update-config #65

Merge pull request #6 from sltlala/pre-commit-ci-update-config

Merge pull request #6 from sltlala/pre-commit-ci-update-config #65

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:
runs-on: windows-latest
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: 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: 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
# poetry shell
# poetry run pip list
run:
poetry run nuitka --mingw64 --standalone --lto=no --show-memory
--disable-console --enable-plugins=pyside6 --assume-yes-for-downloads
--report=report.xml --output-dir=build main.py
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: windows Build
path: | # match what's created for the 3 OSes
build/main.dist/
report.xml
retention-days: 7