File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -546,12 +546,15 @@ benchmark-comparison)
546546 clean
547547 LIT_ARGS=" -sv -j1 --param optimization=speed libcxx/test/benchmarks/hash.bench.cpp libcxx/test/benchmarks/join_view.bench.cpp"
548548
549- if [[ " ${BASELINE_COMMIT} " == " " ]]; then
550- BASELINE_COMMIT=$( git merge-base main HEAD)
549+ if [[ " ${GITHUB_BASE_REF} " != " " ]]; then # triggered from a PR
550+ baseline_commit=$( git merge-base ${GITHUB_BASE_REF} ${GITHUB_SHA} )
551+ else
552+ baseline_commit=$( git merge-base main HEAD)
551553 fi
552- step " Building and running the baseline at ${BASELINE_COMMIT} "
554+
555+ step " Building and running the baseline at ${baseline_commit} "
553556 rm -rf " ${BUILD_DIR} -baseline"
554- ./libcxx/utils/test-at-commit --commit ${BASELINE_COMMIT } -B " ${BUILD_DIR} -baseline" -- ${LIT_ARGS}
557+ ./libcxx/utils/test-at-commit --commit ${baseline_commit } -B " ${BUILD_DIR} -baseline" -- ${LIT_ARGS}
555558
556559 # Build and run the candidate
557560 step " Building and running the candidate"
You can’t perform that action at this time.
0 commit comments