From 26888b851eedcba05bf77ab45b96607f8b954b7a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 15:32:35 +0200 Subject: [PATCH 1/7] gh-152785: [WIP] Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions Update .github/actionlint.yaml to allow ubuntu-26.04 and ubuntu-26.04-arm images. --- .github/actionlint.yaml | 7 +++++++ .github/workflows/build.yml | 20 ++++++++++---------- .github/workflows/jit.yml | 8 ++++---- .github/workflows/posix-deps-apt.sh | 3 +-- .github/workflows/reusable-docs.yml | 2 +- .github/workflows/reusable-emscripten.yml | 2 +- .github/workflows/reusable-san.yml | 2 +- .github/workflows/reusable-wasi.yml | 2 +- .github/workflows/tail-call.yml | 6 +++--- 9 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index eacfff24889021b..61ee08db9919bb9 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,5 +1,12 @@ config-variables: null +# Pending release of actionlint > 1.7.12 for ubuntu-26.04* support: +# https://github.com/rhysd/actionlint/pull/683 +self-hosted-runner: + labels: + - ubuntu-26.04 + - ubuntu-26.04-arm + paths: .github/workflows/**/*.yml: ignore: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ef98f556cb205b..59b0361b192c9d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: name: 'Check if Autoconf files are up to date' # Don't use ubuntu-latest but a specific version to make the job # reproducible: to get the same tools versions (autoconf, aclocal, ...) - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 container: image: ghcr.io/python/autoconf:2025.01.02.12581854023 timeout-minutes: 60 @@ -96,7 +96,7 @@ jobs: name: 'Check if generated files are up to date' # Don't use ubuntu-latest but a specific version to make the job # reproducible: to get the same tools versions (autoconf, aclocal, ...) - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 needs: build-context if: needs.build-context.outputs.run-tests == 'true' @@ -239,18 +239,18 @@ jobs: - false - true os: - - ubuntu-24.04 - - ubuntu-24.04-arm + - ubuntu-26.04 + - ubuntu-26.04-arm exclude: # Do not test BOLT with free-threading, to conserve resources - bolt: true free-threading: true # BOLT currently crashes during instrumentation on aarch64 - - os: ubuntu-24.04-arm + - os: ubuntu-26.04-arm bolt: true include: # Enable CPU-intensive tests on ARM (default build only) - - os: ubuntu-24.04-arm + - os: ubuntu-26.04-arm bolt: false free-threading: false test-opts: '-u cpu' @@ -270,7 +270,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04] + os: [ubuntu-26.04] ssllib: # See Tools/ssl/make_ssl_data.py for notes on adding a new version ## OpenSSL @@ -346,7 +346,7 @@ jobs: - arch: aarch64 runs-on: macos-26 - arch: x86_64 - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 runs-on: ${{ matrix.runs-on }} steps: @@ -393,7 +393,7 @@ jobs: test-hypothesis: name: "Hypothesis tests on Ubuntu" - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 needs: build-context if: needs.build-context.outputs.run-ubuntu == 'true' @@ -504,7 +504,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04] + os: [ubuntu-26.04] env: OPENSSL_VER: 3.5.7 PYTHONSTRICTEXTENSIONBUILD: 1 diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 846c90d2525d253..f7fbadbc7a9e105 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -29,7 +29,7 @@ env: jobs: interpreter: name: Interpreter (Debug) - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -145,9 +145,9 @@ jobs: - false include: - target: x86_64-unknown-linux-gnu/gcc - runner: ubuntu-24.04 + runner: ubuntu-26.04 - target: aarch64-unknown-linux-gnu/gcc - runner: ubuntu-24.04-arm + runner: ubuntu-26.04-arm steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: @@ -171,7 +171,7 @@ jobs: linux-extras: name: ${{ matrix.name }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 strategy: fail-fast: false diff --git a/.github/workflows/posix-deps-apt.sh b/.github/workflows/posix-deps-apt.sh index f241fccdeb2a32a..02628ba9058a6af 100755 --- a/.github/workflows/posix-deps-apt.sh +++ b/.github/workflows/posix-deps-apt.sh @@ -5,6 +5,7 @@ apt-get -yq --no-install-recommends install \ build-essential \ pkg-config \ cmake \ + curl \ gdb \ lcov \ libb2-dev \ @@ -18,8 +19,6 @@ apt-get -yq --no-install-recommends install \ libsqlite3-dev \ libssl-dev \ libzstd-dev \ - lzma \ - lzma-dev \ strace \ tk-dev \ uuid-dev \ diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index cac481d26a8d0cc..a792553a63b8bab 100644 --- a/.github/workflows/reusable-docs.yml +++ b/.github/workflows/reusable-docs.yml @@ -95,7 +95,7 @@ jobs: # Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release doctest: name: 'Doctest' - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/reusable-emscripten.yml b/.github/workflows/reusable-emscripten.yml index 46664522aa6d793..0205203ef77a9f5 100644 --- a/.github/workflows/reusable-emscripten.yml +++ b/.github/workflows/reusable-emscripten.yml @@ -12,7 +12,7 @@ env: jobs: build-emscripten-reusable: name: 'build and test' - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 40 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/reusable-san.yml b/.github/workflows/reusable-san.yml index d29f4e83b48dac8..0ffc349320aa790 100644 --- a/.github/workflows/reusable-san.yml +++ b/.github/workflows/reusable-san.yml @@ -26,7 +26,7 @@ jobs: && ' (free-threading)' || '' }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/reusable-wasi.yml b/.github/workflows/reusable-wasi.yml index 9675c39b86a24c4..b0dda62d0b291c2 100644 --- a/.github/workflows/reusable-wasi.yml +++ b/.github/workflows/reusable-wasi.yml @@ -12,7 +12,7 @@ env: jobs: build-wasi-reusable: name: 'build and test' - runs-on: ubuntu-24.04-arm + runs-on: ubuntu-26.04-arm timeout-minutes: 60 env: WASMTIME_VERSION: 38.0.3 diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index f5b174d87d84486..9f6b2066f59467d 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -66,13 +66,13 @@ jobs: matrix: include: - target: x86_64-unknown-linux-gnu/gcc - runner: ubuntu-24.04 + runner: ubuntu-26.04 configure_flags: --with-pydebug - target: x86_64-unknown-linux-gnu/gcc-free-threading - runner: ubuntu-24.04 + runner: ubuntu-26.04 configure_flags: --disable-gil - target: aarch64-unknown-linux-gnu/gcc - runner: ubuntu-24.04-arm + runner: ubuntu-26.04-arm configure_flags: --with-pydebug steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 From 38d60deae7114f0e349488b22294c25b6c8bb427 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 15:34:32 +0200 Subject: [PATCH 2/7] [HACK] Touch C code to trigger GHA jobs --- Python/bytecodes.c | 1 + Python/getcompiler.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 6d5ae1b074db5b7..5175556d1ee6c74 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -6,6 +6,7 @@ // The actual instruction definitions start at // BEGIN BYTECODES //. // See Tools/cases_generator/README.md for more information. + #include "Python.h" #include "pycore_abstract.h" // _PyIndex_Check() #include "pycore_audit.h" // _PySys_Audit() diff --git a/Python/getcompiler.c b/Python/getcompiler.c index cc56ad8c8955513..1381a278f801494 100644 --- a/Python/getcompiler.c +++ b/Python/getcompiler.c @@ -24,6 +24,7 @@ #endif /* !COMPILER */ + const char * Py_GetCompiler(void) { From 1501350d7ebdfb1807b709b7f1a53474a19c0ebf Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 15:37:41 +0200 Subject: [PATCH 3/7] Use Ubuntu 26.04 package for libmpdec-dev No longer install build+install libmpdec-dev from tarball. --- .github/workflows/posix-deps-apt.sh | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/posix-deps-apt.sh b/.github/workflows/posix-deps-apt.sh index 02628ba9058a6af..803204635abfe11 100755 --- a/.github/workflows/posix-deps-apt.sh +++ b/.github/workflows/posix-deps-apt.sh @@ -11,9 +11,10 @@ apt-get -yq --no-install-recommends install \ libb2-dev \ libbz2-dev \ libffi-dev \ - libgdbm-dev \ libgdbm-compat-dev \ + libgdbm-dev \ liblzma-dev \ + libmpdec-dev \ libncurses5-dev \ libreadline6-dev \ libsqlite3-dev \ @@ -24,17 +25,3 @@ apt-get -yq --no-install-recommends install \ uuid-dev \ xvfb \ zlib1g-dev - -# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal -# from source. ppa:ondrej/php (launchpad.net) are unreliable -# (https://status.canonical.com) so fetch the tarball directly -# from the upstream host. -# https://www.bytereef.org/mpdecimal/ -MPDECIMAL_VERSION=4.0.1 -curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \ - | tar -xz -C /tmp -(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \ - && ./configure --prefix=/usr/local \ - && make -j"$(nproc)" \ - && make install) -ldconfig From 5f379bd984b963c1f63a8597a68ccecce795b6d9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 15:42:10 +0200 Subject: [PATCH 4/7] Replace ubuntu-latest with ubuntu-26.04 ubuntu-latest is currently Ubuntu 24.04. --- .github/workflows/add-issue-header.yml | 2 +- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/new-bugs-announce-notifier.yml | 2 +- .github/workflows/require-pr-label.yml | 4 ++-- .github/workflows/reusable-check-c-api-docs.yml | 2 +- .github/workflows/reusable-check-html-ids.yml | 2 +- .github/workflows/reusable-cifuzz.yml | 2 +- .github/workflows/reusable-context.yml | 2 +- .github/workflows/reusable-docs.yml | 4 ++-- .github/workflows/stale.yml | 2 +- .github/workflows/verify-ensurepip-wheels.yml | 2 +- .github/workflows/verify-expat.yml | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/add-issue-header.yml b/.github/workflows/add-issue-header.yml index 09da61a470ff959..888c62d998b2066 100644 --- a/.github/workflows/add-issue-header.yml +++ b/.github/workflows/add-issue-header.yml @@ -17,7 +17,7 @@ permissions: jobs: add-header: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: issues: write timeout-minutes: 5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59b0361b192c9d9..65d24a842c80433 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -568,7 +568,7 @@ jobs: cross-build-linux: name: Cross build Linux - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 60 needs: build-context if: needs.build-context.outputs.run-ubuntu == 'true' @@ -650,7 +650,7 @@ jobs: all-required-green: # This job does nothing and is only used for the branch protection name: All required checks pass - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 5 needs: - build-context # Transitive dependency, needed to access `run-tests` value diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a79ea20d5f50bc..885c1e875741580 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ concurrency: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 10 steps: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 3cdce4f5952e3d0..54706b84f80bd93 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -49,7 +49,7 @@ concurrency: jobs: mypy: name: Run mypy on ${{ matrix.target }} - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 10 strategy: fail-fast: false diff --git a/.github/workflows/new-bugs-announce-notifier.yml b/.github/workflows/new-bugs-announce-notifier.yml index 9c19adb7ffda707..62a5b2793a55555 100644 --- a/.github/workflows/new-bugs-announce-notifier.yml +++ b/.github/workflows/new-bugs-announce-notifier.yml @@ -10,7 +10,7 @@ permissions: jobs: notify-new-bugs-announce: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: issues: read timeout-minutes: 10 diff --git a/.github/workflows/require-pr-label.yml b/.github/workflows/require-pr-label.yml index f3e2666879530f9..4e42e9108599804 100644 --- a/.github/workflows/require-pr-label.yml +++ b/.github/workflows/require-pr-label.yml @@ -11,7 +11,7 @@ jobs: label-dnm: name: DO-NOT-MERGE if: github.repository_owner == 'python' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: pull-requests: read timeout-minutes: 10 @@ -28,7 +28,7 @@ jobs: label-reviews: name: Unresolved review if: github.repository_owner == 'python' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: pull-requests: read timeout-minutes: 10 diff --git a/.github/workflows/reusable-check-c-api-docs.yml b/.github/workflows/reusable-check-c-api-docs.yml index db030c80008b1ed..d245065b304f079 100644 --- a/.github/workflows/reusable-check-c-api-docs.yml +++ b/.github/workflows/reusable-check-c-api-docs.yml @@ -12,7 +12,7 @@ env: jobs: check-c-api-docs: name: 'Check if all C APIs are documented' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 5 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/reusable-check-html-ids.yml b/.github/workflows/reusable-check-html-ids.yml index 41ba1288be1ecf4..42852b4109a38aa 100644 --- a/.github/workflows/reusable-check-html-ids.yml +++ b/.github/workflows/reusable-check-html-ids.yml @@ -12,7 +12,7 @@ env: jobs: check-html-ids: name: 'Check for removed HTML IDs' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 30 steps: - name: 'Check out PR head' diff --git a/.github/workflows/reusable-cifuzz.yml b/.github/workflows/reusable-cifuzz.yml index 0d02232686339bf..e22ef43006a08db 100644 --- a/.github/workflows/reusable-cifuzz.yml +++ b/.github/workflows/reusable-cifuzz.yml @@ -19,7 +19,7 @@ permissions: jobs: cifuzz: name: ${{ inputs.oss-fuzz-project-name }} (${{ inputs.sanitizer }}) - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 60 steps: - name: Build fuzzers (${{ inputs.sanitizer }}) diff --git a/.github/workflows/reusable-context.yml b/.github/workflows/reusable-context.yml index 6595aef0377e500..47cf4762f94b878 100644 --- a/.github/workflows/reusable-context.yml +++ b/.github/workflows/reusable-context.yml @@ -60,7 +60,7 @@ permissions: jobs: compute-changes: name: Create context from changed files - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 10 outputs: run-android: ${{ steps.changes.outputs.run-android }} diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index a792553a63b8bab..2a81d7707fe1683 100644 --- a/.github/workflows/reusable-docs.yml +++ b/.github/workflows/reusable-docs.yml @@ -17,7 +17,7 @@ env: jobs: build-doc: name: 'Docs' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 60 env: branch_base: 'origin/${{ github.event.pull_request.base.ref }}' @@ -121,7 +121,7 @@ jobs: check-epub: name: 'Check EPUB' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 30 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 37f78519dedc329..bb1ac5940de4031 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ permissions: jobs: stale: if: github.repository_owner == 'python' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 permissions: actions: write pull-requests: write diff --git a/.github/workflows/verify-ensurepip-wheels.yml b/.github/workflows/verify-ensurepip-wheels.yml index 7def8c9e78abb8d..6f75718ac4cd08f 100644 --- a/.github/workflows/verify-ensurepip-wheels.yml +++ b/.github/workflows/verify-ensurepip-wheels.yml @@ -22,7 +22,7 @@ concurrency: jobs: verify: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 10 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/verify-expat.yml b/.github/workflows/verify-expat.yml index bae93a4d9ac0a2b..adf074fc642043e 100644 --- a/.github/workflows/verify-expat.yml +++ b/.github/workflows/verify-expat.yml @@ -20,7 +20,7 @@ concurrency: jobs: verify: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 timeout-minutes: 5 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 From e6e0953b882568ce2ddd2ca393dd3d08acc85034 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 16:15:05 +0200 Subject: [PATCH 5/7] No longer run https://apt.llvm.org/llvm.sh The ubuntu-26.04 image already provides required LLVM 21. --- .github/workflows/jit.yml | 6 ++---- .github/workflows/reusable-san.yml | 9 +-------- .github/workflows/reusable-ubuntu.yml | 2 +- .github/workflows/tail-call.yml | 3 +-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index f7fbadbc7a9e105..955721e0b94ea53 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -160,8 +160,7 @@ jobs: sudo ./.github/workflows/posix-deps-apt.sh - 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" + # On ubuntu-26.04 image, clang is clang-21 by default ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }} make all --jobs 4 - name: Test @@ -202,8 +201,7 @@ jobs: sudo ./.github/workflows/posix-deps-apt.sh - 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" + # On ubuntu-26.04 image, clang is clang-21 by default if [ "${{ matrix.use_clang }}" = "true" ]; then export CC=clang-${{ env.LLVM_VERSION }} fi diff --git a/.github/workflows/reusable-san.yml b/.github/workflows/reusable-san.yml index 0ffc349320aa790..405fa36454a62bf 100644 --- a/.github/workflows/reusable-san.yml +++ b/.github/workflows/reusable-san.yml @@ -37,14 +37,7 @@ jobs: - name: Install dependencies run: | sudo ./.github/workflows/posix-deps-apt.sh - # Install clang - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 21 - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 100 - sudo update-alternatives --set clang /usr/bin/clang-21 - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 100 - sudo update-alternatives --set clang++ /usr/bin/clang++-21 + # On ubuntu-26.04 image, clang is clang-21 by default if [ "${SANITIZER}" = "TSan" ]; then # Reduce ASLR to avoid TSan crashing diff --git a/.github/workflows/reusable-ubuntu.yml b/.github/workflows/reusable-ubuntu.yml index cd810babb7a9d6e..4ecc541e6aa7d02 100644 --- a/.github/workflows/reusable-ubuntu.yml +++ b/.github/workflows/reusable-ubuntu.yml @@ -49,7 +49,7 @@ jobs: - name: Install Clang and BOLT if: ${{ fromJSON(inputs.bolt-optimizations) }} run: | - sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 21 + # On ubuntu-26.04 image, LLVM is LLVM-21 by default sudo apt-get install --no-install-recommends bolt-21 echo PATH="$(llvm-config-21 --bindir):$PATH" >> $GITHUB_ENV - name: Configure OpenSSL env vars diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 9f6b2066f59467d..f25552679c8d45c 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -83,8 +83,7 @@ jobs: python-version: '3.11' - 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" + # On ubuntu-26.04 image, clang is clang-21 by default CC=clang-${{ env.LLVM_VERSION }} ./configure --with-tail-call-interp ${{ matrix.configure_flags }} make all --jobs 4 - name: Test From 49d05f2a9511df4844e028f2203960033fe35e94 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 19:01:17 +0200 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/workflows/add-issue-header.yml | 2 +- .github/workflows/build.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/mypy.yml | 2 +- .github/workflows/require-pr-label.yml | 4 ++-- .github/workflows/reusable-check-c-api-docs.yml | 2 +- .github/workflows/reusable-check-html-ids.yml | 2 +- .github/workflows/reusable-cifuzz.yml | 2 +- .github/workflows/reusable-context.yml | 2 +- .github/workflows/reusable-docs.yml | 6 +++--- .github/workflows/stale.yml | 2 +- .github/workflows/verify-ensurepip-wheels.yml | 2 +- .github/workflows/verify-expat.yml | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/add-issue-header.yml b/.github/workflows/add-issue-header.yml index 888c62d998b2066..55095f17bb4cce9 100644 --- a/.github/workflows/add-issue-header.yml +++ b/.github/workflows/add-issue-header.yml @@ -17,7 +17,7 @@ permissions: jobs: add-header: - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim permissions: issues: write timeout-minutes: 5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65d24a842c80433..59b0361b192c9d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -568,7 +568,7 @@ jobs: cross-build-linux: name: Cross build Linux - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 60 needs: build-context if: needs.build-context.outputs.run-ubuntu == 'true' @@ -650,7 +650,7 @@ jobs: all-required-green: # This job does nothing and is only used for the branch protection name: All required checks pass - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 5 needs: - build-context # Transitive dependency, needed to access `run-tests` value diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 885c1e875741580..8a79ea20d5f50bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ concurrency: jobs: lint: - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 10 steps: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 54706b84f80bd93..3cdce4f5952e3d0 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -49,7 +49,7 @@ concurrency: jobs: mypy: name: Run mypy on ${{ matrix.target }} - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: false diff --git a/.github/workflows/require-pr-label.yml b/.github/workflows/require-pr-label.yml index 4e42e9108599804..8af254c10786e1b 100644 --- a/.github/workflows/require-pr-label.yml +++ b/.github/workflows/require-pr-label.yml @@ -11,7 +11,7 @@ jobs: label-dnm: name: DO-NOT-MERGE if: github.repository_owner == 'python' - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim permissions: pull-requests: read timeout-minutes: 10 @@ -28,7 +28,7 @@ jobs: label-reviews: name: Unresolved review if: github.repository_owner == 'python' - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim permissions: pull-requests: read timeout-minutes: 10 diff --git a/.github/workflows/reusable-check-c-api-docs.yml b/.github/workflows/reusable-check-c-api-docs.yml index d245065b304f079..db030c80008b1ed 100644 --- a/.github/workflows/reusable-check-c-api-docs.yml +++ b/.github/workflows/reusable-check-c-api-docs.yml @@ -12,7 +12,7 @@ env: jobs: check-c-api-docs: name: 'Check if all C APIs are documented' - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 5 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/reusable-check-html-ids.yml b/.github/workflows/reusable-check-html-ids.yml index 42852b4109a38aa..41ba1288be1ecf4 100644 --- a/.github/workflows/reusable-check-html-ids.yml +++ b/.github/workflows/reusable-check-html-ids.yml @@ -12,7 +12,7 @@ env: jobs: check-html-ids: name: 'Check for removed HTML IDs' - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: 'Check out PR head' diff --git a/.github/workflows/reusable-cifuzz.yml b/.github/workflows/reusable-cifuzz.yml index e22ef43006a08db..0d02232686339bf 100644 --- a/.github/workflows/reusable-cifuzz.yml +++ b/.github/workflows/reusable-cifuzz.yml @@ -19,7 +19,7 @@ permissions: jobs: cifuzz: name: ${{ inputs.oss-fuzz-project-name }} (${{ inputs.sanitizer }}) - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Build fuzzers (${{ inputs.sanitizer }}) diff --git a/.github/workflows/reusable-context.yml b/.github/workflows/reusable-context.yml index 47cf4762f94b878..6595aef0377e500 100644 --- a/.github/workflows/reusable-context.yml +++ b/.github/workflows/reusable-context.yml @@ -60,7 +60,7 @@ permissions: jobs: compute-changes: name: Create context from changed files - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 10 outputs: run-android: ${{ steps.changes.outputs.run-android }} diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index 2a81d7707fe1683..a2373df0dda7df0 100644 --- a/.github/workflows/reusable-docs.yml +++ b/.github/workflows/reusable-docs.yml @@ -17,7 +17,7 @@ env: jobs: build-doc: name: 'Docs' - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 60 env: branch_base: 'origin/${{ github.event.pull_request.base.ref }}' @@ -95,7 +95,7 @@ jobs: # Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release doctest: name: 'Doctest' - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -121,7 +121,7 @@ jobs: check-epub: name: 'Check EPUB' - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bb1ac5940de4031..0283e9f621dcf05 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ permissions: jobs: stale: if: github.repository_owner == 'python' - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim permissions: actions: write pull-requests: write diff --git a/.github/workflows/verify-ensurepip-wheels.yml b/.github/workflows/verify-ensurepip-wheels.yml index 6f75718ac4cd08f..7def8c9e78abb8d 100644 --- a/.github/workflows/verify-ensurepip-wheels.yml +++ b/.github/workflows/verify-ensurepip-wheels.yml @@ -22,7 +22,7 @@ concurrency: jobs: verify: - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 diff --git a/.github/workflows/verify-expat.yml b/.github/workflows/verify-expat.yml index adf074fc642043e..b96e71b487dbe57 100644 --- a/.github/workflows/verify-expat.yml +++ b/.github/workflows/verify-expat.yml @@ -20,7 +20,7 @@ concurrency: jobs: verify: - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim timeout-minutes: 5 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 From a24c44c33d4ea3d442811d3cbc3ed6372455d213 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 3 Jul 2026 19:02:59 +0200 Subject: [PATCH 7/7] Replace ubuntu-26.04 with ubuntu-slim --- .github/workflows/new-bugs-announce-notifier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-bugs-announce-notifier.yml b/.github/workflows/new-bugs-announce-notifier.yml index 62a5b2793a55555..864d0f48904bcc3 100644 --- a/.github/workflows/new-bugs-announce-notifier.yml +++ b/.github/workflows/new-bugs-announce-notifier.yml @@ -10,7 +10,7 @@ permissions: jobs: notify-new-bugs-announce: - runs-on: ubuntu-26.04 + runs-on: ubuntu-slim permissions: issues: read timeout-minutes: 10