diff --git a/.github/workflows/scripts/run_affected_benchmarks b/.github/workflows/scripts/run_affected_benchmarks index d07397af25dc..b37c7a4e1184 100755 --- a/.github/workflows/scripts/run_affected_benchmarks +++ b/.github/workflows/scripts/run_affected_benchmarks @@ -145,6 +145,12 @@ main() { echo "Finding C benchmark files in ${directories}..." c_bench_files=$(find "${directories}" -maxdepth 5 \( -wholename '**/benchmark/c/benchmark*.c' -or -wholename '**/benchmark/c/**/benchmark*.c' \) -exec realpath {} \; | grep -v '/fixtures/' | sort -u | tr '\n' ' ') || true + # If benchmarks requiring Cephes are found, install the Cephes library: + c_cephes_makefiles=$(find "${directories}" -maxdepth 5 -wholename '**/benchmark/c/**/Makefile' -exec grep -l 'CEPHES' {} + || true) + if [ -n "${c_cephes_makefiles}" ]; then + make install-deps-cephes + fi + if [ -n "${c_bench_files}" ]; then make benchmark-c-files FILES="${c_bench_files}" else