55 - ' **jit**'
66 - ' Python/bytecodes.c'
77 - ' Python/optimizer*.c'
8- - ' Python/optimizer_bytecodes.c'
8+ - ' !Python/perf_jit_trampoline.c'
9+ - ' !**/*.md'
10+ - ' !**/*.ini'
911 push :
1012 paths :
1113 - ' **jit**'
1214 - ' Python/bytecodes.c'
1315 - ' Python/optimizer*.c'
14- - ' Python/optimizer_bytecodes.c'
16+ - ' !Python/perf_jit_trampoline.c'
17+ - ' !**/*.md'
18+ - ' !**/*.ini'
1519 workflow_dispatch :
1620
21+ permissions :
22+ contents : read
23+
1724concurrency :
1825 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1926 cancel-in-progress : true
2027
2128jobs :
29+ interpreter :
30+ name : Interpreter (Debug)
31+ runs-on : ubuntu-latest
32+ timeout-minutes : 90
33+ steps :
34+ - uses : actions/checkout@v4
35+ - name : Build tier two interpreter
36+ run : |
37+ ./configure --enable-experimental-jit=interpreter --with-pydebug
38+ make all --jobs 4
39+ - name : Test tier two interpreter
40+ run : |
41+ ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
2242 jit :
2343 name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
44+ needs : interpreter
2445 runs-on : ${{ matrix.runner }}
25- timeout-minutes : 60
46+ timeout-minutes : 90
2647 strategy :
2748 fail-fast : false
2849 matrix :
4061 - true
4162 - false
4263 llvm :
43- - 16
64+ - 18
4465 include :
4566 - target : i686-pc-windows-msvc/msvc
4667 architecture : Win32
@@ -74,14 +95,10 @@ jobs:
7495 architecture : aarch64
7596 runner : ubuntu-latest
7697 compiler : gcc
77- # These fail because of emulation, not because of the JIT:
78- exclude : test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv test_external_inspection
7998 - target : aarch64-unknown-linux-gnu/clang
8099 architecture : aarch64
81100 runner : ubuntu-latest
82101 compiler : clang
83- # These fail because of emulation, not because of the JIT:
84- exclude : test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv test_external_inspection
85102 env :
86103 CC : ${{ matrix.compiler }}
87104 steps :
@@ -93,37 +110,43 @@ jobs:
93110 - name : Native Windows
94111 if : runner.os == 'Windows' && matrix.architecture != 'ARM64'
95112 run : |
113+ choco upgrade llvm -y
96114 choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
97115 ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
98- ./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} -- multiprocess 0 --timeout 3600 --verbose2 --verbose3
116+ ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
99117
100118 # No PGO or tests (yet):
101119 - name : Emulated Windows
102120 if : runner.os == 'Windows' && matrix.architecture == 'ARM64'
103121 run : |
122+ choco upgrade llvm -y
104123 choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
105124 ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
106125
107126 - name : Native macOS
108127 if : runner.os == 'macOS'
109128 run : |
129+ brew update
110130 brew install llvm@${{ matrix.llvm }}
111131 SDKROOT="$(xcrun --show-sdk-path)" \
112132 ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
113133 make all --jobs 4
114- ./python.exe -m test --exclude ${{ matrix.exclude }} -- multiprocess 0 --timeout 3600 --verbose2 --verbose3
134+ ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
115135
136+ # --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
116137 - name : Native Linux
117138 if : runner.os == 'Linux' && matrix.architecture == 'x86_64'
118139 run : |
119140 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
120141 export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
121- ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto ' }}
142+ ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations' }}
122143 make all --jobs 4
123- ./python -m test --exclude ${{ matrix.exclude }} -- multiprocess 0 --timeout 3600 --verbose2 --verbose3
144+ ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
124145
146+ # --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
125147 - name : Emulated Linux
126148 if : runner.os == 'Linux' && matrix.architecture != 'x86_64'
149+ # The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
127150 run : |
128151 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
129152 export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
@@ -138,6 +161,25 @@ jobs:
138161 CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
139162 CPP="$CC --preprocess" \
140163 HOSTRUNNER=qemu-${{ matrix.architecture }} \
141- ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
164+ ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
142165 make all --jobs 4
143- ./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
166+ ./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
167+
168+ jit-with-disabled-gil :
169+ name : Free-Threaded (Debug)
170+ needs : interpreter
171+ runs-on : ubuntu-latest
172+ steps :
173+ - uses : actions/checkout@v4
174+ - uses : actions/setup-python@v5
175+ with :
176+ python-version : ' 3.11'
177+ - name : Build with JIT enabled and GIL disabled
178+ run : |
179+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
180+ export PATH="$(llvm-config-18 --bindir):$PATH"
181+ ./configure --enable-experimental-jit --with-pydebug --disable-gil
182+ make all --jobs 4
183+ - name : Run tests
184+ run : |
185+ ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
0 commit comments