11name : 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".
63on :
74 workflow_dispatch :
85 push :
96 branches :
107 - ' main'
11- - ' 3.11'
12- - ' 3.10'
13- - ' 3.9'
14- - ' 3.8'
8+ - ' 3.*'
159 pull_request :
1610 branches :
1711 - ' main'
18- - ' 3.11'
19- - ' 3.10'
20- - ' 3.9'
21- - ' 3.8'
12+ - ' 3.*'
2213
2314permissions :
2415 contents : read
@@ -27,6 +18,9 @@ concurrency:
2718 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
2819 cancel-in-progress : true
2920
21+ env :
22+ FORCE_COLOR : 1
23+
3024jobs :
3125 check_source :
3226 name : ' Check for source changes'
@@ -93,11 +87,13 @@ jobs:
9387
9488 check_abi :
9589 name : ' Check if the ABI has changed'
96- runs-on : ubuntu-20 .04
90+ runs-on : ubuntu-22 .04 # 24.04 causes spurious errors
9791 needs : check_source
9892 if : needs.check_source.outputs.run_tests == 'true'
9993 steps :
10094 - uses : actions/checkout@v4
95+ with :
96+ persist-credentials : false
10197 - uses : actions/setup-python@v5
10298 - name : Install dependencies
10399 run : |
@@ -136,26 +132,31 @@ jobs:
136132
137133 check_generated_files :
138134 name : ' Check if generated files are up to date'
139- 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
140138 timeout-minutes : 60
141139 needs : check_source
142140 if : needs.check_source.outputs.run_tests == 'true'
143141 steps :
144142 - uses : actions/checkout@v4
143+ with :
144+ persist-credentials : false
145145 - uses : actions/setup-python@v5
146146 with :
147147 python-version : ' 3.x'
148148 - name : Runner image version
149- run : echo "IMAGE_VERSION =${ImageVersion}" >> $GITHUB_ENV
149+ run : echo "IMAGE_OS_VERSION =${ImageOS}-${ ImageVersion}" >> " $GITHUB_ENV"
150150 - name : Restore config.cache
151151 uses : actions/cache@v4
152152 with :
153153 path : config.cache
154- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
155- - name : Install Dependencies
154+ # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
155+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
156+ - name : Install dependencies
156157 run : sudo ./.github/workflows/posix-deps-apt.sh
157158 - name : Add ccache to PATH
158- run : echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
159+ run : echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
159160 - name : Configure ccache action
160161 uses :
hendrikmuhs/[email protected] 161162 with :
@@ -227,49 +228,52 @@ jobs:
227228
228229 build_ubuntu_ssltests :
229230 name : ' Ubuntu SSL tests with OpenSSL'
230- runs-on : ubuntu-20.04
231+ runs-on : ${{ matrix.os }}
231232 timeout-minutes : 60
232233 needs : check_source
233234 if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
234235 strategy :
235236 fail-fast : false
236237 matrix :
237- openssl_ver : [1.1.1w, 3.0.13, 3.1.5, 3.2.1]
238+ os : [ubuntu-24.04]
239+ openssl_ver : [1.1.1w, 3.0.15, 3.1.7, 3.2.3]
238240 env :
239241 OPENSSL_VER : ${{ matrix.openssl_ver }}
240242 MULTISSL_DIR : ${{ github.workspace }}/multissl
241243 OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
242244 LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
243245 steps :
244246 - uses : actions/checkout@v4
247+ with :
248+ persist-credentials : false
245249 - name : Runner image version
246- run : echo "IMAGE_VERSION =${ImageVersion}" >> $GITHUB_ENV
250+ run : echo "IMAGE_OS_VERSION =${ImageOS}-${ ImageVersion}" >> " $GITHUB_ENV"
247251 - name : Restore config.cache
248252 uses : actions/cache@v4
249253 with :
250254 path : config.cache
251- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
255+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source.outputs.config_hash }}
252256 - name : Register gcc problem matcher
253257 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
254- - name : Install Dependencies
258+ - name : Install dependencies
255259 run : sudo ./.github/workflows/posix-deps-apt.sh
256260 - name : Configure OpenSSL env vars
257261 run : |
258- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
259- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
260- 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"
261265 - name : ' Restore OpenSSL build'
262266 id : cache-openssl
263267 uses : actions/cache@v4
264268 with :
265269 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
266- key : ${{ runner .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
270+ key : ${{ matrix .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
267271 - name : Install OpenSSL
268272 if : steps.cache-openssl.outputs.cache-hit != 'true'
269- 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
270274 - name : Add ccache to PATH
271275 run : |
272- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
276+ echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
273277 - name : Configure ccache action
274278 uses :
hendrikmuhs/[email protected] 275279 with :
@@ -285,48 +289,50 @@ jobs:
285289
286290 build_asan :
287291 name : ' Address sanitizer'
288- runs-on : ubuntu-20 .04
292+ runs-on : ubuntu-22 .04
289293 timeout-minutes : 60
290294 needs : check_source
291295 if : needs.check_source.outputs.run_tests == 'true'
292296 env :
293- OPENSSL_VER : 3.0.13
297+ OPENSSL_VER : 3.0.15
294298 PYTHONSTRICTEXTENSIONBUILD : 1
295299 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
296300 steps :
297301 - uses : actions/checkout@v4
302+ with :
303+ persist-credentials : false
298304 - name : Runner image version
299- run : echo "IMAGE_VERSION =${ImageVersion}" >> $GITHUB_ENV
305+ run : echo "IMAGE_OS_VERSION =${ImageOS}-${ ImageVersion}" >> " $GITHUB_ENV"
300306 - name : Restore config.cache
301307 uses : actions/cache@v4
302308 with :
303309 path : config.cache
304- key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
310+ key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.check_source.outputs.config_hash }}
305311 - name : Register gcc problem matcher
306312 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
307- - name : Install Dependencies
313+ - name : Install dependencies
308314 run : sudo ./.github/workflows/posix-deps-apt.sh
309315 - name : Set up GCC-10 for ASAN
310316 uses : egor-tensin/setup-gcc@v1
311317 with :
312318 version : 10
313319 - name : Configure OpenSSL env vars
314320 run : |
315- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
316- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
317- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
321+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> " $GITHUB_ENV"
322+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> " $GITHUB_ENV"
323+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> " $GITHUB_ENV"
318324 - name : ' Restore OpenSSL build'
319325 id : cache-openssl
320326 uses : actions/cache@v4
321327 with :
322328 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
323- key : ${{ runner .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
329+ key : ${{ matrix .os }}-multissl-openssl-${{ env.OPENSSL_VER }}
324330 - name : Install OpenSSL
325331 if : steps.cache-openssl.outputs.cache-hit != 'true'
326- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
332+ run : python3 Tools/ssl/multissltests.py --steps=library --base-directory " $MULTISSL_DIR" --openssl " $OPENSSL_VER" --system Linux
327333 - name : Add ccache to PATH
328334 run : |
329- echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
335+ echo "PATH=/usr/lib/ccache:$PATH" >> " $GITHUB_ENV"
330336 - name : Configure ccache action
331337 uses :
hendrikmuhs/[email protected] 332338 with :
0 commit comments