11name : JIT
22on :
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
2115permissions :
@@ -27,12 +21,13 @@ concurrency:
2721
2822env :
2923 FORCE_COLOR : 1
24+ LLVM_VERSION : 19
3025
3126jobs :
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,22 @@ 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
45+
5046 runs-on : ${{ matrix.runner }}
51- timeout-minutes : 90
47+ timeout-minutes : 60
5248 strategy :
5349 fail-fast : false
5450 matrix :
5551 target :
5652 - i686-pc-windows-msvc/msvc
5753 - x86_64-pc-windows-msvc/msvc
5854 - 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
6355 debug :
6456 - true
6557 - false
66- llvm :
67- - 19
6858 include :
6959 - target : i686-pc-windows-msvc/msvc
7060 architecture : Win32
@@ -75,103 +65,134 @@ jobs:
7565 - target : aarch64-pc-windows-msvc/msvc
7666 architecture : ARM64
7767 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
9068 steps :
9169 - uses : actions/checkout@v6
9270 with :
9371 persist-credentials : false
9472 - uses : actions/setup-python@v6
9573 with :
9674 python-version : ' 3.11'
97-
9875 # PCbuild downloads LLVM automatically:
99- - name : Windows
100- if : runner.os == 'Windows'
76+ - name : Build
10177 run : |
10278 ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
79+ - name : Test
80+ run : |
10381 ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10482
105- - name : macOS
106- if : runner.os == 'macOS'
83+ macos :
84+ name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
85+
86+ runs-on : ${{ matrix.runner }}
87+ timeout-minutes : 60
88+ strategy :
89+ fail-fast : false
90+ matrix :
91+ target :
92+ - x86_64-apple-darwin/clang
93+ - aarch64-apple-darwin/clang
94+ debug :
95+ - true
96+ - false
97+ include :
98+ - target : x86_64-apple-darwin/clang
99+ runner : macos-15-intel
100+ - target : aarch64-apple-darwin/clang
101+ runner : macos-14
102+ steps :
103+ - uses : actions/checkout@v6
104+ with :
105+ persist-credentials : false
106+ - uses : actions/setup-python@v6
107+ with :
108+ python-version : ' 3.11'
109+ - name : Install LLVM
107110 run : |
108111 brew update
109- brew install llvm@${{ matrix.llvm }}
112+ brew install llvm@${{ env.LLVM_VERSION }}
113+ - name : Build
114+ run : |
110115 export SDKROOT="$(xcrun --show-sdk-path)"
111116 # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
112117 # make sure we don't break downstream distributors (like uv):
113118 export CFLAGS_JIT='-Werror=unguarded-availability'
114119 export MACOSX_DEPLOYMENT_TARGET=10.15
115120 ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
116121 make all --jobs 4
122+ - name : Test
123+ run : |
117124 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
118125
119- - name : Linux
120- if : runner.os == 'Linux'
126+ linux :
127+ name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
128+
129+ runs-on : ${{ matrix.runner }}
130+ timeout-minutes : 60
131+ strategy :
132+ fail-fast : false
133+ matrix :
134+ target :
135+ - x86_64-unknown-linux-gnu/gcc
136+ - aarch64-unknown-linux-gnu/gcc
137+ debug :
138+ - true
139+ - false
140+ include :
141+ - target : x86_64-unknown-linux-gnu/gcc
142+ runner : ubuntu-24.04
143+ - target : aarch64-unknown-linux-gnu/gcc
144+ runner : ubuntu-24.04-arm
145+ steps :
146+ - uses : actions/checkout@v6
147+ with :
148+ persist-credentials : false
149+ - uses : actions/setup-python@v6
150+ with :
151+ python-version : ' 3.11'
152+ - name : Build
121153 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"
154+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
155+ export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
124156 ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
125157 make all --jobs 4
158+ - name : Test
159+ run : |
126160 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
127161
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
162+ linux-extras :
163+ name : ${{ matrix.name }}
164+
158165 runs-on : ubuntu-24.04
159- timeout-minutes : 90
166+ timeout-minutes : 60
160167 strategy :
161168 fail-fast : false
162169 matrix :
163- llvm :
164- - 19
170+ include :
171+
172+ - name : JIT without optimizations (Debug)
173+ configure_flags : --enable-experimental-jit --with-pydebug
174+ test_env : " PYTHON_UOPS_OPTIMIZE=0"
175+ - name : JIT with tail calling interpreter
176+ configure_flags : --enable-experimental-jit --with-tail-call-interp --with-pydebug
177+ use_clang : true
178+ run_tests : false
165179 steps :
166180 - uses : actions/checkout@v6
167181 with :
168182 persist-credentials : false
169183 - uses : actions/setup-python@v6
170184 with :
171185 python-version : ' 3.11'
172- - name : Build with JIT and tailcall
186+ - name : Build
173187 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
188+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
189+ export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
190+ if [ "${{ matrix.use_clang }}" = "true" ]; then
191+ export CC=clang-${{ env.LLVM_VERSION }}
192+ fi
193+ ./configure ${{ matrix.configure_flags }}
177194 make all --jobs 4
195+ - name : Test
196+ if : matrix.run_tests != false
197+ run : |
198+ ${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
0 commit comments