Skip to content

Commit b9d6427

Browse files
committed
gh-111062 Set up free-threaded CI for windows
1 parent b939372 commit b9d6427

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,19 @@ jobs:
179179
run: make check-c-globals
180180

181181
build_win:
182+
name: 'Windows'
182183
needs: check_source
183184
if: needs.check_source.outputs.run_tests == 'true'
184185
uses: ./.github/workflows/reusable-build-win.yml
185186

187+
build_win_free_threaded:
188+
name: 'Windows (free-threaded)'
189+
needs: check_source
190+
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
191+
uses: ./.github/workflows/reusable-build-win.yml
192+
with:
193+
free-threaded: true
194+
186195
build_macos:
187196
name: 'macOS'
188197
needs: check_source

.github/workflows/reusable-build-win.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
on:
22
workflow_call:
3+
inputs:
4+
free-threaded:
5+
required: false
6+
type: boolean
7+
default: false
38

49
jobs:
510
build_win_32:
6-
name: 'Windows (x86)'
11+
name: 'x86'
712
runs-on: windows-latest
813
timeout-minutes: 60
914
env:
@@ -15,10 +20,10 @@ jobs:
1520
- name: Display build info
1621
run: .\python.bat -m test.pythoninfo
1722
- name: Tests
18-
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
23+
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci ${{ inputs.free-threaded && '--disable-gil' || '' }}
1924

2025
build_win_amd64:
21-
name: 'Windows (x64)'
26+
name: 'x64'
2227
runs-on: windows-latest
2328
timeout-minutes: 60
2429
env:
@@ -32,10 +37,10 @@ jobs:
3237
- name: Display build info
3338
run: .\python.bat -m test.pythoninfo
3439
- name: Tests
35-
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
40+
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci ${{ inputs.free-threaded && '--disable-gil' || '' }}
3641

3742
build_win_arm64:
38-
name: 'Windows (arm64)'
43+
name: 'ARM64'
3944
runs-on: windows-latest
4045
timeout-minutes: 60
4146
env:
@@ -45,4 +50,4 @@ jobs:
4550
- name: Register MSVC problem matcher
4651
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
4752
- name: Build CPython
48-
run: .\PCbuild\build.bat -e -d -p arm64
53+
run: .\PCbuild\build.bat -e -d -p arm64 ${{ inputs.free-threaded && '--disable-gil' || '' }}

0 commit comments

Comments
 (0)