Skip to content

Test using asv compare #7975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,35 @@ jobs:
export CONDA_EXE=$(which conda)
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \
# asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \
# | sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
# | tee benchmarks.log
asv continuous origin/${{github.base_ref}} HEAD $ASV_OPTIONS \
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
| tee benchmarks.log
asv compare origin/${{github.base_ref}} HEAD --split --sort ratio \
| tee -a asv_compare.log
mkdir comment_log
mv asv_compare.log comment_log/
# Report and export results for subsequent steps
if grep "Traceback \|failed\|PERFORMANCE DECREASED" benchmarks.log > /dev/null ; then
exit 1
fi
working-directory: ${{ env.ASV_DIR }}

- name: Save PR Number
env:
PR_NUMBER: ${{github.event.pull_request.number}}
run: |
echo $PR_NUMBER > ./comment_log/pr_number
working-directory: ${{ env.ASV_DIR }}

- name: Upload the compare log
uses: actions/upload-artifact@v3
with:
name: comment_log
path: benchmark/comment_log/

- name: Add instructions to artifact
if: always()
run: |
Expand Down