From 2e0df34b1ee9f534bbcc97a1198fc292ad8802d5 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Fri, 6 Nov 2026 11:47:24 -0800 Subject: [PATCH] Refresh Python versions in CI and generated workflows --- .github/workflows/ci.yml | 8 ++++---- PROVISIONING.md | 19 ++++++++++++++++--- bench_runner/templates/_benchmark.src.yml | 2 +- bench_runner/templates/_find_failures.src.yml | 2 +- bench_runner/templates/_generate.src.yml | 2 +- bench_runner/templates/_notify.src.yml | 2 +- bench_runner/templates/_pystats.src.yml | 2 +- bench_runner/templates/benchmark.src.yml | 2 +- bench_runner/templates/ci.src.yml | 2 +- pyrightconfig.json | 1 + 10 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db65e57a..99c37e65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Install dependencies run: python -m pip install .[test] @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.11", "3.12", "3.13"] + python_version: ["3.11", "3.12", "3.13", "3.14", "3.15"] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: 3.13 + python-version: "3.15" cache: pip - name: install dependencies run: | @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: 3.13 + python-version: "3.15" cache: pip - name: install dependencies run: | diff --git a/PROVISIONING.md b/PROVISIONING.md index 17edd766..a92a96ee 100644 --- a/PROVISIONING.md +++ b/PROVISIONING.md @@ -2,6 +2,12 @@ This document describes how to set up machines to serve as self-hosted runners for `bench_runner`. +The Python interpreter running `bench_runner` must be Python 3.11 or later. +The generated Linux x86-64 benchmark jobs and pystats jobs request Python 3.15 +through `actions/setup-python`. Other benchmark jobs use `python` on Linux, +`python3` on macOS, or `py` on Windows; these commands must select a supported +interpreter for the runner service account. + These instructions are only a WFM™ rough guide: This is the sort of information that gets out of date rather quickly. While cloud VMs will *work*, we highly recommend using bare metal machines for the most stable results. @@ -19,7 +25,9 @@ sudo apt install python3 build-essential ccache gdb lcov pkg-config \ lzma lzma-dev tk-dev uuid-dev zlib1g-dev linux-perf ``` -The self-hosted runner needs to have `python` be Python 3.9 or later. +Install Python 3.11 or later with `pip` and `venv` support, and make sure `python` +selects it on the runner service's `PATH`. Verify this with +`python --version` as the account that runs the service. ### Enable ccache @@ -57,9 +65,12 @@ eval "$(/opt/homebrew/bin/brew shellenv)" #### Install brew packages ```bash session -brew install openssl jq python@3.9 coreutils ccache +brew install openssl jq python coreutils ccache ``` +An existing Python 3.11 or later installation is also supported. Make sure +`python3 --version` selects a supported version as the account running the runner service. + ## Microsoft Windows ### Adjust settings and permissions @@ -86,7 +97,9 @@ Install [git for Windows](https://git-scm.com/download/win). ### Install Python -Install Python 3.9 or later from [python.org](https://python.org), and install for all users. +Install Python 3.11 or later from [python.org](https://python.org), and make it +available to the account running the runner service. Verify that `py --version` +selects a supported version for that account. ### Install Clang 19 diff --git a/bench_runner/templates/_benchmark.src.yml b/bench_runner/templates/_benchmark.src.yml index f97dee05..5593d301 100644 --- a/bench_runner/templates/_benchmark.src.yml +++ b/bench_runner/templates/_benchmark.src.yml @@ -109,7 +109,7 @@ jobs: if: ${{ runner.arch == 'X64' }} uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.15" - name: Building Python and running pyperformance run: | python workflow_bootstrap.py ${{ inputs.fork }} ${{ inputs.ref }} ${{ inputs.machine }} ${{ inputs.benchmarks || 'all' }} ${{ env.flags }} ${{ inputs.force && '--force' || '' }} ${{ inputs.pgo && '--pgo' || '' }} ${{ inputs.perf && '--perf' || '' }} --run_id ${{ github.run_id }} diff --git a/bench_runner/templates/_find_failures.src.yml b/bench_runner/templates/_find_failures.src.yml index b2346454..c6146c0e 100644 --- a/bench_runner/templates/_find_failures.src.yml +++ b/bench_runner/templates/_find_failures.src.yml @@ -15,7 +15,7 @@ jobs: - name: Setup system Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Install dependencies from PyPI run: python -m pip install -r requirements.txt diff --git a/bench_runner/templates/_generate.src.yml b/bench_runner/templates/_generate.src.yml index 2f4e4c8c..800e2a54 100644 --- a/bench_runner/templates/_generate.src.yml +++ b/bench_runner/templates/_generate.src.yml @@ -39,7 +39,7 @@ jobs: - name: Setup system Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Install dependencies from PyPI run: python -m pip install -r requirements.txt diff --git a/bench_runner/templates/_notify.src.yml b/bench_runner/templates/_notify.src.yml index 7aa68421..06078aac 100644 --- a/bench_runner/templates/_notify.src.yml +++ b/bench_runner/templates/_notify.src.yml @@ -27,7 +27,7 @@ jobs: - name: Setup system Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Install dependencies from PyPI run: | diff --git a/bench_runner/templates/_pystats.src.yml b/bench_runner/templates/_pystats.src.yml index 8a91278d..948a7d54 100644 --- a/bench_runner/templates/_pystats.src.yml +++ b/bench_runner/templates/_pystats.src.yml @@ -49,7 +49,7 @@ jobs: - name: Setup system Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.15" - name: Build CPython and run pyperformance benchmarks run: | python workflow_bootstrap.py --pystats ${{ inputs.fork }} ${{ inputs.ref }} all ${{ inputs.benchmarks || 'all' }} ${{ env.flags }} --run_id ${{ github.run_id }} diff --git a/bench_runner/templates/benchmark.src.yml b/bench_runner/templates/benchmark.src.yml index 9ee61f9d..7dd17eb3 100644 --- a/bench_runner/templates/benchmark.src.yml +++ b/bench_runner/templates/benchmark.src.yml @@ -52,7 +52,7 @@ jobs: - name: Setup system Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Checkout CPython uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/bench_runner/templates/ci.src.yml b/bench_runner/templates/ci.src.yml index 9531f946..98d59540 100644 --- a/bench_runner/templates/ci.src.yml +++ b/bench_runner/templates/ci.src.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.11" + python-version: "3.x" cache: pip - name: Install dependencies run: | diff --git a/pyrightconfig.json b/pyrightconfig.json index bc10f640..45aed1d7 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,3 +1,4 @@ { + "pythonVersion": "3.11", "useLibraryCodeForTypes": false }