Skip to content

Commit

Permalink
Merge pull request #3 from jepler/pybind
Browse files Browse the repository at this point in the history
WIP: pybindings
  • Loading branch information
jepler authored Jan 15, 2025
2 parents a2494b9 + aef6a72 commit 26b8eef
Show file tree
Hide file tree
Showing 41 changed files with 1,519 additions and 23 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
36 changes: 36 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Pip

on:
workflow_dispatch:
pull_request:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-latest"]
python-version: ["3.11", "3.12", "3.13"]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Add requirements
run: python -m pip install --upgrade wheel setuptools

- name: Build and install
run: pip install --verbose .
95 changes: 95 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Wheels

on:
workflow_dispatch:
pull_request:
push:
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Build SDist
run: pipx run build --sdist

- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
compression-level: 0
if-no-files-found: error


build_wheels:
name: Wheels on ${{ matrix.os }}${{ matrix.extra }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
arch_linux: ["aarch64"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all

- uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch_linux }}
CIBW_BUILD: "cp311-manylinux* cp312-manylinux* cp313-manylinux*"
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}${{ matrix.artifact-extra }}
path: wheelhouse/*.whl
compression-level: 0
if-no-files-found: error


upload_all:
name: Upload release
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
./*.pio.h
protodemo
./build
Loading

0 comments on commit 26b8eef

Please sign in to comment.