11name : Tests 
22
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".
63on :
4+   workflow_dispatch :
75  push :
86    branches :
9-     - master 
10-     - 3.10 
11-     - 3.9 
12-     - 3.8 
13-     - 3.7 
7+     - ' main' 
8+     - ' 3.*' 
149  pull_request :
1510    branches :
16-     - master 
17-     - 3.10 
18-     - 3.9 
19-     - 3.8 
20-     - 3.7 
11+     - ' main' 
12+     - ' 3.*' 
2113
2214permissions :
2315  contents : read 
@@ -26,10 +18,14 @@ concurrency:
2618  group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 
2719  cancel-in-progress : true 
2820
21+ env :
22+   FORCE_COLOR : 1 
23+ 
2924jobs :
3025  check_source :
3126    name : ' Check for source changes' 
3227    runs-on : ubuntu-latest 
28+     timeout-minutes : 10 
3329    outputs :
3430      run_tests : ${{ steps.check.outputs.run_tests }} 
3531      run_ssl_tests : ${{ steps.check.outputs.run_ssl_tests }} 
@@ -62,13 +58,15 @@ jobs:
6258
6359   check_abi :
6460    name : ' Check if the ABI has changed' 
65-     runs-on : ubuntu-20 .04 
61+     runs-on : ubuntu-22 .04    #  24.04 causes spurious errors 
6662    needs : check_source 
6763    if : needs.check_source.outputs.run_tests == 'true' 
6864    steps :
6965      - 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 
7270        run : | 
7371            sudo ./.github/workflows/posix-deps-apt.sh 
7472            sudo apt-get install -yq abigail-tools 
@@ -83,25 +81,30 @@ jobs:
8381        run : | 
8482          if ! make check-abidump; then 
8583            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." 
8785            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" 
8987            echo "" 
9088            exit 1 
9189          fi 
9290
9391   check_generated_files :
9492    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-24.04 
96+     timeout-minutes : 60 
9697    needs : check_source 
9798    if : needs.check_source.outputs.run_tests == 'true' 
9899    steps :
99100      - 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 
102105        run : sudo ./.github/workflows/posix-deps-apt.sh 
103106      - 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"  
105108      - name : Configure ccache action 
106109        uses : hendrikmuhs/ccache-action@v1 
107110      - name : Check Autoconf version 2.69 and aclocal 1.16.3 
@@ -208,7 +211,7 @@ jobs:
208211
209212  build_ubuntu :
210213    name : ' Ubuntu' 
211-     runs-on : ubuntu-20 .04 
214+     runs-on : ubuntu-24 .04 
212215    needs : check_source 
213216    if : needs.check_source.outputs.run_tests == 'true' 
214217    env :
@@ -218,16 +221,16 @@ jobs:
218221    - uses : actions/checkout@v4 
219222    - name : Register gcc problem matcher 
220223      run : echo "::add-matcher::.github/problem-matchers/gcc.json" 
221-     - name : Install Dependencies  
224+     - name : Install dependencies  
222225      run : sudo ./.github/workflows/posix-deps-apt.sh 
223226    - name : Configure OpenSSL env vars 
224227      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"  
228231     - name : ' Restore OpenSSL build' 
229232      id : cache-openssl 
230-       uses : actions/cache@v3.0.2  
233+       uses : actions/cache@v4  
231234      with :
232235        path : ./multissl/openssl/${{ env.OPENSSL_VER }} 
233236        key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} 
@@ -236,7 +239,7 @@ jobs:
236239      run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux 
237240    - name : Add ccache to PATH 
238241      run : | 
239-         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV 
242+         echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"  
240243     - name : Configure ccache action 
241244      uses : hendrikmuhs/ccache-action@v1 
242245    - name : Configure CPython 
@@ -250,7 +253,8 @@ jobs:
250253
251254  build_ubuntu_ssltests :
252255    name : ' Ubuntu SSL tests with OpenSSL' 
253-     runs-on : ubuntu-20.04 
256+     runs-on : ubuntu-24.04 
257+     timeout-minutes : 60 
254258    needs : check_source 
255259    if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true' 
256260    strategy :
@@ -264,18 +268,20 @@ jobs:
264268      LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib 
265269    steps :
266270    - uses : actions/checkout@v4 
271+       with :
272+         persist-credentials : false 
267273    - name : Register gcc problem matcher 
268274      run : echo "::add-matcher::.github/problem-matchers/gcc.json" 
269-     - name : Install Dependencies  
275+     - name : Install dependencies  
270276      run : sudo ./.github/workflows/posix-deps-apt.sh 
271277    - name : Configure OpenSSL env vars 
272278      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"  
276282     - name : ' Restore OpenSSL build' 
277283      id : cache-openssl 
278-       uses : actions/cache@v3  
284+       uses : actions/cache@v4  
279285      with :
280286        path : ./multissl/openssl/${{ env.OPENSSL_VER }} 
281287        key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} 
@@ -284,7 +290,7 @@ jobs:
284290      run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux 
285291    - name : Add ccache to PATH 
286292      run : | 
287-         echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV 
293+         echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"  
288294     - name : Configure ccache action 
289295      uses : 
hendrikmuhs/[email protected]   290296    - name : Configure CPython 
0 commit comments