11name : Tail calling interpreter
22on :
33 pull_request :
4- paths :
4+ paths : &paths
55 - ' .github/workflows/tail-call.yml'
66 - ' Python/bytecodes.c'
77 - ' Python/ceval.c'
88 - ' Python/ceval_macros.h'
99 - ' Python/generated_cases.c.h'
1010 push :
11- paths :
12- - ' .github/workflows/tail-call.yml'
13- - ' Python/bytecodes.c'
14- - ' Python/ceval.c'
15- - ' Python/ceval_macros.h'
16- - ' Python/generated_cases.c.h'
11+ paths : *paths
1712 workflow_dispatch :
1813
1914permissions :
@@ -25,107 +20,109 @@ concurrency:
2520
2621env :
2722 FORCE_COLOR : 1
23+ LLVM_VERSION : 21
2824
2925jobs :
30- tail-call :
26+ windows :
3127 name : ${{ matrix.target }}
3228 runs-on : ${{ matrix.runner }}
33- timeout-minutes : 90
29+ timeout-minutes : 60
3430 strategy :
3531 fail-fast : false
3632 matrix :
37- target :
38- # Un-comment as we add support for more platforms for tail-calling interpreters.
39- # - i686-pc-windows-msvc/msvc
40- - x86_64-pc-windows-msvc/msvc
41- # - aarch64-pc-windows-msvc/msvc
42- - x86_64-apple-darwin/clang
43- - aarch64-apple-darwin/clang
44- - x86_64-unknown-linux-gnu/gcc
45- - aarch64-unknown-linux-gnu/gcc
46- - free-threading
47- llvm :
48- - 20
4933 include :
50- # - target: i686-pc-windows-msvc/msvc
51- # architecture: Win32
52- # runner: windows-2022
5334 - target : x86_64-pc-windows-msvc/msvc
5435 architecture : x64
55- runner : windows-2022
56- # - target: aarch64-pc-windows-msvc/msvc
57- # architecture: ARM64
58- # runner: windows-2022
59- - target : x86_64-apple-darwin/clang
60- architecture : x86_64
61- runner : macos-15-intel
62- - target : aarch64-apple-darwin/clang
63- architecture : aarch64
64- runner : macos-14
65- - target : x86_64-unknown-linux-gnu/gcc
66- architecture : x86_64
67- runner : ubuntu-24.04
68- - target : aarch64-unknown-linux-gnu/gcc
69- architecture : aarch64
70- runner : ubuntu-24.04-arm
71- - target : free-threading
72- architecture : x86_64
73- runner : ubuntu-24.04
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
7444 steps :
7545 - uses : actions/checkout@v6
7646 with :
7747 persist-credentials : false
7848 - uses : actions/setup-python@v6
7949 with :
8050 python-version : ' 3.11'
81-
82- - name : Native Windows MSVC (release)
83- if : runner.os == 'Windows' && matrix.architecture != 'ARM64'
51+ - name : Build
8452 shell : pwsh
8553 run : |
86- choco install visualstudio2026buildtools --no-progress -y --force --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --locale en-US --passive"
87- $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\bin;$env:PATH"
8854 $env:PlatformToolset = "v145"
89- ./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
90- ./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
91-
92- # No tests (yet):
93- - name : Emulated Windows Clang (release)
94- if : runner.os == 'Windows' && matrix.architecture == 'ARM64'
55+ ./PCbuild/build.bat --tail-call-interp ${{ matrix.build_flags }} -c Release -p ${{ matrix.architecture }}
56+ - name : Test
57+ if : matrix.run_tests
9558 shell : pwsh
9659 run : |
97- choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
98- $env:PlatformToolset = "clangcl"
99- $env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
100- $env:LLVMInstallDir = "C:\Program Files\LLVM"
101- ./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
60+ ./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10261
103- - name : Native macOS (release)
104- if : runner.os == 'macOS'
62+ macos :
63+ name : ${{ matrix.target }}
64+ runs-on : ${{ matrix.runner }}
65+ timeout-minutes : 60
66+ strategy :
67+ fail-fast : false
68+ matrix :
69+ include :
70+ - target : x86_64-apple-darwin/clang
71+ runner : macos-15-intel
72+ - target : aarch64-apple-darwin/clang
73+ runner : macos-14
74+ steps :
75+ - uses : actions/checkout@v6
76+ with :
77+ persist-credentials : false
78+ - uses : actions/setup-python@v6
79+ with :
80+ python-version : ' 3.11'
81+ - name : Install dependencies
10582 run : |
10683 brew update
107- brew install llvm@${{ matrix.llvm }}
84+ brew install llvm@${{ env.LLVM_VERSION }}
85+ - name : Build
86+ run : |
10887 export SDKROOT="$(xcrun --show-sdk-path)"
109- export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
110- export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
111- CC=clang-20 ./configure --with-tail-call-interp
88+ export PATH="/usr/local/opt/llvm@${{ env.LLVM_VERSION }}/bin:$PATH"
89+ export PATH="/opt/homebrew/opt/llvm@${{ env.LLVM_VERSION }}/bin:$PATH"
90+ CC=clang-${{ env.LLVM_VERSION }} ./configure --with-tail-call-interp
11291 make all --jobs 4
92+ - name : Test
93+ run : |
11394 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
11495
115- - name : Native Linux (debug)
116- if : runner.os == 'Linux' && matrix.target != 'free-threading'
96+ linux :
97+ name : ${{ matrix.target }}
98+ runs-on : ${{ matrix.runner }}
99+ timeout-minutes : 60
100+ strategy :
101+ fail-fast : false
102+ matrix :
103+ include :
104+ - target : x86_64-unknown-linux-gnu/gcc
105+ runner : ubuntu-24.04
106+ configure_flags : --with-pydebug
107+ - target : x86_64-unknown-linux-gnu/gcc-free-threading
108+ runner : ubuntu-24.04
109+ configure_flags : --disable-gil
110+ - target : aarch64-unknown-linux-gnu/gcc
111+ runner : ubuntu-24.04-arm
112+ configure_flags : --with-pydebug
113+ steps :
114+ - uses : actions/checkout@v6
115+ with :
116+ persist-credentials : false
117+ - uses : actions/setup-python@v6
118+ with :
119+ python-version : ' 3.11'
120+ - name : Build
117121 run : |
118- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
119- export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
120- CC=clang-20 . /configure --with-tail-call-interp --with-pydebug
122+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
123+ export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
124+ CC=clang-${{ env.LLVM_VERSION }} . /configure --with-tail-call-interp ${{ matrix.configure_flags }}
121125 make all --jobs 4
122- ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
123-
124- - name : Native Linux with free-threading (release)
125- if : matrix.target == 'free-threading'
126+ - name : Test
126127 run : |
127- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
128- export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
129- CC=clang-20 ./configure --with-tail-call-interp --disable-gil
130- make all --jobs 4
131128 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
0 commit comments