Skip to content

Commit b2c3a95

Browse files
authored
[3.11] gh-122544: Change OS image in GitHub Actions to Ubuntu 24.04 (#122566) (#130260)
1 parent 2e01a71 commit b2c3a95

File tree

3 files changed

+19451
-13402
lines changed

3 files changed

+19451
-13402
lines changed

.github/workflows/build.yml

+22-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Tests
22

3-
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
4-
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
5-
# mandatory but not scheduled because of "paths-ignore".
63
on:
74
workflow_dispatch:
85
push:
@@ -21,6 +18,9 @@ concurrency:
2118
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
2219
cancel-in-progress: true
2320

21+
env:
22+
FORCE_COLOR: 1
23+
2424
jobs:
2525
check_source:
2626
name: 'Check for source changes'
@@ -87,11 +87,13 @@ jobs:
8787

8888
check_abi:
8989
name: 'Check if the ABI has changed'
90-
runs-on: ubuntu-20.04
90+
runs-on: ubuntu-22.04 # 24.04 causes spurious errors
9191
needs: check_source
9292
if: needs.check_source.outputs.run_tests == 'true'
9393
steps:
9494
- uses: actions/checkout@v4
95+
with:
96+
persist-credentials: false
9597
- uses: actions/setup-python@v5
9698
- name: Install dependencies
9799
run: |
@@ -130,12 +132,16 @@ jobs:
130132

131133
check_generated_files:
132134
name: 'Check if generated files are up to date'
133-
runs-on: ubuntu-latest
135+
# Don't use ubuntu-latest but a specific version to make the job
136+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
137+
runs-on: ubuntu-24.04
134138
timeout-minutes: 60
135139
needs: check_source
136140
if: needs.check_source.outputs.run_tests == 'true'
137141
steps:
138142
- uses: actions/checkout@v4
143+
with:
144+
persist-credentials: false
139145
- uses: actions/setup-python@v5
140146
with:
141147
python-version: '3.x'
@@ -229,7 +235,7 @@ jobs:
229235
strategy:
230236
fail-fast: false
231237
matrix:
232-
os: [ubuntu-20.04]
238+
os: [ubuntu-24.04]
233239
openssl_ver: [1.1.1w, 3.0.15, 3.1.7, 3.2.3]
234240
env:
235241
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -238,6 +244,8 @@ jobs:
238244
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
239245
steps:
240246
- uses: actions/checkout@v4
247+
with:
248+
persist-credentials: false
241249
- name: Runner image version
242250
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
243251
- name: Restore config.cache
@@ -251,9 +259,9 @@ jobs:
251259
run: sudo ./.github/workflows/posix-deps-apt.sh
252260
- name: Configure OpenSSL env vars
253261
run: |
254-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
255-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
256-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
262+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
263+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
264+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
257265
- name: 'Restore OpenSSL build'
258266
id: cache-openssl
259267
uses: actions/cache@v4
@@ -262,10 +270,10 @@ jobs:
262270
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
263271
- name: Install OpenSSL
264272
if: steps.cache-openssl.outputs.cache-hit != 'true'
265-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
273+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
266274
- name: Add ccache to PATH
267275
run: |
268-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
276+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
269277
- name: Configure ccache action
270278
uses: hendrikmuhs/[email protected]
271279
with:
@@ -281,7 +289,7 @@ jobs:
281289

282290
build_asan:
283291
name: 'Address sanitizer'
284-
runs-on: ubuntu-20.04
292+
runs-on: ubuntu-22.04
285293
timeout-minutes: 60
286294
needs: check_source
287295
if: needs.check_source.outputs.run_tests == 'true'
@@ -291,6 +299,8 @@ jobs:
291299
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
292300
steps:
293301
- uses: actions/checkout@v4
302+
with:
303+
persist-credentials: false
294304
- name: Runner image version
295305
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
296306
- name: Restore config.cache

.github/workflows/reusable-ubuntu.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
required: true
99
type: string
1010

11+
env:
12+
FORCE_COLOR: 1
13+
1114
jobs:
1215
build_ubuntu_reusable:
1316
name: 'build and test'
@@ -16,12 +19,14 @@ jobs:
1619
strategy:
1720
fail-fast: false
1821
matrix:
19-
os: [ubuntu-20.04]
22+
os: [ubuntu-22.04]
2023
env:
2124
OPENSSL_VER: 3.0.15
2225
PYTHONSTRICTEXTENSIONBUILD: 1
2326
steps:
2427
- uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
2530
- name: Register gcc problem matcher
2631
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
2732
- name: Install dependencies

0 commit comments

Comments
 (0)