@@ -50,26 +50,24 @@ jobs:
5050 " 3.9" ,
5151 ]
5252 include :
53- - python-version : " 3.11"
54- PYTHONOPTIMIZE : 1
55- REVERSE : " --reverse"
56- - python-version : " 3.10"
57- PYTHONOPTIMIZE : 2
53+ - { python-version: "3.11", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
54+ - { python-version: "3.10", PYTHONOPTIMIZE: 2 }
55+ # Free-threaded
56+ - { os: "ubuntu-latest", python-version: "3.13-dev", disable-gil: true }
5857 # M1 only available for 3.10+
59- - os : " macos-13"
60- python-version : " 3.9"
58+ - { os: "macos-13", python-version: "3.9" }
6159 exclude :
62- - os : " macos-14"
63- python-version : " 3.9"
60+ - { os: "macos-14", python-version: "3.9" }
6461
6562 runs-on : ${{ matrix.os }}
66- name : ${{ matrix.os }} Python ${{ matrix.python-version }}
63+ name : ${{ matrix.os }} Python ${{ matrix.python-version }} ${{ matrix.disable-gil && 'free-threaded' || '' }}
6764
6865 steps :
6966 - uses : actions/checkout@v4
7067
7168 - name : Set up Python ${{ matrix.python-version }}
7269 uses : actions/setup-python@v5
70+ if : " ${{ !matrix.disable-gil }}"
7371 with :
7472 python-version : ${{ matrix.python-version }}
7573 allow-prereleases : true
7876 ".ci/*.sh"
7977 "pyproject.toml"
8078
79+ - name : Set up Python ${{ matrix.python-version }} (free-threaded)
80+ uses :
deadsnakes/[email protected] 81+ if : " ${{ matrix.disable-gil }}"
82+ with :
83+ python-version : ${{ matrix.python-version }}
84+ nogil : ${{ matrix.disable-gil }}
85+
86+ - name : Set PYTHON_GIL
87+ if : " ${{ matrix.disable-gil }}"
88+ run : |
89+ echo "PYTHON_GIL=0" >> $GITHUB_ENV
90+
8191 - name : Build system information
8292 run : python3 .github/workflows/system-info.py
8393
0 commit comments