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.
This commit is contained in:
Matt Sachtler 2023-01-26 16:28:21 -08:00 committed by GitHub
parent 1b19b6db13
commit 01c4469e08
Failed to generate hash of commit
4 changed files with 46 additions and 79 deletions

View file

@ -1,77 +0,0 @@
name: manylinux2010
on: [push, pull_request]
jobs:
manylinux2010:
runs-on: ubuntu-latest
container: ${{ matrix.container-image }}
strategy:
max-parallel: 99
matrix:
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
container-image: ['quay.io/pypa/manylinux2010_x86_64', 'quay.io/pypa/manylinux2010_i686']
steps:
# NOTE: Cannot use checkout@v2 as it requires a newer version glibc, but that's not possible with manylinux without a secondary sysroot
- uses: actions/checkout@v1
# capnproto build requires cmake 3+, CentOS 6 (manylinux2010) defaults to cmake 2.8
- name: Install dependencies
run: |
yum install -y cmake3 ninja-build
ln -sf /usr/bin/cmake3 /usr/local/bin/cmake
ln -s /usr/bin/ninja-build /usr/local/bin/ninja
/opt/python/${{ matrix.python-version }}/bin/python -m pip install -r requirements.txt
/opt/python/${{ matrix.python-version }}/bin/python -m pip install auditwheel
- name: Build pycapnp and install
env:
LDFLAGS: -Wl,--no-as-needed -lrt
run: |
/opt/python/${{ matrix.python-version }}/bin/python setup.py build
- name: Packaging
run: |
/opt/python/${{ matrix.python-version }}/bin/python setup.py bdist_wheel
/opt/python/${{ matrix.python-version }}/bin/python setup.py sdist
/opt/python/${{ matrix.python-version }}/bin/auditwheel repair dist/*linux_*.whl
- uses: actions/upload-artifact@v1.0.0
with:
name: manylinux2010_dist
path: wheelhouse
manylinux2014:
name: "manylinux2014( ${{ matrix.python-version }}, quay.io/pypa/manylinux2014_aarch64)"
runs-on: ubuntu-latest
strategy:
max-parallel: 99
matrix:
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310']
fail-fast: false
env:
py: /opt/python/${{ matrix.python-version }}/bin/python
img: quay.io/pypa/manylinux2014_aarch64
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
- name: Building pycapnp and packaging
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '${{ env.py }} -m venv .env && \
source .env/bin/activate && \
echo "Install Dependencies" && \
python -m pip install -r requirements.txt && \
python -m pip install auditwheel && \
echo "Build pycapnp and install" && \
python setup.py build && \
echo "Packaging" && \
python setup.py bdist_wheel && \
python setup.py sdist && \
auditwheel repair dist/*linux_*.whl && \
deactivate'
- uses: actions/upload-artifact@v1.0.0
with:
name: manylinux2014_dist
path: wheelhouse

41
.github/workflows/manylinux2014.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: manylinux2014
on: [push, pull_request]
jobs:
manylinux2014:
name: "manylinux2014( ${{ matrix.python-version }}, ${{ matrix.container-image }})"
runs-on: ubuntu-latest
strategy:
max-parallel: 99
matrix:
python-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311']
container-image: ['quay.io/pypa/manylinux2014_aarch64', 'quay.io/pypa/manylinux2014_x86_64', 'quay.io/pypa/manylinux2014_i686']
fail-fast: false
env:
py: /opt/python/${{ matrix.python-version }}/bin/python
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
- name: Building pycapnp and packaging
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ matrix.container-image }} \
bash -exc '${{ env.py }} -m venv .env && \
source .env/bin/activate && \
echo "Install Dependencies" && \
python -m pip install -r requirements.txt && \
python -m pip install auditwheel && \
echo "Build pycapnp and install" && \
python setup.py build && \
echo "Packaging" && \
python setup.py bdist_wheel && \
python setup.py sdist && \
auditwheel repair dist/*linux_*.whl && \
deactivate'
- uses: actions/upload-artifact@v1.0.0
with:
name: manylinux2014_dist
path: wheelhouse

View file

@ -12,7 +12,7 @@ jobs:
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"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest, macOS-latest, windows-2019]
arch: ["x86_64"]
include:
@ -28,6 +28,9 @@ jobs:
- python-version: "3.10"
os: macOS-latest
arch: arm64
- python-version: "3.11"
os: macOS-latest
arch: arm64
steps:
- uses: actions/checkout@v2

View file

@ -26,7 +26,7 @@ pjoin = os.path.join
#
bundled_version = (0, 8, 1)
bundled_version = (0, 10, 3)
libcapnp_name = "capnproto-c++-%i.%i.%i.tar.gz" % (bundled_version)
libcapnp_url = "https://capnproto.org/" + libcapnp_name