From de9330538df258286c65143acbd972722318491e Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Sat, 22 Feb 2025 14:27:12 -0500 Subject: [PATCH] build: install Cephes dependency if used in benchmarks --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .github/workflows/scripts/run_affected_benchmarks | 6 ++++++ 1 file changed, 6 insertions(+) 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