@@ -111,8 +111,6 @@ jobs:
111111 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
112112 - name : Install dependencies
113113 run : sudo ./.github/workflows/posix-deps-apt.sh
114- - name : Add ccache to PATH
115- run : echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
116114 - name : Configure CPython
117115 run : |
118116 # Build Python with the libpython dynamic library
@@ -255,8 +253,8 @@ jobs:
255253 os : ${{ matrix.os }}
256254 test-opts : ${{ matrix.test-opts || '' }}
257255
258- build-ubuntu-ssltests-openssl :
259- name : ' Ubuntu SSL tests with OpenSSL '
256+ build-ubuntu-ssltests :
257+ name : ' Ubuntu SSL tests'
260258 runs-on : ${{ matrix.os }}
261259 timeout-minutes : 60
262260 needs : build-context
@@ -265,16 +263,25 @@ jobs:
265263 fail-fast : false
266264 matrix :
267265 os : [ubuntu-24.04]
268- # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
269- # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
270- # supported by important vendors such as AWS-LC.
271- openssl_ver : [1.1.1w, 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1]
272- # See Tools/ssl/make_ssl_data.py for notes on adding a new version
266+ ssllib :
267+ # See Tools/ssl/make_ssl_data.py for notes on adding a new version
268+ # # OpenSSL
269+ # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
270+ # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
271+ # supported by important vendors such as AWS-LC.
272+ - { name: openssl, version: 1.1.1w }
273+ - { name: openssl, version: 3.0.19 }
274+ - { name: openssl, version: 3.3.6 }
275+ - { name: openssl, version: 3.4.4 }
276+ - { name: openssl, version: 3.5.5 }
277+ - { name: openssl, version: 3.6.1 }
278+ # # AWS-LC
279+ - { name: aws-lc, version: 1.68.0 }
273280 env :
274- OPENSSL_VER : ${{ matrix.openssl_ver }}
281+ SSLLIB_VER : ${{ matrix.ssllib.version }}
275282 MULTISSL_DIR : ${{ github.workspace }}/multissl
276- OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}
277- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}/lib
283+ SSLLIB_DIR : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}
284+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}/lib
278285 steps :
279286 - uses : actions/checkout@v6
280287 with :
@@ -285,95 +292,37 @@ jobs:
285292 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
286293 - name : Install dependencies
287294 run : sudo ./.github/workflows/posix-deps-apt.sh
288- - name : Configure OpenSSL env vars
289- run : |
290- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
291- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
292- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
293- - name : ' Restore OpenSSL build'
294- id : cache-openssl
295- uses : actions/cache@v5
296- with :
297- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
298- key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
299- - name : Install OpenSSL
300- if : steps.cache-openssl.outputs.cache-hit != 'true'
301- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
302- - name : Add ccache to PATH
303- run : |
304- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
305- - name : Configure CPython
306- run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
307- - name : Build CPython
308- run : make -j4
309- - name : Display build info
310- run : make pythoninfo
311- - name : SSL tests
312- run : ./python Lib/test/ssltests.py
313-
314- build-ubuntu-ssltests-awslc :
315- name : ' Ubuntu SSL tests with AWS-LC'
316- runs-on : ${{ matrix.os }}
317- timeout-minutes : 60
318- needs : build-context
319- if : needs.build-context.outputs.run-ubuntu == 'true'
320- strategy :
321- fail-fast : false
322- matrix :
323- os : [ubuntu-24.04]
324- awslc_ver : [1.55.0]
325- env :
326- AWSLC_VER : ${{ matrix.awslc_ver}}
327- MULTISSL_DIR : ${{ github.workspace }}/multissl
328- OPENSSL_DIR : ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
329- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
330- steps :
331- - uses : actions/checkout@v6
332- with :
333- persist-credentials : false
334- - name : Runner image version
335- run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
336- - name : Register gcc problem matcher
337- run : echo "::add-matcher::.github/problem-matchers/gcc.json"
338- - name : Install dependencies
339- run : sudo ./.github/workflows/posix-deps-apt.sh
340- - name : Configure SSL lib env vars
341- run : |
342- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
343- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}" >> "$GITHUB_ENV"
344- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
345- - name : ' Restore AWS-LC build'
346- id : cache-aws-lc
295+ - name : ' Restore SSL library build'
296+ id : cache-ssl-lib
347297 uses : actions/cache@v5
348298 with :
349- path : ./multissl/aws-lc /${{ matrix.awslc_ver }}
350- key : ${{ matrix.os }}-multissl-aws-lc- ${{ matrix.awslc_ver }}
351- - name : Install AWS-LC
352- if : steps.cache-aws-lc .outputs.cache-hit != 'true'
299+ path : ./multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}
300+ key : ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}- ${{ matrix.ssllib.version }}
301+ - name : Install SSL Library
302+ if : steps.cache-ssl-lib .outputs.cache-hit != 'true'
353303 run : |
354304 python3 Tools/ssl/multissltests.py \
355305 --steps=library \
356306 --base-directory "$MULTISSL_DIR" \
357- --awslc ${{ matrix.awslc_ver }} \
307+ '--${{ matrix.ssllib.name }}' ' ${{ matrix.ssllib.version }}' \
358308 --system Linux
359- - name : Add ccache to PATH
360- run : |
361- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
362309 - name : Configure CPython
363310 run : |
364311 ./configure CFLAGS="-fdiagnostics-format=json" \
365312 --config-cache \
366313 --enable-slower-safety \
367314 --with-pydebug \
368- --with-openssl="$OPENSSL_DIR " \
315+ --with-openssl="$SSLLIB_DIR " \
369316 --with-builtin-hashlib-hashes=blake2 \
370317 --with-ssl-default-suites=openssl
371318 - name : Build CPython
372- run : make -j
319+ run : make -j4
373320 - name : Display build info
374321 run : make pythoninfo
375- - name : Verify python is linked to AWS-LC
376- run : ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | grep AWS-LC
322+ - name : Verify python is linked to the right lib
323+ run : |
324+ ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
325+ | grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
377326 - name : SSL tests
378327 run : ./python Lib/test/ssltests.py
379328
@@ -459,9 +408,6 @@ jobs:
459408 - name : Install OpenSSL
460409 if : steps.cache-openssl.outputs.cache-hit != 'true'
461410 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
462- - name : Add ccache to PATH
463- run : |
464- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
465411 - name : Setup directory envs for out-of-tree builds
466412 run : |
467413 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -577,9 +523,6 @@ jobs:
577523 - name : Install OpenSSL
578524 if : steps.cache-openssl.outputs.cache-hit != 'true'
579525 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
580- - name : Add ccache to PATH
581- run : |
582- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
583526 - name : Configure CPython
584527 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc --with-openssl="$OPENSSL_DIR"
585528 - name : Build CPython
@@ -705,8 +648,7 @@ jobs:
705648 - build-windows-msi
706649 - build-macos
707650 - build-ubuntu
708- - build-ubuntu-ssltests-awslc
709- - build-ubuntu-ssltests-openssl
651+ - build-ubuntu-ssltests
710652 - build-ios
711653 - build-wasi
712654 - test-hypothesis
@@ -723,8 +665,7 @@ jobs:
723665 allowed-failures : >-
724666 build-android,
725667 build-windows-msi,
726- build-ubuntu-ssltests-awslc,
727- build-ubuntu-ssltests-openssl,
668+ build-ubuntu-ssltests,
728669 test-hypothesis,
729670 cifuzz,
730671 allowed-skips : >-
@@ -755,8 +696,7 @@ jobs:
755696 !fromJSON(needs.build-context.outputs.run-ubuntu)
756697 && '
757698 build-ubuntu,
758- build-ubuntu-ssltests-awslc,
759- build-ubuntu-ssltests-openssl,
699+ build-ubuntu-ssltests,
760700 test-hypothesis,
761701 build-asan,
762702 build-san,
0 commit comments