Build with Nuitka #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build with Nuitka | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-20.04] | |
arch: [x86, x64] | |
exclude: | |
- os: ubuntu-20.04 | |
arch: x86 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: ${{ matrix.arch }} # optional x64 or x86. Defaults to x64 if not specified | |
cache: 'poetry' | |
- name: Install external dependencies (Linux) | |
if: matrix.os == 'ubuntu-20.04' | |
run: sudo apt install build-essential python3.8-dev python3.8-tk | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install | |
poetry run python -c "import sys; print(sys.version)" | |
- name: Build standalone folder (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
poetry run nuitka nbstool.py | |
- name: Build standalone folder (Linux) | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
poetry run python3 -m nuitka nbstool.py | |
- name: Zip standalone folder | |
uses: vimtor/action-zip@v1 | |
with: | |
files: nbstool.dist/ | |
dest: NBSTool_${{ runner.os }}_${{ matrix.arch }}.zip | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} ${{ matrix.arch }} Build | |
path: NBSTool_${{ runner.os }}_${{ matrix.arch }}.zip |