Skip to content

Commit 58330cf

Browse files
vstinnerhugovk
andauthored
[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416) (#153526)
* [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 4c79929) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> (cherry picked from commit da999e6) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 96bd750 commit 58330cf

15 files changed

Lines changed: 40 additions & 25 deletions

.github/actionlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
config-variables: null
22

3+
# Pending release of actionlint > 1.7.12 for ubuntu-26.04* support:
4+
# https://github.com/rhysd/actionlint/pull/683
5+
self-hosted-runner:
6+
labels:
7+
- ubuntu-26.04
8+
- ubuntu-26.04-arm
9+
310
paths:
411
.github/workflows/**/*.yml:
512
ignore:

.github/workflows/add-issue-header.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
add-header:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-slim
2121
permissions:
2222
issues: write
2323
timeout-minutes: 5

.github/workflows/build.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
name: 'Check if Autoconf files are up to date'
101101
# Don't use ubuntu-latest but a specific version to make the job
102102
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
103-
runs-on: ubuntu-24.04
103+
runs-on: ubuntu-26.04
104104
container:
105105
image: ghcr.io/python/autoconf:2025.01.02.12581854023
106106
timeout-minutes: 60
@@ -143,7 +143,7 @@ jobs:
143143
name: 'Check if generated files are up to date'
144144
# Don't use ubuntu-latest but a specific version to make the job
145145
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
146-
runs-on: ubuntu-24.04
146+
runs-on: ubuntu-26.04
147147
timeout-minutes: 60
148148
needs: build-context
149149
if: needs.build-context.outputs.run-tests == 'true'
@@ -272,6 +272,8 @@ jobs:
272272
free-threading:
273273
- false
274274
- true
275+
# For BOLT jobs, https://apt.llvm.org/llvm.sh doesn't support LLVM 19
276+
# on Ubuntu 26.04, so stick to Ubuntu 24.04 until LLVM is upgraded.
275277
os:
276278
- ubuntu-24.04
277279
- ubuntu-24.04-arm
@@ -297,7 +299,7 @@ jobs:
297299
strategy:
298300
fail-fast: false
299301
matrix:
300-
os: [ubuntu-24.04]
302+
os: [ubuntu-26.04]
301303
ssllib:
302304
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
303305
## OpenSSL
@@ -370,7 +372,7 @@ jobs:
370372
- arch: aarch64
371373
runs-on: macos-26
372374
- arch: x86_64
373-
runs-on: ubuntu-24.04
375+
runs-on: ubuntu-26.04
374376

375377
runs-on: ${{ matrix.runs-on }}
376378
steps:
@@ -417,7 +419,7 @@ jobs:
417419

418420
test-hypothesis:
419421
name: "Hypothesis tests on Ubuntu"
420-
runs-on: ubuntu-24.04
422+
runs-on: ubuntu-26.04
421423
timeout-minutes: 60
422424
needs: build-context
423425
if: needs.build-context.outputs.run-ubuntu == 'true'
@@ -528,7 +530,7 @@ jobs:
528530
strategy:
529531
fail-fast: false
530532
matrix:
531-
os: [ubuntu-24.04]
533+
os: [ubuntu-26.04]
532534
env:
533535
OPENSSL_VER: 3.5.7
534536
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -592,7 +594,7 @@ jobs:
592594

593595
cross-build-linux:
594596
name: Cross build Linux
595-
runs-on: ubuntu-latest
597+
runs-on: ubuntu-26.04
596598
timeout-minutes: 60
597599
needs: build-context
598600
if: needs.build-context.outputs.run-ubuntu == 'true'

.github/workflows/jit.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env:
2626
jobs:
2727
interpreter:
2828
name: Interpreter (Debug)
29-
runs-on: ubuntu-24.04
29+
runs-on: ubuntu-26.04
3030
timeout-minutes: 60
3131
steps:
3232
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -138,6 +138,8 @@ jobs:
138138
- true
139139
- false
140140
include:
141+
# https://apt.llvm.org/llvm.sh doesn't support LLVM 19
142+
# on Ubuntu 26.04, so stick to Ubuntu 24.04 until LLVM is upgraded.
141143
- target: x86_64-unknown-linux-gnu/gcc
142144
runner: ubuntu-24.04
143145
- target: aarch64-unknown-linux-gnu/gcc
@@ -162,6 +164,8 @@ jobs:
162164
linux-extras:
163165
name: ${{ matrix.name }}
164166

167+
# https://apt.llvm.org/llvm.sh doesn't support LLVM 19 on Ubuntu 26.04,
168+
# so stick to Ubuntu 24.04 until LLVM is upgraded.
165169
runs-on: ubuntu-24.04
166170
timeout-minutes: 60
167171
strategy:

.github/workflows/new-bugs-announce-notifier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
notify-new-bugs-announce:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-slim
1414
permissions:
1515
issues: read
1616
timeout-minutes: 10

.github/workflows/posix-deps-apt.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ apt-get update
44
apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
7+
curl \
78
gdb \
89
lcov \
910
libb2-dev \
1011
libbz2-dev \
1112
libffi-dev \
12-
libgdbm-dev \
1313
libgdbm-compat-dev \
14+
libgdbm-dev \
1415
liblzma-dev \
1516
libncurses5-dev \
1617
libreadline6-dev \
1718
libsqlite3-dev \
1819
libssl-dev \
1920
libzstd-dev \
20-
lzma \
21-
lzma-dev \
2221
strace \
2322
tk-dev \
2423
uuid-dev \

.github/workflows/require-pr-label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
label-dnm:
1212
name: DO-NOT-MERGE
1313
if: github.repository_owner == 'python'
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-slim
1515
permissions:
1616
pull-requests: read
1717
timeout-minutes: 10
@@ -28,7 +28,7 @@ jobs:
2828
label-reviews:
2929
name: Unresolved review
3030
if: github.repository_owner == 'python'
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-slim
3232
permissions:
3333
pull-requests: read
3434
timeout-minutes: 10

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9191
doctest:
9292
name: 'Doctest'
93-
runs-on: ubuntu-24.04
93+
runs-on: ubuntu-26.04
9494
timeout-minutes: 60
9595
steps:
9696
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/reusable-emscripten.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
jobs:
1313
build-emscripten-reusable:
1414
name: 'build and test'
15-
runs-on: ubuntu-24.04
15+
runs-on: ubuntu-26.04
1616
timeout-minutes: 40
1717
steps:
1818
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/reusable-san.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
&& ' (free-threading)'
2828
|| ''
2929
}}
30+
# https://apt.llvm.org/llvm.sh doesn't support LLVM 20 on Ubuntu 26.04,
31+
# so stick to Ubuntu 24.04 until LLVM is upgraded.
3032
runs-on: ubuntu-24.04
3133
timeout-minutes: 60
3234
steps:

0 commit comments

Comments
 (0)