1111 - ' main'
1212 - ' 3.*'
1313
14- permissions :
15- contents : read
14+ permissions : {}
1615
1716concurrency :
1817 # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
@@ -55,16 +54,16 @@ jobs:
5554 needs : build-context
5655 if : needs.build-context.outputs.run-tests == 'true'
5756 steps :
58- - uses : actions/checkout@v6
57+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5958 with :
6059 persist-credentials : false
61- - uses : actions/setup-python@v6
60+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6261 with :
6362 python-version : ' 3.x'
6463 - name : Install dependencies
6564 run : |
6665 sudo ./.github/workflows/posix-deps-apt.sh
67- sudo apt-get install -yq abigail-tools
66+ sudo apt-get install -yq --no-install-recommends abigail-tools
6867 - name : Build CPython
6968 env :
7069 CFLAGS : -g3 -O0
8988 if : ${{ failure() && steps.check.conclusion == 'failure' }}
9089 run : |
9190 make regen-abidump
92- - uses : actions/upload-artifact@v6
91+ - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
9392 name : Publish updated ABI files
9493 if : ${{ failure() && steps.check.conclusion == 'failure' }}
9594 with :
@@ -111,7 +110,7 @@ jobs:
111110 run : |
112111 apt update && apt install git -yq
113112 git config --global --add safe.directory "$GITHUB_WORKSPACE"
114- - uses : actions/checkout@v6
113+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
115114 with :
116115 fetch-depth : 1
117116 persist-credentials : false
@@ -148,18 +147,16 @@ jobs:
148147 needs : build-context
149148 if : needs.build-context.outputs.run-tests == 'true'
150149 steps :
151- - uses : actions/checkout@v6
150+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
152151 with :
153152 persist-credentials : false
154- - uses : actions/setup-python@v6
153+ - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
155154 with :
156155 python-version : ' 3.x'
157156 - name : Runner image version
158157 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
159158 - name : Install dependencies
160159 run : sudo ./.github/workflows/posix-deps-apt.sh
161- - name : Add ccache to PATH
162- run : echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
163160 - name : Configure CPython
164161 run : |
165162 # Build Python with the libpython dynamic library
@@ -242,10 +239,10 @@ jobs:
242239 strategy :
243240 fail-fast : false
244241 matrix :
245- # macos-14 is M1 , macos-15-intel is Intel.
242+ # macos-26 is Apple Silicon , macos-15-intel is Intel.
246243 # macos-15-intel only runs tests against the GIL-enabled CPython.
247244 os :
248- - macos-14
245+ - macos-26
249246 - macos-15-intel
250247 free-threading :
251248 - false
@@ -291,7 +288,7 @@ jobs:
291288 os : ${{ matrix.os }}
292289
293290 build-ubuntu-ssltests :
294- name : ' Ubuntu SSL tests with OpenSSL '
291+ name : ' Ubuntu SSL tests'
295292 runs-on : ${{ matrix.os }}
296293 timeout-minutes : 60
297294 needs : build-context
@@ -300,18 +297,25 @@ jobs:
300297 fail-fast : false
301298 matrix :
302299 os : [ubuntu-24.04]
303- # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304- # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305- # supported by important vendors such as AWS-LC.
306- openssl_ver : [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
307- # See Tools/ssl/make_ssl_data.py for notes on adding a new version
300+ ssllib :
301+ # See Tools/ssl/make_ssl_data.py for notes on adding a new version
302+ # # OpenSSL
303+ # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304+ # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305+ # supported by important vendors such as AWS-LC.
306+ - { name: openssl, version: 1.1.1w }
307+ - { name: openssl, version: 3.0.19 }
308+ - { name: openssl, version: 3.3.6 }
309+ - { name: openssl, version: 3.4.4 }
310+ - { name: openssl, version: 3.5.5 }
311+ - { name: openssl, version: 3.6.1 }
308312 env :
309- OPENSSL_VER : ${{ matrix.openssl_ver }}
313+ SSLLIB_VER : ${{ matrix.ssllib.version }}
310314 MULTISSL_DIR : ${{ github.workspace }}/multissl
311- OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}
312- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}/lib
315+ SSLLIB_DIR : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}
316+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}/lib
313317 steps :
314- - uses : actions/checkout@v6
318+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
315319 with :
316320 persist-credentials : false
317321 - name : Runner image version
@@ -320,29 +324,37 @@ jobs:
320324 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
321325 - name : Install dependencies
322326 run : sudo ./.github/workflows/posix-deps-apt.sh
323- - name : Configure OpenSSL env vars
324- run : |
325- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
326- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
327- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
328- - name : ' Restore OpenSSL build'
329- id : cache-openssl
330- uses : actions/cache@v5
327+ - name : ' Restore SSL library build'
328+ id : cache-ssl-lib
329+ uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
331330 with :
332- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
333- key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
334- - name : Install OpenSSL
335- if : steps.cache-openssl.outputs.cache-hit != 'true'
336- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
337- - name : Add ccache to PATH
331+ path : ./multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
332+ key : ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}-${{ matrix.ssllib.version }}
333+ - name : Install SSL Library
334+ if : steps.cache-ssl-lib.outputs.cache-hit != 'true'
338335 run : |
339- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
336+ python3 Tools/ssl/multissltests.py \
337+ --steps=library \
338+ --base-directory "$MULTISSL_DIR" \
339+ '--${{ matrix.ssllib.name }}' '${{ matrix.ssllib.version }}' \
340+ --system Linux
340341 - name : Configure CPython
341- run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
342+ run : |
343+ ./configure CFLAGS="-fdiagnostics-format=json" \
344+ --config-cache \
345+ --enable-slower-safety \
346+ --with-pydebug \
347+ --with-openssl="$SSLLIB_DIR" \
348+ --with-builtin-hashlib-hashes=blake2 \
349+ --with-ssl-default-suites=openssl
342350 - name : Build CPython
343351 run : make -j4
344352 - name : Display build info
345353 run : make pythoninfo
354+ - name : Verify python is linked to the right lib
355+ run : |
356+ ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
357+ | grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
346358 - name : SSL tests
347359 run : ./python Lib/test/ssltests.py
348360
@@ -356,13 +368,13 @@ jobs:
356368 matrix :
357369 include :
358370 - arch : aarch64
359- runs-on : macos-14
371+ runs-on : macos-26
360372 - arch : x86_64
361373 runs-on : ubuntu-24.04
362374
363375 runs-on : ${{ matrix.runs-on }}
364376 steps :
365- - uses : actions/checkout@v6
377+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
366378 with :
367379 persist-credentials : false
368380 - name : Build and test
@@ -375,7 +387,7 @@ jobs:
375387 timeout-minutes : 60
376388 runs-on : macos-14
377389 steps :
378- - uses : actions/checkout@v6
390+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
379391 with :
380392 persist-credentials : false
381393
@@ -391,6 +403,12 @@ jobs:
391403 - name : Build and test
392404 run : python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
393405
406+ build-emscripten :
407+ name : ' Emscripten'
408+ needs : build-context
409+ if : needs.build-context.outputs.run-emscripten == 'true'
410+ uses : ./.github/workflows/reusable-emscripten.yml
411+
394412 build-wasi :
395413 name : ' WASI'
396414 needs : build-context
@@ -407,7 +425,7 @@ jobs:
407425 OPENSSL_VER : 3.0.18
408426 PYTHONSTRICTEXTENSIONBUILD : 1
409427 steps :
410- - uses : actions/checkout@v6
428+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
411429 with :
412430 persist-credentials : false
413431 - name : Register gcc problem matcher
@@ -421,16 +439,13 @@ jobs:
421439 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
422440 - name : ' Restore OpenSSL build'
423441 id : cache-openssl
424- uses : actions/cache@v5
442+ uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
425443 with :
426444 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
427445 key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
428446 - name : Install OpenSSL
429447 if : steps.cache-openssl.outputs.cache-hit != 'true'
430448 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
431- - name : Add ccache to PATH
432- run : |
433- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
434449 - name : Setup directory envs for out-of-tree builds
435450 run : |
436451 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -471,7 +486,7 @@ jobs:
471486 ./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt"
472487 - name : ' Restore Hypothesis database'
473488 id : cache-hypothesis-database
474- uses : actions/cache@v5
489+ uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
475490 with :
476491 path : ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/
477492 key : hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -498,7 +513,7 @@ jobs:
498513 -x test_subprocess \
499514 -x test_signal \
500515 -x test_sysconfig
501- - uses : actions/upload-artifact@v6
516+ - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
502517 if : always()
503518 with :
504519 name : hypothesis-example-db
@@ -519,7 +534,7 @@ jobs:
519534 PYTHONSTRICTEXTENSIONBUILD : 1
520535 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
521536 steps :
522- - uses : actions/checkout@v6
537+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
523538 with :
524539 persist-credentials : false
525540 - name : Runner image version
@@ -529,7 +544,7 @@ jobs:
529544 - name : Install dependencies
530545 run : sudo ./.github/workflows/posix-deps-apt.sh
531546 - name : Set up GCC-10 for ASAN
532- uses : egor-tensin/setup-gcc@v2
547+ uses : egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
533548 with :
534549 version : 10
535550 - name : Configure OpenSSL env vars
@@ -539,16 +554,13 @@ jobs:
539554 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
540555 - name : ' Restore OpenSSL build'
541556 id : cache-openssl
542- uses : actions/cache@v5
557+ uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
543558 with :
544559 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
545560 key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
546561 - name : Install OpenSSL
547562 if : steps.cache-openssl.outputs.cache-hit != 'true'
548563 run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
549- - name : Add ccache to PATH
550- run : |
551- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
552564 - name : Configure CPython
553565 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc
554566 - name : Build CPython
@@ -589,7 +601,7 @@ jobs:
589601 needs : build-context
590602 if : needs.build-context.outputs.run-ubuntu == 'true'
591603 steps :
592- - uses : actions/checkout@v6
604+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
593605 with :
594606 persist-credentials : false
595607 - name : Runner image version
@@ -675,6 +687,7 @@ jobs:
675687 - build-ubuntu
676688 - build-ubuntu-ssltests
677689 - build-ios
690+ - build-emscripten
678691 - build-wasi
679692 - test-hypothesis
680693 - build-asan
@@ -689,6 +702,7 @@ jobs:
689702 with :
690703 allowed-failures : >-
691704 build-android,
705+ build-emscripten,
692706 build-windows-msi,
693707 build-ubuntu-ssltests,
694708 test-hypothesis,
@@ -725,5 +739,6 @@ jobs:
725739 }}
726740 ${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
727741 ${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
742+ ${{ !fromJSON(needs.build-context.outputs.run-emscripten) && 'build-emscripten,' || '' }}
728743 ${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
729744 jobs : ${{ toJSON(needs) }}
0 commit comments