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.
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
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:
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
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
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 }}