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
@@ -22,13 +29,14 @@ jobs:
2229 jit :
2330 name : ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
2431 runs-on : ${{ matrix.runner }}
25- timeout-minutes : 60
32+ timeout-minutes : 90
2633 strategy :
2734 fail-fast : false
2835 matrix :
2936 target :
3037 - i686-pc-windows-msvc/msvc
3138 - x86_64-pc-windows-msvc/msvc
39+ - aarch64-pc-windows-msvc/msvc
3240 - x86_64-apple-darwin/clang
3341 - aarch64-apple-darwin/clang
3442 - x86_64-unknown-linux-gnu/gcc
3947 - true
4048 - false
4149 llvm :
42- - 16
50+ - 18
4351 include :
4452 - target : i686-pc-windows-msvc/msvc
4553 architecture : Win32
4957 architecture : x64
5058 runner : windows-latest
5159 compiler : msvc
60+ - target : aarch64-pc-windows-msvc/msvc
61+ architecture : ARM64
62+ runner : windows-latest
63+ compiler : msvc
5264 - target : x86_64-apple-darwin/clang
5365 architecture : x86_64
5466 runner : macos-13
@@ -69,14 +81,10 @@ jobs:
6981 architecture : aarch64
7082 runner : ubuntu-latest
7183 compiler : gcc
72- # These fail because of emulation, not because of the JIT:
73- 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
7484 - target : aarch64-unknown-linux-gnu/clang
7585 architecture : aarch64
7686 runner : ubuntu-latest
7787 compiler : clang
78- # These fail because of emulation, not because of the JIT:
79- 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
8088 env :
8189 CC : ${{ matrix.compiler }}
8290 steps :
@@ -85,33 +93,46 @@ jobs:
8593 with :
8694 python-version : ' 3.11'
8795
88- - name : Windows
89- if : runner.os == 'Windows'
96+ - name : Native Windows
97+ if : runner.os == 'Windows' && matrix.architecture != 'ARM64'
9098 run : |
99+ choco upgrade llvm -y
91100 choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
92101 ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
93- ./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
102+ ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
103+
104+ # No PGO or tests (yet):
105+ - name : Emulated Windows
106+ if : runner.os == 'Windows' && matrix.architecture == 'ARM64'
107+ run : |
108+ choco upgrade llvm -y
109+ choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
110+ ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
94111
95- - name : macOS
112+ - name : Native macOS
96113 if : runner.os == 'macOS'
97114 run : |
115+ brew update
98116 brew install llvm@${{ matrix.llvm }}
99- export SDKROOT="$(xcrun --show-sdk-path)"
100- ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
117+ SDKROOT="$(xcrun --show-sdk-path)" \
118+ ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
101119 make all --jobs 4
102- ./python.exe -m test --exclude ${{ matrix.exclude }} -- multiprocess 0 --timeout 3600 --verbose2 --verbose3
120+ ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
103121
122+ # --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)
104123 - name : Native Linux
105124 if : runner.os == 'Linux' && matrix.architecture == 'x86_64'
106125 run : |
107126 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
108127 export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
109- ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto ' }}
128+ ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations' }}
110129 make all --jobs 4
111- ./python -m test --exclude ${{ matrix.exclude }} -- multiprocess 0 --timeout 3600 --verbose2 --verbose3
130+ ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
112131
132+ # --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)
113133 - name : Emulated Linux
114134 if : runner.os == 'Linux' && matrix.architecture != 'x86_64'
135+ # The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
115136 run : |
116137 sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
117138 export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
@@ -122,10 +143,10 @@ jobs:
122143 sudo apt install --yes "gcc-$HOST" qemu-user
123144 ${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
124145 ${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
125- export CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}"
126- export CPP="$CC --preprocess"
127- export HOSTRUNNER=qemu-${{ matrix.architecture }}
128146 export QEMU_LD_PREFIX="/usr/$HOST"
129- ./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
147+ CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
148+ CPP="$CC --preprocess" \
149+ HOSTRUNNER=qemu-${{ matrix.architecture }} \
150+ ./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
130151 make all --jobs 4
131- ./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
152+ ./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
0 commit comments