diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 530238c9..498a663f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest", "macos-latest"] - py: ["3.13-dev", "3.12", "3.11", "3.10", "3.9", "3.8"] + py: ["3.14-dev", "3.13-dev", "3.12", "3.11", "3.10", "3.9", "3.8"] runs-on: ${{ matrix.os }} name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }} @@ -21,10 +21,17 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 + if: "!startsWith(matrix.py, '3.14')" with: python-version: ${{ matrix.py }} allow-prereleases: true cache: "pip" + - name: Set up no-GIL Python + uses: deadsnakes/action@v3.1.0 + if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.py, '3.14') + with: + python-version: ${{ matrix.py }} + nogil: true - name: Build shell: bash diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index d57e0586..a6d0a62b 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -23,8 +23,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: | + 3.x + 3.13 cache: "pip" + allow-prereleases: true + check-latest: true - name: Cythonize shell: bash run: | @@ -32,11 +36,13 @@ jobs: make cython - name: Build - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v2.19.1 env: CIBW_TEST_REQUIRES: "pytest" CIBW_TEST_COMMAND: "pytest {package}/test" + CIBW_PRERELEASE_PYTHONS: true CIBW_ARCHS_LINUX: auto aarch64 + CIBW_FREE_THREADED_SUPPORT: true CIBW_ARCHS_MACOS: x86_64 universal2 arm64 CIBW_SKIP: pp* diff --git a/requirements.txt b/requirements.txt index 1164a941..1017ddd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ # Also declared in pyproject.toml, if updating here please also update there. -Cython~=3.0.10 +Cython~=3.0.10; python_version <= '3.12' +# TODO: bump Cython version when wheels for >=3.13 and no-GIL come out +Cython @ git+https://github.com/cython/cython; python_version > '3.12'