diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index f27f0b0..0bd3ccb 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,10 +8,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macOS-11] + os: [ubuntu-22.04, windows-2022, macOS-11] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v2 @@ -19,10 +19,15 @@ jobs: platforms: all # Used to host cibuildwheel - name: Build wheels - uses: pypa/cibuildwheel@v2.12.0 + uses: pypa/cibuildwheel@v2.16.2 env: # configure cibuildwheel to build native archs ('auto'), and some emulated ones CIBW_ARCHS_LINUX: auto aarch64 ppc64le + CIBW_ARCHS_MACOS: x86_64 arm64 universal2 + CIBW_TEST_REQUIRES: .[test] + CIBW_TEST_COMMAND: pytest {project} + # arm64 cannot be tested on a x86_64 CI runner + CIBW_TEST_SKIP: "*-macosx_arm64" - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -31,7 +36,7 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build sdist run: pipx run build --sdist - uses: actions/upload-artifact@v3 @@ -44,13 +49,13 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 - uses: actions/download-artifact@v3 with: name: artifact path: dist - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.5.0 + uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true user: __token__ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbf4a1a..622cdfb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,16 +1,19 @@ name: Tests -on: [push] +on: [push, pull_request] + +env: + PYTHON_VERSIONS: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8", "pypy-3.9", "pypy-3.10"] jobs: test: runs-on: ubuntu-22.04 strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9] + python: ${{fromJson(env.PYTHON_VERSIONS)}} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} @@ -21,10 +24,10 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.7, pypy-3.8, pypy-3.9] + python: ${{fromJson(env.PYTHON_VERSIONS)}} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} diff --git a/setup.py b/setup.py index deca7df..99c090c 100644 --- a/setup.py +++ b/setup.py @@ -21,11 +21,11 @@ 'Operating System :: POSIX', 'Programming Language :: C', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Software Development :: Libraries :: Python Modules', ],