Skip to content

Commit 763bd54

Browse files
Clean up cherry pick
1 parent 06b6243 commit 763bd54

File tree

1 file changed

+95
-77
lines changed

1 file changed

+95
-77
lines changed

.github/workflows/jit.yml

Lines changed: 95 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
name: JIT
22
on:
33
pull_request:
4-
paths:
4+
paths: &paths
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
88
- '!Python/perf_jit_trampoline.c'
99
- '!**/*.md'
1010
- '!**/*.ini'
1111
push:
12-
paths:
13-
- '**jit**'
14-
- 'Python/bytecodes.c'
15-
- 'Python/optimizer*.c'
16-
- '!Python/perf_jit_trampoline.c'
17-
- '!**/*.md'
18-
- '!**/*.ini'
12+
paths: *paths
1913
workflow_dispatch:
2014

2115
permissions:
@@ -27,12 +21,13 @@ concurrency:
2721

2822
env:
2923
FORCE_COLOR: 1
24+
LLVM_VERSION: 19
3025

3126
jobs:
3227
interpreter:
3328
name: Interpreter (Debug)
3429
runs-on: ubuntu-24.04
35-
timeout-minutes: 90
30+
timeout-minutes: 60
3631
steps:
3732
- uses: actions/checkout@v6
3833
with:
@@ -44,27 +39,21 @@ jobs:
4439
- name: Test tier two interpreter
4540
run: |
4641
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
47-
jit:
42+
43+
windows:
4844
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
49-
needs: interpreter
5045
runs-on: ${{ matrix.runner }}
51-
timeout-minutes: 90
46+
timeout-minutes: 60
5247
strategy:
5348
fail-fast: false
5449
matrix:
5550
target:
5651
- i686-pc-windows-msvc/msvc
5752
- x86_64-pc-windows-msvc/msvc
5853
- aarch64-pc-windows-msvc/msvc
59-
- x86_64-apple-darwin/clang
60-
- aarch64-apple-darwin/clang
61-
- x86_64-unknown-linux-gnu/gcc
62-
- aarch64-unknown-linux-gnu/gcc
6354
debug:
6455
- true
6556
- false
66-
llvm:
67-
- 19
6857
include:
6958
- target: i686-pc-windows-msvc/msvc
7059
architecture: Win32
@@ -75,103 +64,132 @@ jobs:
7564
- target: aarch64-pc-windows-msvc/msvc
7665
architecture: ARM64
7766
runner: windows-11-arm
78-
- target: x86_64-apple-darwin/clang
79-
architecture: x86_64
80-
runner: macos-15-intel
81-
- target: aarch64-apple-darwin/clang
82-
architecture: aarch64
83-
runner: macos-14
84-
- target: x86_64-unknown-linux-gnu/gcc
85-
architecture: x86_64
86-
runner: ubuntu-24.04
87-
- target: aarch64-unknown-linux-gnu/gcc
88-
architecture: aarch64
89-
runner: ubuntu-24.04-arm
9067
steps:
9168
- uses: actions/checkout@v6
9269
with:
9370
persist-credentials: false
9471
- uses: actions/setup-python@v6
9572
with:
9673
python-version: '3.11'
97-
9874
# PCbuild downloads LLVM automatically:
99-
- name: Windows
100-
if: runner.os == 'Windows'
75+
- name: Build
10176
run: |
10277
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
78+
- name: Test
79+
run: |
10380
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10481
105-
- name: macOS
106-
if: runner.os == 'macOS'
82+
macos:
83+
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
84+
runs-on: ${{ matrix.runner }}
85+
timeout-minutes: 60
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
target:
90+
- x86_64-apple-darwin/clang
91+
- aarch64-apple-darwin/clang
92+
debug:
93+
- true
94+
- false
95+
include:
96+
- target: x86_64-apple-darwin/clang
97+
runner: macos-15-intel
98+
- target: aarch64-apple-darwin/clang
99+
runner: macos-14
100+
steps:
101+
- uses: actions/checkout@v6
102+
with:
103+
persist-credentials: false
104+
- uses: actions/setup-python@v6
105+
with:
106+
python-version: '3.11'
107+
- name: Install LLVM
107108
run: |
108109
brew update
109-
brew install llvm@${{ matrix.llvm }}
110+
brew install llvm@${{ env.LLVM_VERSION }}
111+
- name: Build
112+
run: |
110113
export SDKROOT="$(xcrun --show-sdk-path)"
111114
# Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
112115
# make sure we don't break downstream distributors (like uv):
113116
export CFLAGS_JIT='-Werror=unguarded-availability'
114117
export MACOSX_DEPLOYMENT_TARGET=10.15
115118
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
116119
make all --jobs 4
120+
- name: Test
121+
run: |
117122
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
118123
119-
- name: Linux
120-
if: runner.os == 'Linux'
124+
linux:
125+
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
126+
runs-on: ${{ matrix.runner }}
127+
timeout-minutes: 60
128+
strategy:
129+
fail-fast: false
130+
matrix:
131+
target:
132+
- x86_64-unknown-linux-gnu/gcc
133+
- aarch64-unknown-linux-gnu/gcc
134+
debug:
135+
- true
136+
- false
137+
include:
138+
- target: x86_64-unknown-linux-gnu/gcc
139+
runner: ubuntu-24.04
140+
- target: aarch64-unknown-linux-gnu/gcc
141+
runner: ubuntu-24.04-arm
142+
steps:
143+
- uses: actions/checkout@v6
144+
with:
145+
persist-credentials: false
146+
- uses: actions/setup-python@v6
147+
with:
148+
python-version: '3.11'
149+
- name: Build
121150
run: |
122-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
123-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
151+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
152+
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
124153
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
125154
make all --jobs 4
126155
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
127156
128-
# XXX: GH-133171
129-
# jit-with-disabled-gil:
130-
# name: Free-Threaded (Debug)
131-
# needs: interpreter
132-
# runs-on: ubuntu-24.04
133-
# timeout-minutes: 90
134-
# strategy:
135-
# fail-fast: false
136-
# matrix:
137-
# llvm:
138-
# - 19
139-
# steps:
140-
# - uses: actions/checkout@v6
141-
# with:
142-
# persist-credentials: false
143-
# - uses: actions/setup-python@v6
144-
# with:
145-
# python-version: '3.11'
146-
# - name: Build with JIT enabled and GIL disabled
147-
# run: |
148-
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
149-
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
150-
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
151-
# make all --jobs 4
152-
# - name: Run tests
153-
# run: |
154-
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
155-
tail-call-jit:
156-
name: JIT with tail calling interpreter
157-
needs: interpreter
157+
linux-extras:
158+
name: ${{ matrix.name }}
158159
runs-on: ubuntu-24.04
159-
timeout-minutes: 90
160+
timeout-minutes: 60
160161
strategy:
161162
fail-fast: false
162163
matrix:
163-
llvm:
164-
- 19
164+
include:
165+
- name: Free-Threaded (Debug)
166+
configure_flags: --enable-experimental-jit --with-pydebug --disable-gil
167+
continue_on_error: true
168+
- name: JIT without optimizations (Debug)
169+
configure_flags: --enable-experimental-jit --with-pydebug
170+
test_env: "PYTHON_UOPS_OPTIMIZE=0"
171+
- name: JIT with tail calling interpreter
172+
configure_flags: --enable-experimental-jit --with-tail-call-interp --with-pydebug
173+
use_clang: true
174+
run_tests: false
165175
steps:
166176
- uses: actions/checkout@v6
167177
with:
168178
persist-credentials: false
169179
- uses: actions/setup-python@v6
170180
with:
171181
python-version: '3.11'
172-
- name: Build with JIT and tailcall
182+
- name: Build
173183
run: |
174-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
175-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
176-
CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
184+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
185+
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
186+
if [ "${{ matrix.use_clang }}" = "true" ]; then
187+
export CC=clang-${{ env.LLVM_VERSION }}
188+
fi
189+
./configure ${{ matrix.configure_flags }}
177190
make all --jobs 4
191+
- name: Test
192+
if: matrix.run_tests != false
193+
run: |
194+
${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
195+
continue-on-error: ${{ matrix.continue_on_error }}

0 commit comments

Comments
 (0)