Files
pycapnp/.github/workflows/packagingtest.yml
Matt Sachtler 01c4469e08 Add Python 3.11 to Github Actions builds (#306)
* Add Python3.11 to the Github Actions, in the manylinux2014 build as well as the
packaging test.

I added a second image, x86_64, to the manylinux2014 build matrix - the i686
build didn't immediately pass, so I left it out.

* Move the bundled capnproto library forward to 0.10.3.

* Remove the 2010 build entirely, and update the 2014 build to include i686.
2023-01-26 16:28:21 -08:00

83 lines
2.5 KiB
YAML

name: Packaging Test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 99
fail-fast: false
matrix:
# Some asyncio commands require 3.7+
# It may be possible to use 3.6 and maybe 3.5; however, this will take some patching to get examples to work
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest, macOS-latest, windows-2019]
arch: ["x86_64"]
include:
- python-version: "3.7"
os: macOS-latest
arch: arm64
- python-version: "3.8"
os: macOS-latest
arch: arm64
- python-version: "3.9"
os: macOS-latest
arch: arm64
- python-version: "3.10"
os: macOS-latest
arch: arm64
- python-version: "3.11"
os: macOS-latest
arch: arm64
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build pycapnp and install
if: matrix.arch == 'x86_64'
run: |
python setup.py build
pip install .
- name: Lint with flake8 and check black
run: |
pip install black flake8
flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
flake8 . --count --show-source --statistics --exclude benchmark,build
black . --check --diff --color
- name: Packaging x86_64
if: matrix.arch == 'x86_64'
run: |
python setup.py bdist_wheel
python setup.py sdist
- name: macOS - Packaging arm64
if: matrix.os == 'macOS-latest' && matrix.arch == 'arm64'
env:
CMAKE_OSX_ARCHITECTURES: arm64 # capnp cmake
MACOSX_DEPLOYMENT_TARGET: "11.0" # python wheel
ARCHFLAGS: "-arch arm64" # python wheel
_PYTHON_HOST_PLATFORM: "macosx-11.0-arm64" # python wheel
run: |
env
rm -rf dist build build64 bundled
python setup.py bdist_wheel --force-bundled-libcapnp
ls -lh dist
python setup.py sdist
- uses: actions/upload-artifact@v1.0.0
with:
name: package_dist
path: dist
- name: Test with pytest
if: matrix.arch == 'x86_64'
run: |
pip install pytest
pytest