Skip to content

Commit

Permalink
Only run benchmarks on current branch in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
rlouf committed Oct 21, 2024
1 parent 74e4eb5 commit eb2d165
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/asv_benchmark_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# prepare main branch for comparison
git remote add upstream https://github.com/${{ github.repository }}.git
git fetch upstream main
# Run benchmarks, allow errors, they will be caught in the next step
asv run --interleave-rounds -a repeat=3 || true
- name: BENCHMARK RESULTS
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/asv_benchmarks_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,11 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# prepare main branch for comparison
git remote add upstream https://github.com/${{ github.repository }}.git
git fetch upstream main
# Run benchmarks, allow errors, they will be caught in the next step
asv continuous --quick upstream/main HEAD \
--no-stats --interleave-rounds -a repeat=3 || true
asv run --quick --interleave-rounds -a repeat=3 || true
- name: BENCHMARK RESULTS
run: |
asv compare --factor=1.1 --no-stats --split upstream/main HEAD | tee ${{ env.BENCHMARKS_OUTPUT }}
if grep -q "Benchmarks that have got worse" "${{ env.BENCHMARKS_OUTPUT }}"; then
echo "Performance degradation detected!"
exit 1
fi
asv show HEAD
- name: Upload Benchmark Results Folder
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit eb2d165

Please sign in to comment.