Skip to content

Commit 040aa23

Browse files
vstinnerhugovk
andcommitted
[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". * 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)
1 parent 745d24c commit 040aa23

14 files changed

Lines changed: 40 additions & 36 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: 10 additions & 10 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'
@@ -273,14 +273,14 @@ jobs:
273273
- false
274274
- true
275275
os:
276-
- ubuntu-24.04
277-
- ubuntu-24.04-arm
276+
- ubuntu-26.04
277+
- ubuntu-26.04-arm
278278
exclude:
279279
# Do not test BOLT with free-threading, to conserve resources
280280
- bolt: true
281281
free-threading: true
282282
# BOLT currently crashes during instrumentation on aarch64
283-
- os: ubuntu-24.04-arm
283+
- os: ubuntu-26.04-arm
284284
bolt: true
285285
uses: ./.github/workflows/reusable-ubuntu.yml
286286
with:
@@ -297,7 +297,7 @@ jobs:
297297
strategy:
298298
fail-fast: false
299299
matrix:
300-
os: [ubuntu-24.04]
300+
os: [ubuntu-26.04]
301301
ssllib:
302302
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
303303
## OpenSSL
@@ -370,7 +370,7 @@ jobs:
370370
- arch: aarch64
371371
runs-on: macos-26
372372
- arch: x86_64
373-
runs-on: ubuntu-24.04
373+
runs-on: ubuntu-26.04
374374

375375
runs-on: ${{ matrix.runs-on }}
376376
steps:
@@ -417,7 +417,7 @@ jobs:
417417

418418
test-hypothesis:
419419
name: "Hypothesis tests on Ubuntu"
420-
runs-on: ubuntu-24.04
420+
runs-on: ubuntu-26.04
421421
timeout-minutes: 60
422422
needs: build-context
423423
if: needs.build-context.outputs.run-ubuntu == 'true'
@@ -528,7 +528,7 @@ jobs:
528528
strategy:
529529
fail-fast: false
530530
matrix:
531-
os: [ubuntu-24.04]
531+
os: [ubuntu-26.04]
532532
env:
533533
OPENSSL_VER: 3.5.7
534534
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -592,7 +592,7 @@ jobs:
592592

593593
cross-build-linux:
594594
name: Cross build Linux
595-
runs-on: ubuntu-latest
595+
runs-on: ubuntu-26.04
596596
timeout-minutes: 60
597597
needs: build-context
598598
if: needs.build-context.outputs.run-ubuntu == 'true'

.github/workflows/jit.yml

Lines changed: 6 additions & 8 deletions
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
@@ -139,9 +139,9 @@ jobs:
139139
- false
140140
include:
141141
- target: x86_64-unknown-linux-gnu/gcc
142-
runner: ubuntu-24.04
142+
runner: ubuntu-26.04
143143
- target: aarch64-unknown-linux-gnu/gcc
144-
runner: ubuntu-24.04-arm
144+
runner: ubuntu-26.04-arm
145145
steps:
146146
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
147147
with:
@@ -151,8 +151,7 @@ jobs:
151151
python-version: '3.11'
152152
- name: Build
153153
run: |
154-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
155-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
154+
# On ubuntu-26.04 image, clang is clang-21 by default
156155
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
157156
make all --jobs 4
158157
- name: Test
@@ -162,7 +161,7 @@ jobs:
162161
linux-extras:
163162
name: ${{ matrix.name }}
164163

165-
runs-on: ubuntu-24.04
164+
runs-on: ubuntu-26.04
166165
timeout-minutes: 60
167166
strategy:
168167
fail-fast: false
@@ -185,8 +184,7 @@ jobs:
185184
python-version: '3.11'
186185
- name: Build
187186
run: |
188-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
189-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
187+
# On ubuntu-26.04 image, clang is clang-21 by default
190188
if [ "${{ matrix.use_clang }}" = "true" ]; then
191189
export CC=clang-${{ env.LLVM_VERSION }}
192190
fi

.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ 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 \
16+
libmpdec-dev \
1517
libncurses5-dev \
1618
libreadline6-dev \
1719
libsqlite3-dev \
1820
libssl-dev \
1921
libzstd-dev \
20-
lzma \
21-
lzma-dev \
2222
strace \
2323
tk-dev \
2424
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
&& ' (free-threading)'
2828
|| ''
2929
}}
30-
runs-on: ubuntu-24.04
30+
runs-on: ubuntu-26.04
3131
timeout-minutes: 60
3232
steps:
3333
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

0 commit comments

Comments
 (0)