]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)...
authorVictor Stinner <vstinner@python.org>
Sat, 11 Jul 2026 09:47:03 +0000 (11:47 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2026 09:47:03 +0000 (11:47 +0200)
* [3.15] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416)

gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)

* Replace "ubuntu-24.04" with "ubuntu-26.04" on most jobs.
* Replace "ubuntu-latest" with "ubuntu-26.04" for Cross build Linux.
* Replace "ubuntu-latest" with "ubuntu-slim" for small workloads.
* Update ".github/actionlint.yaml" to allow "ubuntu-26.04"
  and "ubuntu-26.04-arm" images.

Backport changes:

* Keep Ubuntu 24.04 and llvm.sh to install LLVM 19 and LLVM 20.
* WASI uses ubuntu-26.04, not ubuntu-26.04-arm.

(cherry picked from commit 4c79929705eb31959a6f4071cc34583de0737a28)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit da999e638c03a05ed2b0f8a828f4013c7f9179bd)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
15 files changed:
.github/actionlint.yaml
.github/workflows/add-issue-header.yml
.github/workflows/build.yml
.github/workflows/jit.yml
.github/workflows/new-bugs-announce-notifier.yml
.github/workflows/posix-deps-apt.sh
.github/workflows/require-pr-label.yml
.github/workflows/reusable-docs.yml
.github/workflows/reusable-emscripten.yml
.github/workflows/reusable-san.yml
.github/workflows/reusable-ubuntu.yml
.github/workflows/reusable-wasi.yml
.github/workflows/stale.yml
.github/workflows/tail-call.yml
.github/workflows/verify-expat.yml

index eacfff24889021baa35443be9db9ee3ce609327e..61ee08db9919bb9897bc09204b06594a7927735f 100644 (file)
@@ -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:
index 4c25976b9c24f7286d2efa4d4fd69a6ff5e948f5..55eb6bf33b812860c3effcd30dbbce6e79cc3fec 100644 (file)
@@ -17,7 +17,7 @@ permissions:
 
 jobs:
   add-header:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     permissions:
       issues: write
     timeout-minutes: 5
index fa214f10de0d5f063dff1bcd0f3d8fb1060c57b6..cdd91a66968d7870adb3ef360630ad652c7a9d0b 100644 (file)
@@ -100,7 +100,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
@@ -143,7 +143,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'
@@ -272,6 +272,8 @@ jobs:
         free-threading:
         - false
         - true
+        # For BOLT jobs, https://apt.llvm.org/llvm.sh doesn't support LLVM 19
+        # on Ubuntu 26.04, so stick to Ubuntu 24.04 until LLVM is upgraded.
         os:
         - ubuntu-24.04
         - ubuntu-24.04-arm
@@ -297,7 +299,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
@@ -370,7 +372,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:
@@ -417,7 +419,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'
@@ -528,7 +530,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-24.04]
+        os: [ubuntu-26.04]
     env:
       OPENSSL_VER: 3.5.7
       PYTHONSTRICTEXTENSIONBUILD: 1
@@ -592,7 +594,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'
index c148c55b623f6975ca68d993e2f950fd7f34d3ea..27846f8843e792d73533bb26dfe2428bd7fd7f53 100644 (file)
@@ -26,7 +26,7 @@ env:
 jobs:
   interpreter:
     name: Interpreter (Debug)
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-26.04
     timeout-minutes: 60
     steps:
       - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -138,6 +138,8 @@ jobs:
           - true
           - false
         include:
+          # https://apt.llvm.org/llvm.sh doesn't support LLVM 19
+          # on Ubuntu 26.04, so stick to Ubuntu 24.04 until LLVM is upgraded.
           - target: x86_64-unknown-linux-gnu/gcc
             runner: ubuntu-24.04
           - target: aarch64-unknown-linux-gnu/gcc
@@ -162,6 +164,8 @@ jobs:
   linux-extras:
     name: ${{ matrix.name }}
 
+    # https://apt.llvm.org/llvm.sh doesn't support LLVM 19 on Ubuntu 26.04,
+    # so stick to Ubuntu 24.04 until LLVM is upgraded.
     runs-on: ubuntu-24.04
     timeout-minutes: 60
     strategy:
