1
1
name : Tests
2
2
3
- # bpo-40548: "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".
6
3
on :
4
+ workflow_dispatch :
7
5
push :
8
6
branches :
9
- - master
10
- - 3.10
11
- - 3.9
12
- - 3.8
13
- - 3.7
7
+ - ' main'
8
+ - ' 3.*'
14
9
pull_request :
15
10
branches :
16
- - master
17
- - 3.10
18
- - 3.9
19
- - 3.8
20
- - 3.7
11
+ - ' main'
12
+ - ' 3.*'
21
13
22
14
permissions :
23
15
contents : read
@@ -26,10 +18,14 @@ concurrency:
26
18
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27
19
cancel-in-progress : true
28
20
21
+ env :
22
+ FORCE_COLOR : 1
23
+
29
24
jobs :
30
25
check_source :
31
26
name : ' Check for source changes'
32
27
runs-on : ubuntu-latest
28
+ timeout-minutes : 10
33
29
outputs :
34
30
run_tests : ${{ steps.check.outputs.run_tests }}
35
31
run_ssl_tests : ${{ steps.check.outputs.run_ssl_tests }}
@@ -62,13 +58,15 @@ jobs:
62
58
63
59
check_abi :
64
60
name : ' Check if the ABI has changed'
65
- runs-on : ubuntu-20 .04
61
+ runs-on : ubuntu-22 .04 # 24.04 causes spurious errors
66
62
needs : check_source
67
63
if : needs.check_source.outputs.run_tests == 'true'
68
64
steps :
69
65
- uses : actions/checkout@v4
70
- - uses : actions/setup-python@v4
71
- - name : Install Dependencies
66
+ with :
67
+ persist-credentials : false
68
+ - uses : actions/setup-python@v5
69
+ - name : Install dependencies
72
70
run : |
73
71
sudo ./.github/workflows/posix-deps-apt.sh
74
72
sudo apt-get install -yq abigail-tools
@@ -83,25 +81,30 @@ jobs:
83
81
run : |
84
82
if ! make check-abidump; then
85
83
echo "Generated ABI file is not up to date."
86
- echo "Please, add the release manager of this branch as a reviewer of this PR."
84
+ echo "Please add the release manager of this branch as a reviewer of this PR."
87
85
echo ""
88
- echo "To learn more about this check, please visit : https://devguide.python.org/setup/?highlight=abi #regenerate-the-abi-dump"
86
+ echo "To learn more about this check: https://devguide.python.org/setup/#regenerate-the-abi-dump"
89
87
echo ""
90
88
exit 1
91
89
fi
92
90
93
91
check_generated_files :
94
92
name : ' Check if generated files are up to date'
95
- runs-on : ubuntu-latest
93
+ # Don't use ubuntu-latest but a specific version to make the job
94
+ # reproducible: to get the same tools versions (autoconf, aclocal, ...)
95
+ runs-on : ubuntu-22.04
96
+ timeout-minutes : 60
96
97
needs : check_source
97
98
if : needs.check_source.outputs.run_tests == 'true'
98
99
steps :
99
100
- uses : actions/checkout@v4
100
- - uses : actions/setup-python@v4
101
- - name : Install Dependencies
101
+ with :
102
+ persist-credentials : false
103
+ - uses : actions/setup-python@v5
104
+ - name : Install dependencies
102
105
run : sudo ./.github/workflows/posix-deps-apt.sh
103
106
- name : Add ccache to PATH
104
- run : echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
107
+ run : echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
105
108
- name : Configure ccache action
106
109
uses : hendrikmuhs/ccache-action@v1
107
110
- name : Check Autoconf version 2.69 and aclocal 1.16.3
@@ -208,7 +211,7 @@ jobs:
208
211
209
212
build_ubuntu :
210
213
name : ' Ubuntu'
211
- runs-on : ubuntu-20 .04
214
+ runs-on : ubuntu-24 .04
212
215
needs : check_source
213
216
if : needs.check_source.outputs.run_tests == 'true'
214
217
env :
@@ -218,13 +221,13 @@ jobs:
218
221
- uses : actions/checkout@v4
219
222
- name : Register gcc problem matcher
220
223
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
221
- - name : Install Dependencies
224
+ - name : Install dependencies
222
225
run : sudo ./.github/workflows/posix-deps-apt.sh
223
226
- name : Configure OpenSSL env vars
224
227
run : |
225
- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
226
- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
227
- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
228
+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> " $GITHUB_ENV"
229
+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> " $GITHUB_ENV"
230
+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> " $GITHUB_ENV"
228
231
- name : ' Restore OpenSSL build'
229
232
id : cache-openssl
230
233
uses : actions/cache@v4
@@ -236,7 +239,7 @@ jobs:
236
239
run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
237
240
- name : Add ccache to PATH
238
241
run : |
239
- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
242
+ echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
240
243
- name : Configure ccache action
241
244
uses : hendrikmuhs/ccache-action@v1
242
245
- name : Configure CPython
@@ -250,7 +253,8 @@ jobs:
250
253
251
254
build_ubuntu_ssltests :
252
255
name : ' Ubuntu SSL tests with OpenSSL'
253
- runs-on : ubuntu-20.04
256
+ runs-on : ubuntu-24.04
257
+ timeout-minutes : 60
254
258
needs : check_source
255
259
if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
256
260
strategy :
@@ -264,15 +268,17 @@ jobs:
264
268
LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
265
269
steps :
266
270
- uses : actions/checkout@v4
271
+ with :
272
+ persist-credentials : false
267
273
- name : Register gcc problem matcher
268
274
run : echo "::add-matcher::.github/problem-matchers/gcc.json"
269
- - name : Install Dependencies
275
+ - name : Install dependencies
270
276
run : sudo ./.github/workflows/posix-deps-apt.sh
271
277
- name : Configure OpenSSL env vars
272
278
run : |
273
- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
274
- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
275
- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
279
+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> " $GITHUB_ENV"
280
+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> " $GITHUB_ENV"
281
+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> " $GITHUB_ENV"
276
282
- name : ' Restore OpenSSL build'
277
283
id : cache-openssl
278
284
uses : actions/cache@v4
@@ -284,7 +290,7 @@ jobs:
284
290
run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
285
291
- name : Add ccache to PATH
286
292
run : |
287
- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
293
+ echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
288
294
- name : Configure ccache action
289
295
uses :
hendrikmuhs/[email protected]
290
296
- name : Configure CPython
0 commit comments