Skip to content

Commit

Permalink
Add dylib scan test action, intended only to print nuitka relevant pa…
Browse files Browse the repository at this point in the history
…ths and variables.
  • Loading branch information
Ivorforce committed Jul 12, 2024
1 parent a17b2b7 commit d4933d4
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/nuitka-dylib-scan-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches:
- "dylib-scan-gh-tests*"

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]
os: [macos-12, ubuntu-20.04]

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 }}
cache: 'pip' # caching pip dependencies

# Install using pip / poetry-core backend via PEP 517
- run: pip install .

- run: pip install "git+https://[email protected]/Nuitka/Nuitka.git/@91ad4a6255d97d09cee7734d5184f685fb7181cd#egg=nuitka"

# Run test script
- run: python src/ecgviewer/nuitka_tests.py
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ packages = [
python = "~3.9"
dash = "^2.17.1"
pandas = "^2.2.2"
nuitka = { git = "https://github.com/Nuitka/Nuitka.git", rev = "75e24f60bd7c6ab54b10cbf701621f76f229f40e", optional=true }
nuitka = { git = "https://github.com/Nuitka/Nuitka.git", rev = "91ad4a6255d97d09cee7734d5184f685fb7181cd", optional=true }
pywebview = "^5.1"
setproctitle = "^1.3.3"
wfdb = { git = "https://github.com/Ivorforce/wfdb-python.git", branch = "read-stream" }
Expand Down
15 changes: 15 additions & 0 deletions src/ecgviewer/nuitka_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from nuitka import PythonFlavors
import sys
import os

print(f"Executable: {sys.executable}")
print(f"Flavour: {PythonFlavors.getPythonFlavorName()}")

print(f"Prefix Path: {PythonFlavors.getSystemPrefixPath()}")
print(f"Env GH Actions: {os.getenv('GITHUB_ACTIONS') == 'true'}")
print(f"Is GH Action Python: {PythonFlavors.isGithubActionsPython()}")

try:
print(f"Homebrew Path:: {PythonFlavors.getHomebrewInstallPath()}")
except Exception as e:
print(f"Except Homebrew Path ({e}).")

0 comments on commit d4933d4

Please sign in to comment.