Skip to content

Commit 1fbbe16

Browse files
authored
tests: update and add free-threaded build (#992)
* tests: update and add free-threaded build * Update tests.yml * Update tests.yml * tests: print message on free-threaded Python Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 460ef90 commit 1fbbe16

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
include:
6565
- python-version: "3.8"
6666
cmake-extras: "-DCMAKE_CXX_STANDARD=17"
67+
- python-version: "3.13t"
6768

6869
steps:
6970
- uses: actions/checkout@v4
@@ -85,15 +86,8 @@ jobs:
8586
key: ${{ matrix.python-version }}
8687
create-symlink: true
8788

88-
- name: Make requirements.txt
89-
run: |
90-
uv pip install --system dependency-groups
91-
dependency-groups dev > dev-requirements.txt
92-
9389
- name: Install python tools
94-
run: uv pip install --system -r dev-requirements.txt pytest-github-actions-annotate-failures
95-
env:
96-
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
90+
run: uv pip install --system --python=python --group dev pytest-github-actions-annotate-failures
9791

9892
- name: Configure
9993
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }}

tests/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import contextlib
44
import importlib.metadata
55
import sys
6+
import sysconfig
67
from pathlib import Path
78

89
if sys.version_info < (3, 11):
@@ -95,4 +96,6 @@ def pytest_report_header() -> str:
9596
lines = [
9697
f"installed packages of interest: {reqs}",
9798
]
99+
if sysconfig.get_config_var("Py_GIL_DISABLED"):
100+
lines.append("free-threaded Python build")
98101
return "\n".join(lines)

0 commit comments

Comments
 (0)