6464 run : |
6565 apt update && apt install git -yq
6666 git config --global --add safe.directory "$GITHUB_WORKSPACE"
67- - uses : actions/checkout@v4
67+ - uses : actions/checkout@v6
6868 with :
6969 fetch-depth : 1
7070 persist-credentials : false
@@ -101,10 +101,10 @@ jobs:
101101 needs : build-context
102102 if : needs.build-context.outputs.run-tests == 'true'
103103 steps :
104- - uses : actions/checkout@v4
104+ - uses : actions/checkout@v6
105105 with :
106106 persist-credentials : false
107- - uses : actions/setup-python@v5
107+ - uses : actions/setup-python@v6
108108 with :
109109 python-version : ' 3.x'
110110 - name : Runner image version
@@ -142,9 +142,14 @@ jobs:
142142 - name : Check for unsupported C global variables
143143 if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
144144 run : make check-c-globals
145- - name : Check for undocumented C APIs
146- run : make check-c-api-docs
147145
146+ check-c-api-docs :
147+ name : C API Docs
148+ needs : build-context
149+ if : >-
150+ needs.build-context.outputs.run-tests == 'true'
151+ || needs.build-context.outputs.run-docs == 'true'
152+ uses : ./.github/workflows/reusable-check-c-api-docs.yml
148153
149154 build-windows :
150155 name : >-
@@ -264,7 +269,7 @@ jobs:
264269 OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
265270 LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
266271 steps :
267- - uses : actions/checkout@v4
272+ - uses : actions/checkout@v6
268273 with :
269274 persist-credentials : false
270275 - name : Runner image version
@@ -280,7 +285,7 @@ jobs:
280285 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
281286 - name : ' Restore OpenSSL build'
282287 id : cache-openssl
283- uses : actions/cache@v4
288+ uses : actions/cache@v5
284289 with :
285290 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
286291 key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -316,7 +321,7 @@ jobs:
316321 OPENSSL_DIR : ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
317322 LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
318323 steps :
319- - uses : actions/checkout@v4
324+ - uses : actions/checkout@v6
320325 with :
321326 persist-credentials : false
322327 - name : Runner image version
@@ -332,7 +337,7 @@ jobs:
332337 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
333338 - name : ' Restore AWS-LC build'
334339 id : cache-aws-lc
335- uses : actions/cache@v4
340+ uses : actions/cache@v5
336341 with :
337342 path : ./multissl/aws-lc/${{ matrix.awslc_ver }}
338343 key : ${{ matrix.os }}-multissl-aws-lc-${{ matrix.awslc_ver }}
@@ -381,7 +386,7 @@ jobs:
381386
382387 runs-on : ${{ matrix.runs-on }}
383388 steps :
384- - uses : actions/checkout@v4
389+ - uses : actions/checkout@v6
385390 with :
386391 persist-credentials : false
387392 - name : Build and test
@@ -394,7 +399,7 @@ jobs:
394399 timeout-minutes : 60
395400 runs-on : macos-14
396401 steps :
397- - uses : actions/checkout@v4
402+ - uses : actions/checkout@v6
398403 with :
399404 persist-credentials : false
400405
@@ -426,7 +431,7 @@ jobs:
426431 OPENSSL_VER : 3.0.18
427432 PYTHONSTRICTEXTENSIONBUILD : 1
428433 steps :
429- - uses : actions/checkout@v4
434+ - uses : actions/checkout@v6
430435 with :
431436 persist-credentials : false
432437 - name : Register gcc problem matcher
@@ -440,7 +445,7 @@ jobs:
440445 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
441446 - name : ' Restore OpenSSL build'
442447 id : cache-openssl
443- uses : actions/cache@v4
448+ uses : actions/cache@v5
444449 with :
445450 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
446451 key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -490,7 +495,7 @@ jobs:
490495 ./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt"
491496 - name : ' Restore Hypothesis database'
492497 id : cache-hypothesis-database
493- uses : actions/cache@v4
498+ uses : actions/cache@v5
494499 with :
495500 path : ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/
496501 key : hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -517,7 +522,7 @@ jobs:
517522 -x test_subprocess \
518523 -x test_signal \
519524 -x test_sysconfig
520- - uses : actions/upload-artifact@v4
525+ - uses : actions/upload-artifact@v6
521526 if : always()
522527 with :
523528 name : hypothesis-example-db
@@ -538,7 +543,7 @@ jobs:
538543 PYTHONSTRICTEXTENSIONBUILD : 1
539544 ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
540545 steps :
541- - uses : actions/checkout@v4
546+ - uses : actions/checkout@v6
542547 with :
543548 persist-credentials : false
544549 - name : Runner image version
@@ -548,7 +553,7 @@ jobs:
548553 - name : Install dependencies
549554 run : sudo ./.github/workflows/posix-deps-apt.sh
550555 - name : Set up GCC-10 for ASAN
551- uses : egor-tensin/setup-gcc@v1
556+ uses : egor-tensin/setup-gcc@v2
552557 with :
553558 version : 10
554559 - name : Configure OpenSSL env vars
@@ -558,7 +563,7 @@ jobs:
558563 echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
559564 - name : ' Restore OpenSSL build'
560565 id : cache-openssl
561- uses : actions/cache@v4
566+ uses : actions/cache@v5
562567 with :
563568 path : ./multissl/openssl/${{ env.OPENSSL_VER }}
564569 key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -608,7 +613,7 @@ jobs:
608613 needs : build-context
609614 if : needs.build-context.outputs.run-ubuntu == 'true'
610615 steps :
611- - uses : actions/checkout@v4
616+ - uses : actions/checkout@v6
612617 with :
613618 persist-credentials : false
614619 - name : Runner image version
@@ -636,45 +641,45 @@ jobs:
636641 run : |
637642 "$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
638643
639- # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
640644 cifuzz :
641- name : CIFuzz
642- runs-on : ubuntu-latest
643- timeout-minutes : 60
645+ # ${{ '' } is a hack to nest jobs under the same sidebar category.
646+ name : CIFuzz${{ '' }} # zizmor: ignore[obfuscation]
644647 needs : build-context
645- if : needs.build-context.outputs.run-ci-fuzz == 'true'
648+ if : >-
649+ needs.build-context.outputs.run-ci-fuzz == 'true'
650+ || needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
646651 permissions :
647652 security-events : write
648653 strategy :
649654 fail-fast : false
650655 matrix :
651- sanitizer : [address, undefined, memory]
652- steps :
653- - name : Build fuzzers (${{ matrix.sanitizer }})
654- id : build
655- uses : google/ oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
656- with :
657- oss-fuzz-project-name : cpython3
658- sanitizer : ${{ matrix.sanitizer }}
659- - name : Run fuzzers (${{ matrix.sanitizer }})
660- uses : google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
661- with :
662- fuzz-seconds : 600
663- oss-fuzz-project-name : cpython3
664- output-sarif : true
665- sanitizer : ${{ matrix.sanitizer }}
666- - name : Upload crash
667- if : failure() && steps.build.outcome == 'success'
668- uses : actions/upload-artifact@v4
669- with :
670- name : ${{ matrix.sanitizer }}-artifacts
671- path : ./out/artifacts
672- - name : Upload SARIF
673- if : always() && steps.build.outcome == 'success'
674- uses : github/codeql-action/upload-sarif@v3
675- with :
676- sarif_file : cifuzz-sarif/results.sarif
677- checkout_path : cifuzz-sarif
656+ sanitizer :
657+ - address
658+ - undefined
659+ - memory
660+ oss-fuzz-project-name :
661+ - cpython3
662+ - python3-libraries
663+ exclude :
664+ # Note that the 'no-exclude' sentinel below is to prevent
665+ # an empty string value from excluding all jobs and causing
666+ # GHA to create a 'default' matrix entry with all empty values.
667+ - oss- fuzz-project-name : >-
668+ ${{
669+ needs.build-context.outputs.run-ci-fuzz == ' true'
670+ && 'no-exclude'
671+ || 'cpython3'
672+ }}
673+ - oss-fuzz-project-name : >-
674+ ${{
675+ needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
676+ && 'no-exclude'
677+ || 'python3-libraries'
678+ }}
679+ uses : ./. github/workflows/reusable-cifuzz.yml
680+ with :
681+ oss-fuzz-project-name : ${{ matrix.oss-fuzz-project-name }}
682+ sanitizer : ${{ matrix.sanitizer }}
678683
679684 all-required-green : # This job does nothing and is only used for the branch protection
680685 name : All required checks pass
@@ -685,6 +690,7 @@ jobs:
685690 - check-docs
686691 - check-autoconf-regen
687692 - check-generated-files
693+ - check-c-api-docs
688694 - build-windows
689695 - build-windows-msi
690696 - build-macos
@@ -721,8 +727,19 @@ jobs:
721727 '
722728 || ''
723729 }}
730+ ${{
731+ !fromJSON(needs.build-context.outputs.run-tests)
732+ && !fromJSON(needs.build-context.outputs.run-docs)
733+ && 'check-c-api-docs,'
734+ || ''
735+ }}
724736 ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
725- ${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
737+ ${{
738+ !fromJSON(needs.build-context.outputs.run-ci-fuzz)
739+ && !fromJSON(needs.build-context.outputs.run-ci-fuzz-stdlib)
740+ && 'cifuzz,' ||
741+ ''
742+ }}
726743 ${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
727744 ${{
728745 !fromJSON(needs.build-context.outputs.run-ubuntu)
0 commit comments