Skip to content

Commit 30cfe6e

Browse files
GH-144552: Clean up tail-call.yml CI (#144553)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent fd190d1 commit 30cfe6e

File tree

1 file changed

+72
-85
lines changed

1 file changed

+72
-85
lines changed

.github/workflows/tail-call.yml

Lines changed: 72 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
name: Tail calling interpreter
22
on:
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

1914
permissions:
@@ -25,117 +20,109 @@ concurrency:
2520

2621
env:
2722
FORCE_COLOR: 1
23+
LLVM_VERSION: 21
2824

2925
jobs:
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-
- free-threading-msvc
42-
# - aarch64-pc-windows-msvc/msvc
43-
- x86_64-apple-darwin/clang
44-
- aarch64-apple-darwin/clang
45-
- x86_64-unknown-linux-gnu/gcc
46-
- aarch64-unknown-linux-gnu/gcc
47-
- free-threading
48-
llvm:
49-
- 20
5033
include:
51-
# - target: i686-pc-windows-msvc/msvc
52-
# architecture: Win32
53-
# runner: windows-2022
5434
- target: x86_64-pc-windows-msvc/msvc
5535
architecture: x64
5636
runner: windows-2025-vs2026
57-
- target: free-threading-msvc
37+
build_flags: ""
38+
run_tests: true
39+
- target: x86_64-pc-windows-msvc/msvc-free-threading
5840
architecture: x64
5941
runner: windows-2025-vs2026
60-
# - target: aarch64-pc-windows-msvc/msvc
61-
# architecture: ARM64
62-
# runner: windows-2022
63-
- target: x86_64-apple-darwin/clang
64-
architecture: x86_64
65-
runner: macos-15-intel
66-
- target: aarch64-apple-darwin/clang
67-
architecture: aarch64
68-
runner: macos-14
69-
- target: x86_64-unknown-linux-gnu/gcc
70-
architecture: x86_64
71-
runner: ubuntu-24.04
72-
- target: aarch64-unknown-linux-gnu/gcc
73-
architecture: aarch64
74-
runner: ubuntu-24.04-arm
75-
- target: free-threading
76-
architecture: x86_64
77-
runner: ubuntu-24.04
42+
build_flags: --disable-gil
43+
run_tests: false
7844
steps:
7945
- uses: actions/checkout@v6
8046
with:
8147
persist-credentials: false
8248
- uses: actions/setup-python@v6
8349
with:
8450
python-version: '3.11'
85-
86-
- name: Native Windows MSVC (release)
87-
if: runner.os == 'Windows' && matrix.architecture != 'ARM64' && matrix.target != 'free-threading-msvc'
51+
- name: Build
8852
shell: pwsh
8953
run: |
9054
$env:PlatformToolset = "v145"
91-
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
92-
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
93-
94-
# No tests:
95-
- name: Native Windows MSVC with free-threading (release)
96-
if: matrix.target == 'free-threading-msvc'
97-
shell: pwsh
98-
run: |
99-
$env:PlatformToolset = "v145"
100-
./PCbuild/build.bat --tail-call-interp --disable-gil -c Release -p ${{ matrix.architecture }}
101-
102-
# No tests (yet):
103-
- name: Emulated Windows Clang (release)
104-
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
10558
shell: pwsh
10659
run: |
107-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
108-
$env:PlatformToolset = "clangcl"
109-
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
110-
$env:LLVMInstallDir = "C:\Program Files\LLVM"
111-
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
60+
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
11261
113-
- name: Native macOS (release)
114-
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
11582
run: |
11683
brew update
117-
brew install llvm@${{ matrix.llvm }}
84+
brew install llvm@${{ env.LLVM_VERSION }}
85+
- name: Build
86+
run: |
11887
export SDKROOT="$(xcrun --show-sdk-path)"
119-
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
120-
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
121-
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
12291
make all --jobs 4
92+
- name: Test
93+
run: |
12394
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
12495
125-
- name: Native Linux (debug)
126-
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
127121
run: |
128-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
129-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
130-
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 }}
131125
make all --jobs 4
132-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
133-
134-
- name: Native Linux with free-threading (release)
135-
if: matrix.target == 'free-threading'
126+
- name: Test
136127
run: |
137-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
138-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
139-
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
140-
make all --jobs 4
141128
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

0 commit comments

Comments
 (0)