mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-11-25 16:52:50 +00:00
ci: initial benchmarking workflows
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I367444097eafbd1020c02707c42351bf6a6a6964
This commit is contained in:
parent
f4f3385ff7
commit
789ece866b
2 changed files with 120 additions and 0 deletions
57
.github/workflows/hotpath-comment.yml
vendored
Normal file
57
.github/workflows/hotpath-comment.yml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Hotpath Comment
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Hotpath Profile"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Download profiling results
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: hotpath-results
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Read PR number
|
||||
id: pr
|
||||
run: echo "number=$(cat pr_number.txt)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup Rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: Install hotpath CLI
|
||||
run: cargo install hotpath
|
||||
|
||||
- name: Post timing comparison comment
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
hotpath profile-pr \
|
||||
--repo ${{ github.repository }} \
|
||||
--pr-number ${{ steps.pr.outputs.number }} \
|
||||
--head-json head-timing.json \
|
||||
--base-json base-timing.json \
|
||||
--mode timing \
|
||||
--title "⏱️ Hotpath Timing Profile"
|
||||
|
||||
- name: Post allocation comparison comment
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
hotpath profile-pr \
|
||||
--repo ${{ github.repository }} \
|
||||
--pr-number ${{ steps.pr.outputs.number }} \
|
||||
--head-json head-alloc.json \
|
||||
--base-json base-alloc.json \
|
||||
--mode alloc \
|
||||
--title "📊 Hotpath Allocation Profile"
|
||||
Loading…
Add table
Add a link
Reference in a new issue