Skip to content

Commit 158dca5

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

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
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
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: 'build and test (x86)'
712
runs-on: windows-latest
813
timeout-minutes: 60
914
env:
1015
IncludeUwp: 'true'
1116
steps:
1217
- uses: actions/checkout@v4
1318
- name: Build CPython
14-
run: .\PCbuild\build.bat -e -d -p Win32
19+
run: .\PCbuild\build.bat -e -d -p Win32 ${{ inputs.free-threaded && '--disable-gil' || '' }}
1520
- name: Display build info
1621
run: .\python.bat -m test.pythoninfo
1722
- name: Tests
1823
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
1924

2025
build_win_amd64:
21-
name: 'Windows (x64)'
26+
name: 'build and test (x64)'
2227
runs-on: windows-latest
2328
timeout-minutes: 60
2429
env:
@@ -28,14 +33,14 @@ jobs:
2833
- name: Register MSVC problem matcher
2934
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3035
- name: Build CPython
31-
run: .\PCbuild\build.bat -e -d -p x64
36+
run: .\PCbuild\build.bat -e -d -p x64 ${{ inputs.free-threaded && '--disable-gil' || '' }}
3237
- name: Display build info
3338
run: .\python.bat -m test.pythoninfo
3439
- name: Tests
3540
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
3641

3742
build_win_arm64:
38-
name: 'Windows (arm64)'
43+
name: 'build and test (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)