11name : JIT
22on :
33 pull_request :
4- paths :
4+ paths : &paths
55 - ' **jit**'
66 - ' Python/bytecodes.c'
77 - ' Python/optimizer*.c'
1212 - ' !**/*.md'
1313 - ' !**/*.ini'
1414 push :
15- paths :
16- - ' **jit**'
17- - ' Python/bytecodes.c'
18- - ' Python/optimizer*.c'
19- - ' Python/executor_cases.c.h'
20- - ' Python/optimizer_cases.c.h'
21- - ' **_testinternalcapi**'
22- - ' !Python/perf_jit_trampoline.c'
23- - ' !**/*.md'
24- - ' !**/*.ini'
15+ paths : *paths
2516 workflow_dispatch :
2617
2718permissions :
@@ -33,12 +24,13 @@ concurrency:
3324
3425env :
3526 FORCE_COLOR : 1
27+ LLVM_VERSION : 21
3628
3729jobs :
3830 interpreter :
3931 name : Interpreter (Debug)
4032 runs-on : ubuntu-24.04
41- timeout-minutes : 90
33+ timeout-minutes : 60
4234 steps :
4335 - uses : actions/checkout@v6
4436 with :
@@ -50,27 +42,22 @@ jobs:
5042 - name : Test tier two interpreter
5143 run : |
5244 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
53- jit :
45+
46+ windows :
5447 name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
55- needs : interpreter
48+
5649 runs-on : ${{ matrix.runner }}
57- timeout-minutes : 90
50+ timeout-minutes : 60
5851 strategy :
5952 fail-fast : false
6053 matrix :
6154 target :
6255 - i686-pc-windows-msvc/msvc
6356 - x86_64-pc-windows-msvc/msvc
6457 - aarch64-pc-windows-msvc/msvc
65- - x86_64-apple-darwin/clang
66- - aarch64-apple-darwin/clang
67- - x86_64-unknown-linux-gnu/gcc
68- - aarch64-unknown-linux-gnu/gcc
6958 debug :
7059 - true
7160 - false
72- llvm :
73- - 21
7461 include :
7562 - target : i686-pc-windows-msvc/msvc
7663 architecture : Win32
@@ -81,131 +68,137 @@ jobs:
8168 - target : aarch64-pc-windows-msvc/msvc
8269 architecture : ARM64
8370 runner : windows-11-arm
84- - target : x86_64-apple-darwin/clang
85- architecture : x86_64
86- runner : macos-15-intel
87- - target : aarch64-apple-darwin/clang
88- architecture : aarch64
89- runner : macos-14
90- - target : x86_64-unknown-linux-gnu/gcc
91- architecture : x86_64
92- runner : ubuntu-24.04
93- - target : aarch64-unknown-linux-gnu/gcc
94- architecture : aarch64
95- runner : ubuntu-24.04-arm
9671 steps :
9772 - uses : actions/checkout@v6
9873 with :
9974 persist-credentials : false
10075 - uses : actions/setup-python@v6
10176 with :
10277 python-version : ' 3.11'
103-
10478 # PCbuild downloads LLVM automatically:
105- - name : Windows
106- if : runner.os == 'Windows'
79+ - name : Build
10780 run : |
10881 ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
109- ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
110-
111- - name : macOS
112- if : runner.os == 'macOS'
82+ - name : Test
11383 run : |
114- brew update
115- brew install llvm@${{ matrix.llvm }}
116- export SDKROOT="$(xcrun --show-sdk-path)"
117- # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
118- # make sure we don't break downstream distributors (like uv):
119- export CFLAGS_JIT='-Werror=unguarded-availability'
120- export MACOSX_DEPLOYMENT_TARGET=10.15
121- ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
122- make all --jobs 4
123- ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
84+ ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
12485
125- - name : Linux
126- if : runner.os == 'Linux'
127- 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- ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
131- make all --jobs 4
132- ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
86+ macos :
87+ name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
13388
134- jit-with-disabled-gil :
135- name : Free-Threaded (Debug)
136- needs : interpreter
137- runs-on : ubuntu-24.04
138- timeout-minutes : 90
89+ runs-on : ${{ matrix.runner }}
90+ timeout-minutes : 60
13991 strategy :
14092 fail-fast : false
14193 matrix :
142- llvm :
143- - 21
94+ target :
95+ - x86_64-apple-darwin/clang
96+ - aarch64-apple-darwin/clang
97+ debug :
98+ - true
99+ - false
100+ include :
101+ - target : x86_64-apple-darwin/clang
102+ runner : macos-15-intel
103+ - target : aarch64-apple-darwin/clang
104+ runner : macos-14
144105 steps :
145106 - uses : actions/checkout@v6
146107 with :
147108 persist-credentials : false
148109 - uses : actions/setup-python@v6
149110 with :
150111 python-version : ' 3.11'
151- - name : Build with JIT enabled and GIL disabled
112+ - name : Install LLVM
113+ run : |
114+ brew update
115+ brew install llvm@${{ env.LLVM_VERSION }}
116+ - name : Build
152117 run : |
153- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
154- export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
155- ./configure --enable-experimental-jit --with-pydebug --disable-gil
118+ export SDKROOT="$(xcrun --show-sdk-path)"
119+ # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
120+ # make sure we don't break downstream distributors (like uv):
121+ export CFLAGS_JIT='-Werror=unguarded-availability'
122+ export MACOSX_DEPLOYMENT_TARGET=10.15
123+ ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
156124 make all --jobs 4
157- - name : Run tests
125+ - name : Test
158126 run : |
159- ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
160- continue-on-error : true
127+ ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
161128
162- no-opt-jit :
163- name : JIT without optimizations ( Debug)
164- needs : interpreter
165- runs-on : ubuntu-24.04
166- timeout-minutes : 90
129+ linux :
130+ name : ${{ matrix.target }} (${{ matrix.debug && ' Debug' || 'Release' }} )
131+
132+ runs-on : ${{ matrix.runner }}
133+ timeout-minutes : 60
167134 strategy :
168135 fail-fast : false
169136 matrix :
170- llvm :
171- - 21
137+ target :
138+ - x86_64-unknown-linux-gnu/gcc
139+ - aarch64-unknown-linux-gnu/gcc
140+ debug :
141+ - true
142+ - false
143+ include :
144+ - target : x86_64-unknown-linux-gnu/gcc
145+ runner : ubuntu-24.04
146+ - target : aarch64-unknown-linux-gnu/gcc
147+ runner : ubuntu-24.04-arm
172148 steps :
173149 - uses : actions/checkout@v6
174150 with :
175151 persist-credentials : false
176152 - uses : actions/setup-python@v6
177153 with :
178154 python-version : ' 3.11'
179- - name : Build with JIT
155+ - name : Build
180156 run : |
181- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
182- export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
183- ./configure --enable-experimental-jit --with-pydebug
157+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
158+ export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
159+ ./configure --enable-experimental-jit ${{ matrix.debug && ' --with-pydebug' || '' }}
184160 make all --jobs 4
185- - name : Run tests without optimizations
161+ - name : Test
186162 run : |
187- PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163+ ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
164+
165+ linux-extras :
166+ name : ${{ matrix.name }}
188167
189- tail-call-jit :
190- name : JIT with tail calling interpreter
191- needs : interpreter
192168 runs-on : ubuntu-24.04
193- timeout-minutes : 90
169+ timeout-minutes : 60
194170 strategy :
195171 fail-fast : false
196172 matrix :
197- llvm :
198- - 21
173+ include :
174+ - name : Free-Threaded (Debug)
175+ configure_flags : --enable-experimental-jit --with-pydebug --disable-gil
176+ continue_on_error : true
177+ - name : JIT without optimizations (Debug)
178+ configure_flags : --enable-experimental-jit --with-pydebug
179+ test_env : " PYTHON_UOPS_OPTIMIZE=0"
180+ - name : JIT with tail calling interpreter
181+ configure_flags : --enable-experimental-jit --with-tail-call-interp --with-pydebug
182+ use_clang : true
183+ run_tests : false
199184 steps :
200185 - uses : actions/checkout@v6
201186 with :
202187 persist-credentials : false
203188 - uses : actions/setup-python@v6
204189 with :
205190 python-version : ' 3.11'
206- - name : Build with JIT and tailcall
191+ - name : Build
207192 run : |
208- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
209- export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
210- CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
193+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
194+ export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
195+ if [ "${{ matrix.use_clang }}" = "true" ]; then
196+ export CC=clang-${{ env.LLVM_VERSION }}
197+ fi
198+ ./configure ${{ matrix.configure_flags }}
211199 make all --jobs 4
200+ - name : Test
201+ if : matrix.run_tests != false
202+ run : |
203+ ${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
204+ continue-on-error : ${{ matrix.continue_on_error }}
0 commit comments