Skip to content

build!: drop support for Python v3.7 and v3.8 #517

build!: drop support for Python v3.7 and v3.8

build!: drop support for Python v3.7 and v3.8 #517

Workflow file for this run

name: Build CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
build:
permissions:
# all cpp-linter to post suggestions in PR reviews
pull-requests: write
# allow cpp-linter to detect which files changed
contents: read
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Checkout Current Repo
uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- name: Install dependencies
# cmake ships with the ubuntu-latest runner
run: |
sudo apt-get install python3-dev
python3 -m pip install -r docs/requirements.txt -r requirements-build.txt -r requirements-dev.txt
- name: Run cpp-linter as a py pkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: linter
run: |
sudo apt-get install clang-format-14
cpp-linter \
--version=14 \
--style=file \
--tidy-checks='-*' \
--lines-changed-only=true \
--ignore='src/linux/gpio.h' \
--format-review=true \
--file-annotations=false \
--step-summary=true
- name: C++ Linter checks failed?
if: steps.linter.outputs.checks-failed > 0
run: exit 1
- name: Build package for docs extraction and linting examples
run: |-
pipx run build -o dist
python -m pip install dist/pyrf24-*.whl
- name: check python typing
run: mypy src
- name: lint python sources
run: ruff check examples/*.py src/pyrf24/*.py* setup.py docs/conf.py
- name: format python sources
run: ruff format --check examples/*.py src/pyrf24/*.py* setup.py docs/conf.py
- name: Get doc dependencies
run: |-
sudo apt-get update
sudo apt-get install -y libgl-dev libglvnd-dev libxkbcommon-x11-0 graphviz
- name: Build docs
working-directory: docs
env:
# required for pySide6 on headless linux (as used by sphinx-social-cards extension)
QT_QPA_PLATFORM: offscreen
run: sphinx-build -E -W -b html . _build/html
- name: upload github pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./docs/_build/html
- name: Save distributable wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: "pyRF24_pkg_dist"
path: ${{ github.workspace }}/dist
- name: Validate distribution
run: pipx run twine check dist/*
deploy-docs:
needs: [build]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- uses: actions/deploy-pages@v4
id: deployment