index e585657dde68816c866cd3660edaee0bae3b7ebf..ea175ed20d1e7ba4019e126ab88dcbf7458a6f4d 100644 (file)
@@ -10,7 +10,7 @@ permissions:
 
 jobs:
   notify-new-bugs-announce:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     permissions:
       issues: read
     timeout-minutes: 10
index 1be3f3d0ffffcc8ff0409f12e377516bf6cbb039..3b3d90e198360ea9480c4ce942678ab618db1482 100755 (executable)
@@ -4,21 +4,20 @@ apt-get update
 apt-get -yq --no-install-recommends install \
     build-essential \
     pkg-config \
+    curl \
     gdb \
     lcov \
     libb2-dev \
     libbz2-dev \
     libffi-dev \
-    libgdbm-dev \
     libgdbm-compat-dev \
+    libgdbm-dev \
     liblzma-dev \
     libncurses5-dev \
     libreadline6-dev \
     libsqlite3-dev \
     libssl-dev \
     libzstd-dev \
-    lzma \
-    lzma-dev \
     strace \
     tk-dev \
     uuid-dev \
index f3e2666879530f908d1579deb43e40fb474e2133..8af254c10786e1bff33b2458be3727cab967fe3c 100644 (file)
@@ -11,7 +11,7 @@ jobs:
   label-dnm:
     name: DO-NOT-MERGE
     if: github.repository_owner == 'python'
-    runs-on: ubuntu-latest
+    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-latest
+    runs-on: ubuntu-slim
     permissions:
       pull-requests: read
     timeout-minutes: 10
index 3de76dd48c59613af944c8916a995321dc919551..2e54cd9e23cab76441bbc6c17223ae0a4ac9c320 100644 (file)
@@ -90,7 +90,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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
index 38e6dcceb8f47ca8c1f44f8415e90f373cb1c7c3..c14a41b568287794c91f278cbc7c70d3c98f59f9 100644 (file)
@@ -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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
index 317763c65f3c2532784884c6087eb56ac7b050ae..47e41c90a1658b518fc1b81e8c7c877e4d775c17 100644 (file)
@@ -27,6 +27,8 @@ jobs:
         && ' (free-threading)'
         || ''
       }}
+    # https://apt.llvm.org/llvm.sh doesn't support LLVM 20 on Ubuntu 26.04,
+    # so stick to Ubuntu 24.04 until LLVM is upgraded.
     runs-on: ubuntu-24.04
     timeout-minutes: 60
     steps:
index 63527bd02b94f6f84c1aa41c35b736754776ef47..6cd480b0285346dc2cdf54b51996b7e54c98e07a 100644 (file)
@@ -43,6 +43,8 @@ jobs:
       run: sudo ./.github/workflows/posix-deps-apt.sh
     - name: Install Clang and BOLT
       if: ${{ fromJSON(inputs.bolt-optimizations) }}
+      # For BOLT jobs, https://apt.llvm.org/llvm.sh doesn't support LLVM 19
+      # on Ubuntu 26.04, so stick to Ubuntu 24.04 until LLVM is upgraded.
       run: |
         sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 19
         sudo apt-get install --no-install-recommends bolt-19
index eb26e248c15b5a18399cfcf54eb5f01411b72c0b..bd08c120fd00ee284246889ee62128e24e6ca425 100644 (file)
@@ -12,7 +12,7 @@ env:
 jobs:
   build-wasi-reusable:
     name: 'build and test'
-    runs-on: ubuntu-24.04
+    runs-on: ubuntu-26.04
     timeout-minutes: 60
     env:
       WASMTIME_VERSION: 38.0.3
index 1fbc4a20dbc7ddd0f98b83abf0b2897edb730d42..56193a901ce0762816a23b6dd28fa234bcf4aebe 100644 (file)
@@ -10,7 +10,7 @@ permissions:
 jobs:
   stale:
     if: github.repository_owner == 'python'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     permissions:
       pull-requests: write
     timeout-minutes: 10
index a9b938fdd783cc1130383e3a68111a4d39bb21dd..8fd63d7a6f898822b85165731683baa17e2844f6 100644 (file)
@@ -100,13 +100,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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -117,8 +117,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
index 472a11db2da5fbf9dd3a6822bc2825c0f3c3a096..158e8f10377cadc23adc4f2dc334e4eaf35a0697 100644 (file)
@@ -20,7 +20,7 @@ concurrency:
 
 jobs:
   verify:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-slim
     timeout-minutes: 5
     steps:
       - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2