bench.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: 📈 Benchmark
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ '**' ]
  7. jobs:
  8. benchmark:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout Repository
  12. uses: actions/checkout@v4
  13. - name: Install Rust Toolchain
  14. uses: actions-rs/toolchain@v1
  15. with:
  16. override: true
  17. toolchain: stable
  18. profile: minimal
  19. - name: Cache Project
  20. uses: Swatinem/rust-cache@v2
  21. - name: Run Benchmark
  22. run: cargo bench -q -p wnfs-bench -- --output-format bencher | tee output.txt
  23. - name: Upload Benchmark Result Artifact
  24. uses: actions/upload-artifact@v4
  25. with:
  26. name: bench_result
  27. path: output.txt
  28. - name: Store Benchmark Result
  29. uses: benchmark-action/github-action-benchmark@v1
  30. with:
  31. name: Rust Benchmark
  32. tool: 'cargo'
  33. output-file-path: output.txt
  34. github-token: ${{ secrets.GITHUB_TOKEN }}
  35. auto-push: ${{ github.event_name == 'push' && github.repository == 'wnfs-wg/rs-wnfs' && github.ref == 'refs/heads/main' }}
  36. alert-threshold: '200%'
  37. comment-on-alert: true
  38. fail-on-alert: true
  39. alert-comment-cc-users: '@wnfs-wg/fission'