Skip to content

Commit 76c554b

Browse files
chris-eiblhugovkwebknjaz
authored
gh-139922: always run MSVC 64-bit tail-calling CI (GH-146570)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
1 parent adf2c47 commit 76c554b

File tree

3 files changed

+19
-38
lines changed

3 files changed

+19
-38
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,21 @@ jobs:
165165
free-threading:
166166
- false
167167
- true
168+
interpreter:
169+
- switch-case
168170
exclude:
169171
# Skip Win32 on free-threaded builds
170172
- { arch: Win32, free-threading: true }
173+
include:
174+
# msvc::musttail is currently only supported on x64,
175+
# and only supported on 3.15+.
176+
- { arch: x64, free-threading: false, interpreter: tail-call }
177+
- { arch: x64, free-threading: true, interpreter: tail-call }
171178
uses: ./.github/workflows/reusable-windows.yml
172179
with:
173180
arch: ${{ matrix.arch }}
174181
free-threading: ${{ matrix.free-threading }}
182+
interpreter: ${{ matrix.interpreter }}
175183

176184
build-windows-msi:
177185
# ${{ '' } is a hack to nest jobs under the same sidebar category.

.github/workflows/reusable-windows.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
type: boolean
1414
default: false
15+
interpreter:
16+
description: Which interpreter to build (switch-case or tail-call)
17+
required: true
18+
type: string
1519

1620
env:
1721
FORCE_COLOR: 1
@@ -20,7 +24,7 @@ env:
2024
2125
jobs:
2226
build:
23-
name: Build and test (${{ inputs.arch }})
27+
name: Build and test (${{ inputs.arch }}, ${{ inputs.interpreter }})
2428
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2025-vs2026' }}
2529
timeout-minutes: 60
2630
env:
@@ -33,9 +37,12 @@ jobs:
3337
if: inputs.arch != 'Win32'
3438
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3539
- name: Build CPython
40+
# msvc::musttail is not supported for debug builds, so we have to
41+
# switch to release.
3642
run: >-
3743
.\\PCbuild\\build.bat
38-
-e -d -v
44+
-e -v
45+
${{ inputs.interpreter == 'switch-case' && '-d' || '--tail-call-interp -c Release' }}
3946
-p "${ARCH}"
4047
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4148
shell: bash
@@ -45,6 +52,7 @@ jobs:
4552
run: >-
4653
.\\PCbuild\\rt.bat
4754
-p "${ARCH}"
48-
-d -q --fast-ci
55+
-q --fast-ci
56+
${{ inputs.interpreter == 'switch-case' && '-d' || '' }}
4957
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
5058
shell: bash

.github/workflows/tail-call.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,6 @@ env:
2323
LLVM_VERSION: 21
2424

2525
jobs:
26-
windows:
27-
name: ${{ matrix.target }}
28-
runs-on: ${{ matrix.runner }}
29-
timeout-minutes: 60
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
include:
34-
- target: x86_64-pc-windows-msvc/msvc
35-
architecture: x64
36-
runner: windows-2025-vs2026
37-
build_flags: ""
38-
run_tests: true
39-
- target: x86_64-pc-windows-msvc/msvc-free-threading
40-
architecture: x64
41-
runner: windows-2025-vs2026
42-
build_flags: --disable-gil
43-
run_tests: false
44-
steps:
45-
- uses: actions/checkout@v6
46-
with:
47-
persist-credentials: false
48-
- uses: actions/setup-python@v6
49-
with:
50-
python-version: '3.11'
51-
- name: Build
52-
shell: pwsh
53-
run: |
54-
./PCbuild/build.bat --tail-call-interp ${{ matrix.build_flags }} -c Release -p ${{ matrix.architecture }}
55-
- name: Test
56-
if: matrix.run_tests
57-
shell: pwsh
58-
run: |
59-
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
60-
6126
macos:
6227
name: ${{ matrix.target }}
6328
runs-on: ${{ matrix.runner }}

0 commit comments

Comments
 (0)