Skip to content

Commit a3684ad

Browse files
authored
build: install Cephes dependency in CI if used in benchmarks
PR-URL: #5378 Closes: stdlib-js/metr-issue-tracker#8 Ref: #2781 (comment) Reviewed-by: Athan Reines <[email protected]>
1 parent 93b976b commit a3684ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/scripts/run_affected_benchmarks

+6
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ main() {
145145
echo "Finding C benchmark files in ${directories}..."
146146
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
147147

148+
# If benchmarks requiring Cephes are found, install the Cephes library:
149+
c_cephes_makefiles=$(find "${directories}" -maxdepth 5 -wholename '**/benchmark/c/**/Makefile' -exec grep -l 'CEPHES' {} + || true)
150+
if [ -n "${c_cephes_makefiles}" ]; then
151+
make install-deps-cephes
152+
fi
153+
148154
if [ -n "${c_bench_files}" ]; then
149155
make benchmark-c-files FILES="${c_bench_files}"
150156
else

0 commit comments

Comments
 (0)