|
| 1 | +name: JIT |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + paths: '**jit**' |
| 5 | + push: |
| 6 | + paths: '**jit**' |
| 7 | + workflow_dispatch: |
| 8 | +jobs: |
| 9 | + jit: |
| 10 | + name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }}) |
| 11 | + runs-on: ${{ matrix.runner }} |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + target: |
| 16 | + - i686-pc-windows-msvc/msvc |
| 17 | + - x86_64-pc-windows-msvc/msvc |
| 18 | + - x86_64-apple-darwin/clang |
| 19 | + - x86_64-unknown-linux-gnu/gcc |
| 20 | + - x86_64-unknown-linux-gnu/clang |
| 21 | + - aarch64-unknown-linux-gnu/gcc |
| 22 | + - aarch64-unknown-linux-gnu/clang |
| 23 | + debug: |
| 24 | + - true |
| 25 | + - false |
| 26 | + llvm: |
| 27 | + - 16 |
| 28 | + include: |
| 29 | + - target: i686-pc-windows-msvc/msvc |
| 30 | + architecture: Win32 |
| 31 | + runner: windows-latest |
| 32 | + compiler: msvc |
| 33 | + - target: x86_64-pc-windows-msvc/msvc |
| 34 | + architecture: x64 |
| 35 | + runner: windows-latest |
| 36 | + compiler: msvc |
| 37 | + - target: x86_64-apple-darwin/clang |
| 38 | + architecture: x86_64 |
| 39 | + runner: macos-latest |
| 40 | + compiler: clang |
| 41 | + exclude: test_embed |
| 42 | + - target: x86_64-unknown-linux-gnu/gcc |
| 43 | + architecture: x86_64 |
| 44 | + runner: ubuntu-latest |
| 45 | + compiler: gcc |
| 46 | + - target: x86_64-unknown-linux-gnu/clang |
| 47 | + architecture: x86_64 |
| 48 | + runner: ubuntu-latest |
| 49 | + compiler: clang |
| 50 | + - target: aarch64-unknown-linux-gnu/gcc |
| 51 | + architecture: aarch64 |
| 52 | + runner: ubuntu-latest |
| 53 | + compiler: gcc |
| 54 | + # These fail because of emulation, not because of the JIT: |
| 55 | + 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 |
| 56 | + - target: aarch64-unknown-linux-gnu/clang |
| 57 | + architecture: aarch64 |
| 58 | + runner: ubuntu-latest |
| 59 | + compiler: clang |
| 60 | + # These fail because of emulation, not because of the JIT: |
| 61 | + 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 |
| 62 | + env: |
| 63 | + CC: ${{ matrix.compiler }} |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + - uses: actions/setup-python@v5 |
| 67 | + with: |
| 68 | + python-version: '3.11' |
| 69 | + |
| 70 | + - name: Windows |
| 71 | + if: runner.os == 'Windows' |
| 72 | + run: | |
| 73 | + choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }} |
| 74 | + ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }} |
| 75 | + ./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3 |
| 76 | +
|
| 77 | + - name: macOS |
| 78 | + if: runner.os == 'macOS' |
| 79 | + run: | |
| 80 | + brew install llvm@${{ matrix.llvm }} |
| 81 | + export SDKROOT="$(xcrun --show-sdk-path)" |
| 82 | + ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }} |
| 83 | + make all --jobs 3 |
| 84 | + ./python.exe -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3 |
| 85 | +
|
| 86 | + - name: Native Linux |
| 87 | + if: runner.os == 'Linux' && matrix.architecture == 'x86_64' |
| 88 | + run: | |
| 89 | + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} |
| 90 | + export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" |
| 91 | + ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }} |
| 92 | + make all --jobs 4 |
| 93 | + ./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3 |
| 94 | + - name: Emulated Linux |
| 95 | + if: runner.os == 'Linux' && matrix.architecture != 'x86_64' |
| 96 | + run: | |
| 97 | + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} |
| 98 | + export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" |
| 99 | + ./configure --prefix="$(pwd)/../build" |
| 100 | + make install --jobs 4 |
| 101 | + make clean --jobs 4 |
| 102 | + export HOST=${{ matrix.architecture }}-linux-gnu |
| 103 | + sudo apt install --yes "gcc-$HOST" qemu-user |
| 104 | + ${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }} |
| 105 | + ${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }} |
| 106 | + export CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" |
| 107 | + export CPP="$CC --preprocess" |
| 108 | + export HOSTRUNNER=qemu-${{ matrix.architecture }} |
| 109 | + export QEMU_LD_PREFIX="/usr/$HOST" |
| 110 | + ./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 |
| 111 | + make all --jobs 4 |
| 112 | + ./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3 |
0 commit comments