@@ -641,45 +641,45 @@ jobs:
641641 run : |
642642 "$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
643643
644- # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
645644 cifuzz :
646- name : CIFuzz
647- runs-on : ubuntu-latest
648- timeout-minutes : 60
645+ # ${{ '' } is a hack to nest jobs under the same sidebar category.
646+ name : CIFuzz${{ '' }} # zizmor: ignore[obfuscation]
649647 needs : build-context
650- 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'
651651 permissions :
652652 security-events : write
653653 strategy :
654654 fail-fast : false
655655 matrix :
656- sanitizer : [address, undefined, memory]
657- steps :
658- - name : Build fuzzers (${{ matrix.sanitizer }})
659- id : build
660- uses : google/ oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
661- with :
662- oss-fuzz-project-name : cpython3
663- sanitizer : ${{ matrix.sanitizer }}
664- - name : Run fuzzers (${{ matrix.sanitizer }})
665- uses : google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
666- with :
667- fuzz-seconds : 600
668- oss-fuzz-project-name : cpython3
669- output-sarif : true
670- sanitizer : ${{ matrix.sanitizer }}
671- - name : Upload crash
672- if : failure() && steps.build.outcome == 'success'
673- uses : actions/upload-artifact@v6
674- with :
675- name : ${{ matrix.sanitizer }}-artifacts
676- path : ./out/artifacts
677- - name : Upload SARIF
678- if : always() && steps.build.outcome == 'success'
679- uses : github/codeql-action/upload-sarif@v4
680- with :
681- sarif_file : cifuzz-sarif/results.sarif
682- 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 }}
683683
684684 all-required-green : # This job does nothing and is only used for the branch protection
685685 name : All required checks pass
@@ -734,7 +734,12 @@ jobs:
734734 || ''
735735 }}
736736 ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
737- ${{ !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+ }}
738743 ${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
739744 ${{
740745 !fromJSON(needs.build-context.outputs.run-ubuntu)
0 commit comments