Skip to content

Commit 5ee66e9

Browse files
authored
Merge branch 'master' into master
2 parents 97cdd97 + 9a0327f commit 5ee66e9

25 files changed

Lines changed: 1749 additions & 896 deletions

.github/workflows/buildwheel.yml

Lines changed: 98 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ jobs:
4242
if: ${{ matrix.os == 'windows-2019' }}
4343

4444
- name: Build wheels
45-
uses: pypa/cibuildwheel@v2.19.2
45+
uses: pypa/cibuildwheel@v2.20.0
4646
env:
4747
# override setting in pyproject.toml to use msys2 instead of msys64 bash
4848
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
49-
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh
49+
#
50+
# Don't need to create pythonXX.a under meson. Not needed any more:
51+
# CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh
52+
#
5053

5154
- uses: actions/upload-artifact@v4
5255
with:
@@ -107,7 +110,9 @@ jobs:
107110
fail-fast: false
108111
matrix:
109112
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
110-
python-version: ['3.9', '3.10', '3.11', '3.12']
113+
# This list to be kept in sync with cibuildwheel config
114+
# and python-requires in pyproject.toml.
115+
python-version: ['3.10', '3.11', '3.12', '3.13-dev', 'pypy3.10']
111116

112117
steps:
113118
- uses: actions/setup-python@v5
@@ -138,8 +143,62 @@ jobs:
138143
- run: pip install .
139144
- run: python -m flint.test --verbose
140145

141-
# Test that we can still make a coverage build with setuptools.
142-
test_coverage_setuptools:
146+
# Test build with minimum Cython and meson-python versions.
147+
test_old_build_requires:
148+
name: 'Test old Cython/meson-python'
149+
runs-on: ubuntu-24.04
150+
steps:
151+
- uses: actions/checkout@v4
152+
- uses: actions/setup-python@v5
153+
with:
154+
python-version: '3.12'
155+
- run: sudo apt-get update
156+
- run: sudo apt-get install libflint-dev
157+
# The versions of cython and meson-python here should be kept in sync
158+
# with those in pyproject.toml so that we test the stated minimum
159+
# versions.
160+
#
161+
# We don't need to specify ninja as a requirement in pyproject.toml
162+
# because without --no-build-isolation meson-python handles it
163+
# automatically in get_requirements_for_build_wheel().
164+
- run: 'pip install "cython==3.0" "meson-python==0.13" "ninja<1.11"'
165+
- run: pip install --no-build-isolation .
166+
- run: python -m flint.test --verbose
167+
168+
# For older Ubuntu we have to build Flint >= 3.0.0
169+
test_flint_releases:
170+
name: Test flint ${{ matrix.flint-tag }}
171+
runs-on: ubuntu-22.04
172+
strategy:
173+
fail-fast: false
174+
matrix:
175+
# Supported Flint versions:
176+
flint-tag: ['v3.0.0', 'v3.0.1', 'v3.1.0', 'v3.1.1', 'v3.1.2']
177+
steps:
178+
- uses: actions/checkout@v4
179+
- uses: actions/setup-python@v5
180+
with:
181+
python-version: '3.12'
182+
- run: bin/install_flint_ubuntu.sh ${{ matrix.flint-tag }}
183+
- run: pip install .
184+
- run: python -m flint.test --verbose
185+
186+
# Test against flint main
187+
test_flint_main:
188+
name: Test flint main
189+
runs-on: ubuntu-22.04
190+
steps:
191+
- uses: actions/checkout@v4
192+
- uses: actions/setup-python@v5
193+
with:
194+
python-version: '3.12'
195+
- run: bin/install_flint_ubuntu.sh main
196+
# Need to disable flint version check to build against main
197+
- run: pip install --config-settings=setup-args="-Dflint_version_check=false" .
198+
- run: python -m flint.test --verbose
199+
200+
# Test that we can make a coverage build and report coverage
201+
test_coverage_build:
143202
name: Test coverage setuptools build
144203
runs-on: ubuntu-24.04
145204
steps:
@@ -149,10 +208,43 @@ jobs:
149208
python-version: '3.12'
150209
- run: sudo apt-get update
151210
- run: sudo apt-get install libflint-dev
152-
- run: pip install git+https://github.com/oscarbenjamin/cython.git@pr_relative_paths
211+
# Need Cython's master branch until 3.1 is released because of:
212+
# https://github.com/cython/cython/pull/6341
213+
- run: pip install git+https://github.com/cython/cython.git@master
153214
- run: pip install -r requirements-dev.txt
154215
- run: bin/coverage.sh
155216

217+
# On new enough Ubuntu we can build against the system deb.
218+
test_freethreaded:
219+
name: Free-threaded ${{ matrix.python-version }} on ${{ matrix.os }}
220+
runs-on: ${{ matrix.os }}
221+
strategy:
222+
fail-fast: false
223+
matrix:
224+
os: [ubuntu-24.04]
225+
python-version: ['3.13-dev']
226+
steps:
227+
- uses: actions/checkout@v4
228+
# Can't use actions/setup-python
229+
# https://github.com/actions/setup-python/issues/771
230+
# deadsnakes only works for Ubuntu...
231+
- uses: deadsnakes/action@v3.1.0
232+
with:
233+
python-version: ${{ matrix.python-version }}
234+
nogil: true
235+
- run: |
236+
python --version --version
237+
which python
238+
python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
239+
python -c "import sys; print(sys._is_gil_enabled())"
240+
- run: sudo apt-get update
241+
- run: sudo apt-get install libflint-dev
242+
# Need Cython master until 3.1 is released
243+
- run: pip install git+https://github.com/cython/cython.git@master
244+
- run: pip install -r requirements-dev.txt
245+
- run: pip install --no-build-isolation .
246+
- run: python -m flint.test --verbose
247+
156248
# Run SymPy test suite against python-flint master
157249
test_sympy:
158250
name: Test SymPy ${{ matrix.sympy-version }}
@@ -173,24 +265,6 @@ jobs:
173265
- run: pip install sympy==${{ matrix.sympy-version }}
174266
- run: python -c 'import sympy; sympy.test(parallel=True)'
175267

176-
# For older Ubuntu we have to build Flint >= 3.0.0
177-
test_flint_versions:
178-
name: Test flint ${{ matrix.flint-tag }}
179-
runs-on: ubuntu-22.04
180-
strategy:
181-
fail-fast: false
182-
matrix:
183-
# Supported versions and latest git
184-
flint-tag: ['v3.0.0', 'v3.0.1', 'v3.1.0', 'v3.1.1', 'v3.1.2', 'main']
185-
steps:
186-
- uses: actions/checkout@v4
187-
- uses: actions/setup-python@v5
188-
with:
189-
python-version: '3.12'
190-
- run: bin/install_flint_ubuntu.sh ${{ matrix.flint-tag }}
191-
- run: pip install .
192-
- run: python -m flint.test --verbose
193-
194268
# Deploy wheels and sdist to PyPI
195269

196270
pypi_release:

0 commit comments

Comments
 (0)