Skip to content

Use built-in Self type in __init__.pyi when available #281

Use built-in Self type in __init__.pyi when available

Use built-in Self type in __init__.pyi when available #281

name: Build primary wheels
on:
push:
branches:
- master
tags:
- v*
pull_request:
paths:
- '**'
workflow_dispatch:
jobs:
build_wheels:
name: >
Build wheels for py ${{ matrix.py }}, os ${{ matrix.cbw_os }},
arch ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py: [310, 39, 38]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
cbw_os: manylinux_
arch: x86_64
- os: windows-latest
cbw_os: win_
arch: amd64
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: astral-sh/setup-uv@v7
- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_BUILD: >
cp${{ matrix.py }}-${{ matrix.cbw_os }}${{ matrix.arch }}
CIBW_ARCHS: native
CIBW_BUILD_FRONTEND: build[uv]
CIBW_CONTAINER_ENGINE: podman
CIBW_TEST_REQUIRES: pytest typing_extensions mypy
CIBW_TEST_COMMAND: >
python -X faulthandler {package}/test/debug.py
&& python -X faulthandler -m pytest -p no:faulthandler
-s {package}
&& python {package}/test/run_type_checker.py
- uses: actions/upload-artifact@v4
with:
name: >
primary_wheel_artifact_py${{ matrix.py }}_os_
${{ matrix.cbw_os }}arch_${{ matrix.arch }}
path: ./wheelhouse/*.whl
build_pure_py:
name: Build and test pure py wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build module
run: FROZENDICT_PURE_PY=1 pipx run build --wheel
- name: Install dependencies
run: pip install -U pip pytest pytest-cov typing_extensions mypy
- name: Install module
run: pip install dist/*
- name: Run tests
run: >
pytest --cov=frozendict --cov-report=term-missing --cov-branch
--cov-fail-under=100
&& python test/run_type_checker.py
- uses: actions/upload-artifact@v4
with:
name: pure_py_wheel_artifact
path: ./dist/*