Skip to content

Set nuitka cache path to ~/.nuitka/cache. #9

Set nuitka cache path to ~/.nuitka/cache.

Set nuitka cache path to ~/.nuitka/cache. #9

Workflow file for this run

on:
push:
tags:
- release.**
env:
PYTHON_VERSION: "3.9"
POETRY_VERSION: "1.8.1"
POETRY_URL: https://install.python-poetry.org
NUITKA_CACHE_DIR: ~/.nuitka/cache
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
# Do not use the latest versions in order to be backward compatible.
# In particular, macos 14+ will build for arm only.
os: [macos-12, ubuntu-20.04, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
# Modified rom https://github.com/Nuitka/Nuitka-Action/blob/main/action.yml
# We cannot use that github action in full because it assumes a lot that isn't true (e.g. PYTHON_VERSION not set,
# requirements.txt used, etc.).
- name: Install ccache
# TODO: Proper "in" test could make sense here.
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
sudo apt-get install -y ccache
- 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 Executable
run: |
source $VENV
python -m nuitka --output-dir=build --assume-yes-for-downloads --onefile --macos-create-app-bundle --include-package=dash --include-package-data=dash --include-package=dash_core_components --include-package-data=dash_core_components --include-package=dash_html_components --include-package-data=dash_html_components --include-package=packaging --include-package-data=packaging --include-package=plotly --include-package-data=plotly --include-package=ecgviewer --include-package-data=ecgviewer src/ecgviewer/main.py
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/*.exe
build/*.bin
build/*.app/**/*