Skip to content

Build wheels for Python 3.10, 3.11, 3.12 #4

Build wheels for Python 3.10, 3.11, 3.12

Build wheels for Python 3.10, 3.11, 3.12 #4

Workflow file for this run

name: Build
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
build-sdist:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.12']
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install pip setuptools wheel --upgrade
- name: Create source distribution
run: |
python setup.py sdist
- name: Install package
run: |
python -m pip install --no-index --find-links=./dist/ iteration_utilities -vv
- name: Import package
run: |
python -c "import iteration_utilities"
- name: Install test dependencies
run: |
python -m pip install pytest
- name: Run tests
run: |
python -m pytest tests/
- name: Upload dist
uses: actions/upload-artifact@v3
with:
name: py_sdist
path: ./dist/
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_TEST_COMMAND: >
python -c "import iteration_utilities" &&
pytest {package}/tests
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
build-docs:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.12']
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install pip setuptools --upgrade
- name: Install package
run: |
python -m pip install . --no-deps -vv
- name: Install doc dependencies
run: |
python -m pip install sphinx numpydoc
- name: Build doc
run: |
sphinx-build -b html -W -a -n docs/ build/sphinx/html/
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: ./build/sphinx/html/