Skip to content

Manually include customtkinter in nuitka workflow #34

Manually include customtkinter in nuitka workflow

Manually include customtkinter in nuitka workflow #34

name: Python Package using Conda
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
conda-pkg-caching:
name: conda-caching
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: anaconda-client-env
channel-priority: strict
environment-file: environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
nuitka-build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest] #, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
- name: Update Conda
run: conda update -n base -c defaults conda
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Install Tkinter for Ubuntu
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get install python3-tk
- name: Build Executable
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: main.py
onefile: true
standalone: true
enable-plugins: tk-inter
include-package: "customtkinter"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/*.exe
build/*.bin
build/*.app/**/*