Skip to content

[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416)#153526

Merged
vstinner merged 4 commits into
python:3.14from
vstinner:ubuntu26_04_14
Jul 11, 2026
Merged

[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416)#153526
vstinner merged 4 commits into
python:3.14from
vstinner:ubuntu26_04_14

Conversation

@vstinner

@vstinner vstinner commented Jul 10, 2026

Copy link
Copy Markdown
Member

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 with llvm.sh script to install LLVM 19 and LLVM 20.
  • WASI uses ubuntu-26.04, not ubuntu-26.04-arm.

(cherry picked from commit 4c79929)

(cherry picked from commit da999e6)

…Actions (python#152717) (python#153416)

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

* Replace "ubuntu-24.04" with "ubuntu-26.04".
* 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.
* Install Ubuntu libmpdec-dev package, rather than installing libmpdec
  from source (tarball).

Backport changes:

* Keep https://apt.llvm.org/llvm.sh to install LLVM 19 and LLVM 20.
* WASI uses ubuntu-26.04, not ubuntu-26.04-arm.

(cherry picked from commit 4c79929)

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

Copy link
Copy Markdown
Member Author

I kept https://apt.llvm.org/llvm.sh in jobs which install LLVM 19 and LLVM 20.

Note: WASI uses ubuntu-26.04, whereas ubuntu-26.04-arm is used in 3.15 and main branches.

@vstinner

vstinner commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Oh, multiple jobs failed when running https://apt.llvm.org/llvm.sh:

+ add-apt-repository -y 'deb https://apt.llvm.org/resolute/  llvm-toolchain-resolute-19 main'
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Hit:6 https://packages.microsoft.com/repos/azure-cli jammy InRelease
Hit:7 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease
Hit:8 https://dl.google.com/linux/chrome-stable/deb stable InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu resolute InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu resolute-updates InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu resolute-backports InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu resolute-security InRelease
Ign:9 https://apt.llvm.org/resolute llvm-toolchain-resolute-19 InRelease
Err:10 https://apt.llvm.org/resolute llvm-toolchain-resolute-19 Release
  404  Not Found [IP: 146.75.106.49 443]
Reading package lists...
E: The repository 'https://apt.llvm.org/resolute llvm-toolchain-resolute-19 Release' does not have a Release file.
Repository: 'deb https://apt.llvm.org/resolute/ llvm-toolchain-resolute-19 main'
Description:
Archive for codename: llvm-toolchain-resolute-19 components: main
More info: https://apt.llvm.org/resolute/
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_apt_llvm_org_resolute_-resolute.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_apt_llvm_org_resolute_-resolute.list

+ apt-get update
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu resolute InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu resolute-updates InRelease
Hit:6 https://packages.microsoft.com/repos/azure-cli jammy InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu resolute-backports InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu resolute-security InRelease
Hit:7 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease
Ign:8 https://apt.llvm.org/resolute llvm-toolchain-resolute-19 InRelease
Err:9 https://apt.llvm.org/resolute llvm-toolchain-resolute-19 Release
  404  Not Found [IP: 146.75.106.49 443]
Hit:10 https://dl.google.com/linux/chrome-stable/deb stable InRelease
Reading package lists...
E: The repository 'https://apt.llvm.org/resolute llvm-toolchain-resolute-19 Release' does not have a Release file.
Error: Process completed with exit code 100.

@vstinner

Copy link
Copy Markdown
Member Author

Right now, https://apt.llvm.org/resolute/dists/ as an "Index of" listing:

llvm-toolchain-resolute/                           07-Jul-2026 15:05                   -
llvm-toolchain-resolute-21/                        29-May-2026 03:38                   -
llvm-toolchain-resolute-22/                        13-Jun-2026 13:38                   -

llvm-toolchain-resolute-19 and llvm-toolchain-resolute-20 are missing. Is it a temporary or permanent issue?

@vstinner

vstinner commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

https://apt.llvm.org/noble/dists/ is an "Index of" page listing:

llvm-toolchain-noble/                              07-Jul-2026 12:24                   -
llvm-toolchain-noble-17/                           19-Feb-2026 22:37                   -
llvm-toolchain-noble-18/                           10-May-2026 09:15                   -
llvm-toolchain-noble-19/                           19-Feb-2026 22:37                   -
llvm-toolchain-noble-20/                           19-Feb-2026 22:37                   -
llvm-toolchain-noble-21/                           19-Feb-2026 22:37                   -
llvm-toolchain-noble-22/                           14-Jun-2026 00:14                   -

So https://apt.llvm.org/ supports more LLVM versions on Ubuntu 24.04 (Noble) (LLVM 17 to 22) than on Ubuntu 26.04 (Resolute) (LLVM 21 and 22).

The problem is that in Python 3.14, the JIT uses LLVM 19 (LLVM_VERSION: 19 in .github/workflows/jit.yml, and _LLVM_VERSION = 19 in Tools/jit/_llvm.py). If I understand correctly, https://apt.llvm.org/ only provides LLVM 20, 21 and 22 on Ubuntu 26.04, whereas some CI jobs need LLVM 19 (like the JIT jobs).

I see different options:

  • Stick to Ubuntu 24.04 on Python 3.14 jobs which need LLVM 19 and 20
  • Install LLVM 19 differently (how?) on Python 3.14
  • Upgrade LLVM in some jobs

@vstinner vstinner marked this pull request as draft July 10, 2026 19:25
@vstinner

Copy link
Copy Markdown
Member Author

I mark the PR as a draft until the CI jobs pass.

@vstinner vstinner marked this pull request as ready for review July 10, 2026 20:08
@vstinner

Copy link
Copy Markdown
Member Author

@hugovk @corona10: In .github/workflows/build.yml, the build-ubuntu should use Ubuntu 24.04 for BOLT jobs. But I don't know if it would be possible to upgrade to Ubuntu 26.04 for non-BOLT jobs? I don't know well the GitHub Action syntax to do that.

Stick to Ubuntu 24.04 on Python 3.14 jobs which need LLVM 19 and 20

That's what I did: jobs using LLVM 19 and LLVM 20 continue using Ubuntu 24.04.

@vstinner

Copy link
Copy Markdown
Member Author

CI jobs pass, the PR is now ready for review :-)

@vstinner

Copy link
Copy Markdown
Member Author

Ah, and see #152211 for CIFuzz failures on the 3.14 branch.

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vstinner vstinner merged commit 58330cf into python:3.14 Jul 11, 2026
77 of 80 checks passed
@vstinner vstinner deleted the ubuntu26_04_14 branch July 11, 2026 09:47
@vstinner

Copy link
Copy Markdown
Member Author

Merged. Thanks for the review.

If someone see how to use Ubuntu 26.04 on Ubuntu jobs, but keep Ubuntu 24.04 for BOLT jobs, go ahead and submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants