]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-139922: always run MSVC 64-bit tail-calling CI (GH-146570)
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Mon, 30 Mar 2026 13:55:44 +0000 (15:55 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Mar 2026 13:55:44 +0000 (21:55 +0800)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
.github/workflows/build.yml
.github/workflows/reusable-windows.yml
.github/workflows/tail-call.yml

index f8ce2d684604e0aca7e16d288b0c9f9d558b878b..dd5ccf4b3a550cb766914201c774a02833f36842 100644 (file)
@@ -165,13 +165,21 @@ jobs:
         free-threading:
           - false
           - true
+        interpreter:
+          - switch-case
         exclude:
           # Skip Win32 on free-threaded builds
           - { arch: Win32, free-threading: true }
+        include:
+          # msvc::musttail is currently only supported on x64,
+          # and only supported on 3.15+.
+          - { arch: x64, free-threading: false, interpreter: tail-call }
+          - { arch: x64, free-threading: true,  interpreter: tail-call }
     uses: ./.github/workflows/reusable-windows.yml
     with:
       arch: ${{ matrix.arch }}
       free-threading: ${{ matrix.free-threading }}
+      interpreter: ${{ matrix.interpreter }}
 
   build-windows-msi:
     # ${{ '' } is a hack to nest jobs under the same sidebar category.
index 2f667ace9194d7445f61732f616477c1d476b9e3..8772a04d779127d815d5e7f3f8e8a5b56ab1f42b 100644 (file)
@@ -12,6 +12,10 @@ on:
         required: false
         type: boolean
         default: false
+      interpreter:
+        description: Which interpreter to build (switch-case or tail-call)
+        required: true
+        type: string
 
 env:
   FORCE_COLOR: 1
@@ -20,7 +24,7 @@ env:
 
 jobs:
   build:
-    name: Build and test (${{ inputs.arch }})
+    name: Build and test (${{ inputs.arch }}, ${{ inputs.interpreter }})
     runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2025-vs2026' }}
     timeout-minutes: 60
     env:
@@ -33,9 +37,12 @@ jobs:
       if: inputs.arch != 'Win32'
       run: echo "::add-matcher::.github/problem-matchers/msvc.json"
     - name: Build CPython
+      # msvc::musttail is not supported for debug builds, so we have to
+      # switch to release.
       run: >-
         .\\PCbuild\\build.bat
-        -e -d -v
+        -e -v
+        ${{ inputs.interpreter == 'switch-case' && '-d' || '--tail-call-interp -c Release' }}
         -p "${ARCH}"
         ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
       shell: bash
@@ -45,6 +52,7 @@ jobs:
       run: >-
         .\\PCbuild\\rt.bat
         -p "${ARCH}"
-        -d -q --fast-ci
+        -q --fast-ci
+        ${{ inputs.interpreter == 'switch-case' && '-d' || '' }}
         ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
       shell: bash
index 88833ea3bb202247b17c14792a11d9df3ae8396f..08bd986a64ac698bf1a5b4f7e350aa3833ce7389 100644 (file)
@@ -23,41 +23,6 @@ env:
   LLVM_VERSION: 21
 
 jobs:
-  windows:
-    name: ${{ matrix.target }}
-    runs-on: ${{ matrix.runner }}
-    timeout-minutes: 60
-    strategy:
-      fail-fast: false
-      matrix:
-        include:
-          - target: x86_64-pc-windows-msvc/msvc
-            architecture: x64
-            runner: windows-2025-vs2026
-            build_flags: ""
-            run_tests: true
-          - target: x86_64-pc-windows-msvc/msvc-free-threading
-            architecture: x64
-            runner: windows-2025-vs2026
-            build_flags: --disable-gil
-            run_tests: false
-    steps:
-      - uses: actions/checkout@v6
-        with:
-          persist-credentials: false
-      - uses: actions/setup-python@v6
-        with:
-          python-version: '3.11'
-      - name: Build
-        shell: pwsh
-        run: |
-          ./PCbuild/build.bat --tail-call-interp ${{ matrix.build_flags }} -c Release -p ${{ matrix.architecture }}
-      - name: Test
-        if: matrix.run_tests
-        shell: pwsh
-        run: |
-          ./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
-
   macos:
     name: ${{ matrix.target }}
     runs-on: ${{ matrix.runner }}