8686 os : [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-13, macos-14]
8787 # This list to be kept in sync with cibuildwheel config
8888 # and python-requires in pyproject.toml.
89- python-version : ['3.11', '3.12', '3.13', '3.13t'] # , 'pypy3.10']
89+ #
90+ # It should be possible to add '3.13t' here when a newer version of
91+ # actions/setup-python is available. As of v5.4.0 it cannote be used
92+ # although a fix has been merged so presumably v5.5.0 or v.5.4.1 will
93+ # provide this...
94+ # https://github.com/actions/setup-python/pull/973
95+ python-version : ['3.11', '3.12', '3.13'] # , 'pypy3.10']
9096
9197 steps :
9298 - uses : actions/setup-python@v5
@@ -108,6 +114,43 @@ jobs:
108114
109115 - run : python -m flint.test --verbose
110116
117+ test_wheels_freethreaded_ubuntu :
118+ # XXX: Remove this job and add to the matrix above when a newer version of
119+ # actions/setup-python is released.
120+ needs : build_wheels
121+ name : Test 3.13t wheel on Ubuntu
122+ runs-on : ubuntu-24.04
123+
124+ steps :
125+ # https://github.com/actions/setup-python/issues/771
126+ # deadsnakes only works for Ubuntu...
127+ -
uses :
deadsnakes/[email protected] 128+ with :
129+ python-version : 3.13
130+ nogil : true
131+ - run : |
132+ python --version --version
133+ which python
134+ python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
135+ python -c "import sys; print(sys._is_gil_enabled())"
136+
137+ - uses : actions/download-artifact@v4
138+ with :
139+ name : wheels-${{ matrix.os }}
140+ path : wheelhouse
141+
142+ - run : pip install --no-index --find-links wheelhouse python_flint
143+
144+ # Check if the GIL is disabled in the free-threading build after import.
145+ - run : |
146+ python --version --version
147+ which python
148+ python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
149+ python -c "import sys; print(getattr(sys, '_is_gil_enabled', lambda: True)())"
150+ python -c "import sys; import flint; print(getattr(sys, '_is_gil_enabled', lambda: True)())"
151+
152+ - run : python -m flint.test --verbose
153+
111154 # On new enough Ubuntu we can build against the system deb.
112155 test_pip_flint_deb :
113156 name : Build on ${{ matrix.os }}
0 commit comments