Updated to use pybind11 with the latest tatami library. #138
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Test the library | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
name: Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Get latest CMake | |
uses: lukka/get-cmake@latest | |
- name: Test with tox | |
run: | | |
pip install tox | |
tox | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-11] # at some point get this to work on windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_ARCHS_LINUX: x86_64 # remove this later so we build for all linux archs | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | |
CIBW_SKIP: pp* | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [test, build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
# upload to PyPI on every tag starting with 'v' | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
# alternatively, to publish when a GitHub Release is created, use the following rule: | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks default artifact into dist/ | |
# if `name: artifact` is omitted, the action will create extra parent dir | |
name: artifact | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_PASSWORD }} |