From: Terry Burton Date: Sun, 24 Oct 2021 19:09:21 +0000 (+0100) Subject: Fixed for nightly fuzzing to align with new Make approach (#4289) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2222e67a31caf239cb62cb2dfc44ae161a98761a;p=thirdparty%2Ffreeradius-server.git Fixed for nightly fuzzing to align with new Make approach (#4289) * Fix nightly fuzzing; dynamic matrix of protocols to fuzz * CI: Don't run all tests for special fuzzer runs --- diff --git a/.github/workflows/ci-deb.yml b/.github/workflows/ci-deb.yml index d70c41fa911..7b7079b8f4d 100644 --- a/.github/workflows/ci-deb.yml +++ b/.github/workflows/ci-deb.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - coverity_scan + - run-fuzzer** schedule: - cron: '0 20 * * *' diff --git a/.github/workflows/ci-rpm.yml b/.github/workflows/ci-rpm.yml index 1f13238f10e..9a5bf20e26a 100644 --- a/.github/workflows/ci-rpm.yml +++ b/.github/workflows/ci-rpm.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - coverity_scan + - run-fuzzer** schedule: - cron: '0 20 * * *' diff --git a/.github/workflows/ci-scheduled-fuzzing.yml b/.github/workflows/ci-scheduled-fuzzing.yml index 9a589ad9c8d..6fdf114ce5d 100644 --- a/.github/workflows/ci-scheduled-fuzzing.yml +++ b/.github/workflows/ci-scheduled-fuzzing.yml @@ -33,20 +33,65 @@ env: CC: clang jobs: + + # + # Constructs a matrix of protocols to fuzz as JSON that when set in the main + # fuzzer job is equivalent to the following YAML: + # + # matrix: + # env: + # - { "PROTOCOL": "radius", "TOTAL_RUNTIME": "20000" } + # - { "PROTOCOL": "dhcpv4", "TOTAL_RUNTIME": "20000" } + # - ... + # + set-matrix: + + name: Setup build matrix + + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + + - uses: actions/checkout@v2 + with: + lfs: false + + - id: set-matrix + name: Setup the matrix + run: | + # + # 20000s is just short of the 6h GitHub Action job limit + # + TIMEOUT=20000 + P=$( + for PROTO in `sed -ne 's/^FUZZER_PROTOCOLS\s\+=\s\+\(.*\)/\1/p' src/bin/all.mk`; do + echo "{ \"PROTOCOL\": \"$PROTO\", \"TOTAL_RUNTIME\": \"$TIMEOUT\" }," + done + ) + M=$(cat <