From ce2c0ca1fc736f9be8bba7b0df74fd76e89d1457 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 13:33:39 -0800 Subject: [PATCH 1/5] Paths, use env var --- .github/workflows/jit.yml | 53 ++++++++++----------------------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index cd6e9875d282d2..5c9a6790d438bf 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -1,7 +1,7 @@ name: JIT on: pull_request: - paths: + paths: &paths - '**jit**' - 'Python/bytecodes.c' - 'Python/optimizer*.c' @@ -12,16 +12,7 @@ on: - '!**/*.md' - '!**/*.ini' push: - paths: - - '**jit**' - - 'Python/bytecodes.c' - - 'Python/optimizer*.c' - - 'Python/executor_cases.c.h' - - 'Python/optimizer_cases.c.h' - - '**_testinternalcapi**' - - '!Python/perf_jit_trampoline.c' - - '!**/*.md' - - '!**/*.ini' + paths: *paths workflow_dispatch: permissions: @@ -33,6 +24,7 @@ concurrency: env: FORCE_COLOR: 1 + LLVM_VERSION: 21 jobs: interpreter: @@ -58,19 +50,9 @@ jobs: strategy: fail-fast: false matrix: - target: - - i686-pc-windows-msvc/msvc - - x86_64-pc-windows-msvc/msvc - - aarch64-pc-windows-msvc/msvc - - x86_64-apple-darwin/clang - - aarch64-apple-darwin/clang - - x86_64-unknown-linux-gnu/gcc - - aarch64-unknown-linux-gnu/gcc debug: - true - false - llvm: - - 21 include: - target: i686-pc-windows-msvc/msvc architecture: Win32 @@ -112,7 +94,7 @@ jobs: if: runner.os == 'macOS' run: | brew update - brew install llvm@${{ matrix.llvm }} + brew install llvm@${{ env.LLVM_VERSION }} export SDKROOT="$(xcrun --show-sdk-path)" # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to # make sure we don't break downstream distributors (like uv): @@ -125,8 +107,8 @@ jobs: - name: Linux if: runner.os == 'Linux' run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} - export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} + export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }} make all --jobs 4 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 @@ -138,9 +120,6 @@ jobs: timeout-minutes: 90 strategy: fail-fast: false - matrix: - llvm: - - 21 steps: - uses: actions/checkout@v6 with: @@ -150,8 +129,8 @@ jobs: python-version: '3.11' - name: Build with JIT enabled and GIL disabled run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} - export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} + export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" ./configure --enable-experimental-jit --with-pydebug --disable-gil make all --jobs 4 - name: Run tests @@ -166,9 +145,6 @@ jobs: timeout-minutes: 90 strategy: fail-fast: false - matrix: - llvm: - - 21 steps: - uses: actions/checkout@v6 with: @@ -178,8 +154,8 @@ jobs: python-version: '3.11' - name: Build with JIT run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} - export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} + export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" ./configure --enable-experimental-jit --with-pydebug make all --jobs 4 - name: Run tests without optimizations @@ -193,9 +169,6 @@ jobs: timeout-minutes: 90 strategy: fail-fast: false - matrix: - llvm: - - 21 steps: - uses: actions/checkout@v6 with: @@ -205,7 +178,7 @@ jobs: python-version: '3.11' - name: Build with JIT and tailcall run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} - export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" - CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} + export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" + CC=clang-${{ env.LLVM_VERSION }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug make all --jobs 4 From e95dde96fd59ba04f37a1d0fe9eec390069a97d0 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 13:46:07 -0800 Subject: [PATCH 2/5] Remove fail fast --- .github/workflows/jit.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 5c9a6790d438bf..fb9977f14fc243 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -118,8 +118,6 @@ jobs: needs: interpreter runs-on: ubuntu-24.04 timeout-minutes: 90 - strategy: - fail-fast: false steps: - uses: actions/checkout@v6 with: @@ -143,8 +141,6 @@ jobs: needs: interpreter runs-on: ubuntu-24.04 timeout-minutes: 90 - strategy: - fail-fast: false steps: - uses: actions/checkout@v6 with: @@ -167,8 +163,6 @@ jobs: needs: interpreter runs-on: ubuntu-24.04 timeout-minutes: 90 - strategy: - fail-fast: false steps: - uses: actions/checkout@v6 with: From 264adc191166c95a090686494284162a6e4a6b48 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 14:07:23 -0800 Subject: [PATCH 3/5] Consolidate JIT one off jobs --- .github/workflows/jit.yml | 73 ++++++++++++++------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index fb9977f14fc243..b36bf06378487c 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -113,11 +113,28 @@ jobs: make all --jobs 4 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - jit-with-disabled-gil: - name: Free-Threaded (Debug) + jit-linux-extras: + name: ${{ matrix.name }} needs: interpreter runs-on: ubuntu-24.04 timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - name: Free-Threaded (Debug) + configure_flags: --enable-experimental-jit --with-pydebug --disable-gil + test_env: "" + continue_on_error: true + - name: JIT without optimizations (Debug) + configure_flags: --enable-experimental-jit --with-pydebug + test_env: "PYTHON_UOPS_OPTIMIZE=0" + continue_on_error: false + - name: JIT with tail calling interpreter + configure_flags: --enable-experimental-jit --with-tail-call-interp --with-pydebug + use_clang: true + test_env: "" + continue_on_error: false steps: - uses: actions/checkout@v6 with: @@ -125,54 +142,16 @@ jobs: - uses: actions/setup-python@v6 with: python-version: '3.11' - - name: Build with JIT enabled and GIL disabled + - name: Build run: | sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" - ./configure --enable-experimental-jit --with-pydebug --disable-gil + if [ "${{ matrix.use_clang }}" = "true" ]; then + export CC=clang-${{ env.LLVM_VERSION }} + fi + ./configure ${{ matrix.configure_flags }} make all --jobs 4 - name: Run tests run: | - ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - continue-on-error: true - - no-opt-jit: - name: JIT without optimizations (Debug) - needs: interpreter - runs-on: ubuntu-24.04 - timeout-minutes: 90 - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-python@v6 - with: - python-version: '3.11' - - name: Build with JIT - run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} - export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" - ./configure --enable-experimental-jit --with-pydebug - make all --jobs 4 - - name: Run tests without optimizations - run: | - PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - - tail-call-jit: - name: JIT with tail calling interpreter - needs: interpreter - runs-on: ubuntu-24.04 - timeout-minutes: 90 - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-python@v6 - with: - python-version: '3.11' - - name: Build with JIT and tailcall - run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }} - export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH" - CC=clang-${{ env.LLVM_VERSION }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug - make all --jobs 4 + ${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 + continue-on-error: ${{ matrix.continue_on_error }} From 399b7e821e3a7e1123d8733f87e21a9c1f86ba5c Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 14:19:22 -0800 Subject: [PATCH 4/5] Remove defaults and add condition for tail call --- .github/workflows/jit.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index b36bf06378487c..ebba86741025db 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -124,17 +124,14 @@ jobs: include: - name: Free-Threaded (Debug) configure_flags: --enable-experimental-jit --with-pydebug --disable-gil - test_env: "" continue_on_error: true - name: JIT without optimizations (Debug) configure_flags: --enable-experimental-jit --with-pydebug test_env: "PYTHON_UOPS_OPTIMIZE=0" - continue_on_error: false - name: JIT with tail calling interpreter configure_flags: --enable-experimental-jit --with-tail-call-interp --with-pydebug use_clang: true - test_env: "" - continue_on_error: false + run_tests: false steps: - uses: actions/checkout@v6 with: @@ -152,6 +149,7 @@ jobs: ./configure ${{ matrix.configure_flags }} make all --jobs 4 - name: Run tests + if: matrix.run_tests != false run: | ${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 continue-on-error: ${{ matrix.continue_on_error }} From 9d10edc75d5a7190e1a63e6e168da3c64499aa12 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sat, 7 Feb 2026 14:41:17 -0800 Subject: [PATCH 5/5] Add target back to get target x debug --- .github/workflows/jit.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index ebba86741025db..cf0dc472eda7d4 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -50,6 +50,14 @@ jobs: strategy: fail-fast: false matrix: + target: + - i686-pc-windows-msvc/msvc + - x86_64-pc-windows-msvc/msvc + - aarch64-pc-windows-msvc/msvc + - x86_64-apple-darwin/clang + - aarch64-apple-darwin/clang + - x86_64-unknown-linux-gnu/gcc + - aarch64-unknown-linux-gnu/gcc debug: - true - false