.github: make ipc_fuzzer.yml callable with duration parameter

So we can run it for longer in daily tests.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-12-05 14:44:19 -08:00 committed by Kai Vehmanen
parent 33ef5f6a7d
commit bca9623713
1 changed files with 18 additions and 2 deletions

View File

@ -6,7 +6,21 @@ name: IPC fuzzing
# 'Actions' tab # 'Actions' tab
# yamllint disable-line rule:truthy # yamllint disable-line rule:truthy
on: [pull_request, workflow_dispatch] on:
workflow_call:
inputs:
fuzzing_duration_s:
type: number
default: 300 # 5 minutes
workflow_dispatch:
inputs:
fuzzing_duration_s:
type: number
default: 300
pull_request:
# TODO: can we provide a default inputs here too?
jobs: jobs:
@ -66,7 +80,9 @@ jobs:
IPC3) cmake_arg='-DCONFIG_IPC_MAJOR_3=y' ;; IPC3) cmake_arg='-DCONFIG_IPC_MAJOR_3=y' ;;
IPC4) cmake_arg='-DCONFIG_IPC_MAJOR_4=y' ;; IPC4) cmake_arg='-DCONFIG_IPC_MAJOR_4=y' ;;
esac esac
sof/scripts/fuzz.sh -o fuzz-stdout.txt -t 300 -- "$cmake_arg" duration="${{inputs.fuzzing_duration_s}}"
duration="${duration:-301}" # pull_request has not 'inputs.' :-(
sof/scripts/fuzz.sh -o fuzz-stdout.txt -t "$duration" -- "$cmake_arg"
- name: Upload stdout - name: Upload stdout
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3