mirror of
https://github.com/Nuitka/Nuitka.git
synced 2025-12-14 20:35:49 +01:00
* We now download "biome" standalone binaries for use on some files files, JSON now, and that breaks the check to not have it.
239 lines
9.7 KiB
YAML
239 lines
9.7 KiB
YAML
name: Nuitka tests
|
|
# makes little sense, spell-checker: disable
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
- factory
|
|
- release/**
|
|
- hotfix/**
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
matrix:
|
|
python_version:
|
|
- '3.8'
|
|
- '3.9'
|
|
- '3.10'
|
|
- '3.11'
|
|
- '3.12'
|
|
- '3.13'
|
|
name: Ubuntu Python ${{ matrix.python_version }}
|
|
steps:
|
|
- name: 🛎️ Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 🐍 Use Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: 🧳 Install Nuitka and dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install patchelf gdb ccache libfuse2
|
|
python -m pip install --no-python-version-warning --disable-pip-version-check -r requirements-devel.txt
|
|
python -m pip install --no-python-version-warning --disable-pip-version-check .
|
|
|
|
- name: Verbose scons output in compilation
|
|
run: |
|
|
set -x
|
|
python -m nuitka --mode=module --show-scons --run --report=compilation-report-module.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=accelerated --show-scons --run --report=compilation-report-accelerated.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=standalone --show-scons --run --report=compilation-report-standalone.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
readelf -d EmptyModuleTest.dist/EmptyModuleTest.bin | tee standalone-binary-readelf.txt
|
|
ldd EmptyModuleTest.dist/EmptyModuleTest.bin | tee standalone-binary-ldd.txt
|
|
python -m nuitka --mode=onefile --show-scons --run --report=compilation-report-onefile.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
shell: bash
|
|
|
|
- name: Archive compilation reports for empty modules
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: compilation-reports-${{ runner.os }}-${{ matrix.python_version }}
|
|
path: |
|
|
*.xml
|
|
standalone-binary-readelf.txt
|
|
standalone-binary-ldd.txt
|
|
|
|
# This can be used to ssh into GitHub actions if debugging is needed.
|
|
# - uses: actions/checkout@v4
|
|
# - name: Setup upterm session
|
|
# uses: lhotari/action-upterm@v1
|
|
# with:
|
|
# ## limits ssh access and adds the ssh public keys of the listed GitHub users
|
|
# limit-access-to-users: kayhayen
|
|
|
|
- name: Run Nuitka test suite
|
|
run: |
|
|
python -m nuitka --version
|
|
env | sort
|
|
python ./tests/run-tests --no-other-python --skip-reflection-test --skip-all-cpython-tests --assume-yes-for-downloads
|
|
|
|
- name: PyLint on Nuitka source code
|
|
run: |
|
|
python ./bin/check-nuitka-with-pylint
|
|
if: matrix.python_version == '3.9'
|
|
|
|
- name: RestLint on Nuitka source code
|
|
run: |
|
|
python ./bin/check-nuitka-with-restlint
|
|
if: matrix.python_version == '3.9'
|
|
|
|
- name: YamlLint on Nuitka source code
|
|
run: |
|
|
python ./bin/check-nuitka-with-yamllint
|
|
if: matrix.python_version == '3.9'
|
|
|
|
- name: Codespell on Nuitka source code
|
|
run: |
|
|
python ./bin/check-nuitka-with-codespell
|
|
if: matrix.python_version == '3.9'
|
|
|
|
- name: Auto-format check on Nuitka source code
|
|
run: |
|
|
# Install clang-format that matches what we use in VS code.
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
sudo apt-get install software-properties-common
|
|
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main'
|
|
sudo apt-get update
|
|
sudo apt-get install clang-format-21
|
|
|
|
python ./bin/autoformat-nuitka-source --check-only --assume-yes-for-downloads
|
|
if: matrix.python_version == '3.9'
|
|
|
|
mac-python3:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
python_version:
|
|
- '3.9'
|
|
- '3.10'
|
|
- '3.11'
|
|
- '3.12'
|
|
- '3.13'
|
|
name: macOS Python ${{ matrix.python_version }}
|
|
steps:
|
|
- name: 🛎️ Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 🐍 Use Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: Verbose installation output for Python
|
|
run: |
|
|
set -x
|
|
which python
|
|
otool -L $(which python)
|
|
otool -l $(which python)
|
|
ls -lR $(dirname $(dirname $(which python)))
|
|
|
|
- name: 🧳 Install Nuitka and dependencies
|
|
run: |
|
|
pip install --no-python-version-warning --disable-pip-version-check -r requirements-devel.txt
|
|
pip install --no-python-version-warning --disable-pip-version-check .
|
|
|
|
- name: Verbose scons output in compilation
|
|
run: |
|
|
set -x
|
|
python -m nuitka --mode=module --show-scons --run --report=compilation-report-module.xml --assume-yes-for-downloads tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=accelerated --show-scons --run --report=compilation-report-accelerated.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=standalone --show-scons --run --report=compilation-report-standalone.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=onefile --show-scons --run --report=compilation-report-onefile.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
|
|
# DLL mode has no run ability at this time.
|
|
python -m nuitka --mode=dll --show-scons --report=compilation-report-dll.xml --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
shell: bash
|
|
|
|
- name: Archive compilation reports for empty modules
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: compilation-reports-${{ runner.os }}-${{ matrix.python_version }}
|
|
path: |
|
|
*.xml
|
|
|
|
- name: Check all modes for debug output
|
|
run: |
|
|
set -x
|
|
python -m nuitka --mode=module --run --report=compilation-report-module.xml --debug tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=accelerated --run --report=compilation-report-accelerated.xml --debug --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=standalone --run --report=compilation-report-standalone.xml --debug --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=onefile --run --report=compilation-report-onefile.xml --debug --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
|
|
# DLL mode has no run ability at this time.
|
|
python -m nuitka --mode=dll --report=compilation-report-onefile.xml --debug --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
shell: bash
|
|
|
|
- name: Run Nuitka test suite
|
|
run: |
|
|
python -m nuitka --version
|
|
env | sort
|
|
python ./tests/run-tests --no-other-python --skip-reflection-test --skip-all-cpython-tests
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
python_version:
|
|
- '3.7'
|
|
- '3.8'
|
|
- '3.9'
|
|
- '3.10'
|
|
- '3.11'
|
|
- '3.12'
|
|
- '3.13'
|
|
name: Windows Python ${{ matrix.python_version }}
|
|
steps:
|
|
- name: 🛎️ Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 🐍 Use Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: 🧳 Install Nuitka and dependencies
|
|
run: |
|
|
pip install --no-python-version-warning --disable-pip-version-check -r requirements-devel.txt
|
|
pip install --no-python-version-warning --disable-pip-version-check .
|
|
|
|
- name: Verbose scons output in compilation
|
|
run: |
|
|
set -x
|
|
python -m nuitka --mode=module --show-scons --run --report=compilation-report-module.xml --assume-yes-for-downloads --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=accelerated --show-scons --run --report=compilation-report-accelerated.xml --assume-yes-for-downloads --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=standalone --show-scons --run --report=compilation-report-standalone.xml --assume-yes-for-downloads --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
python -m nuitka --mode=onefile --show-scons --run --report=compilation-report-onefile.xml --assume-yes-for-downloads --experimental=debug-report-traceback tests/basics/EmptyModuleTest.py
|
|
shell: bash
|
|
|
|
- name: Archive compilation reports for empty modules
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: compilation-reports-${{ runner.os }}-${{ matrix.python_version }}
|
|
path: |
|
|
*.xml
|
|
|
|
- name: Run Nuitka test suite
|
|
run: |
|
|
Get-ChildItem env:
|
|
python -m nuitka --version
|
|
python .\tests\run-tests --no-other-python --no-debug --skip-reflection-test --skip-all-cpython-tests --assume-yes-for-downloads
|