From 70fbfbe8b831f309f329626fe0fe408d924316a7 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:27:19 +0200 Subject: [PATCH] Test using asv compare --- .github/workflows/benchmarks.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index ade00b942e7..5fa883f05a8 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -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: |