From 01c4469e084be7274d4bc4258fbf55a742c7ad3d Mon Sep 17 00:00:00 2001 From: Matt Sachtler Date: Thu, 26 Jan 2023 16:28:21 -0800 Subject: [PATCH] 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. --- .github/workflows/manylinux2010.yml | 77 ----------------------------- .github/workflows/manylinux2014.yml | 41 +++++++++++++++ .github/workflows/packagingtest.yml | 5 +- buildutils/bundle.py | 2 +- 4 files changed, 46 insertions(+), 79 deletions(-) delete mode 100644 .github/workflows/manylinux2010.yml create mode 100644 .github/workflows/manylinux2014.yml diff --git a/.github/workflows/manylinux2010.yml b/.github/workflows/manylinux2010.yml deleted file mode 100644 index df46d7d..0000000 --- a/.github/workflows/manylinux2010.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/manylinux2014.yml b/.github/workflows/manylinux2014.yml new file mode 100644 index 0000000..ee9feaf --- /dev/null +++ b/.github/workflows/manylinux2014.yml @@ -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 diff --git a/.github/workflows/packagingtest.yml b/.github/workflows/packagingtest.yml index 70eaecb..08c5252 100644 --- a/.github/workflows/packagingtest.yml +++ b/.github/workflows/packagingtest.yml @@ -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 diff --git a/buildutils/bundle.py b/buildutils/bundle.py index eb02b10..0964590 100644 --- a/buildutils/bundle.py +++ b/buildutils/bundle.py @@ -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