mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-08 05:53:51 +00:00
ci: streamline workflows; remove tagged release workflow
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1432980533dee11b64a53d2ad2f2094d6a6a6964
This commit is contained in:
parent
48c3807148
commit
8d97a9e8ec
2 changed files with 48 additions and 33 deletions
51
.github/workflows/hotpath-comment.yml
vendored
51
.github/workflows/hotpath-comment.yml
vendored
|
|
@ -1,12 +1,13 @@
|
||||||
name: Hotpath Comment
|
name: hotpath-comment
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["Hotpath Profile"]
|
workflows: ["hotpath-profile"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -15,17 +16,17 @@ jobs:
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download profiling results
|
- name: Download profiling results
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hotpath-results
|
name: hotpath-results
|
||||||
|
path: /tmp/
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run-id: ${{ github.event.workflow_run.id }}
|
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
|
- name: Setup Rust
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
||||||
|
|
@ -33,17 +34,29 @@ jobs:
|
||||||
run: cargo install hotpath
|
run: cargo install hotpath
|
||||||
|
|
||||||
- name: Post timing comparison comment
|
- name: Post timing comparison comment
|
||||||
run: |
|
env:
|
||||||
hotpath profile-pr \
|
GH_TOKEN: ${{ github.token }}
|
||||||
--head-metrics head-timing.json \
|
run: |
|
||||||
--base-metrics base-timing.json \
|
set -euo pipefail
|
||||||
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
HEAD_METRICS=$(cat /tmp/head_timing.json)
|
||||||
--pr-number ${{ steps.pr.outputs.number }}
|
BASE_METRICS=$(cat /tmp/base_timing.json)
|
||||||
|
PR_NUMBER=$(cat /tmp/pr_number.txt)
|
||||||
|
hotpath profile-pr \
|
||||||
|
--head-metrics "$HEAD_METRICS" \
|
||||||
|
--base-metrics "$BASE_METRICS" \
|
||||||
|
--github-token "$GH_TOKEN" \
|
||||||
|
--pr-number "$PR_NUMBER"
|
||||||
|
|
||||||
- name: Post allocation comparison comment
|
- name: Post allocation comparison comment
|
||||||
run: |
|
env:
|
||||||
hotpath profile-pr \
|
GH_TOKEN: ${{ github.token }}
|
||||||
--head-metrics head-alloc.json \
|
run: |
|
||||||
--base-metrics base-alloc.json \
|
set -euo pipefail
|
||||||
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
HEAD_METRICS=$(cat /tmp/head_alloc.json)
|
||||||
--pr-number ${{ steps.pr.outputs.number }}
|
BASE_METRICS=$(cat /tmp/base_alloc.json)
|
||||||
|
PR_NUMBER=$(cat /tmp/pr_number.txt)
|
||||||
|
hotpath profile-pr \
|
||||||
|
--head-metrics "$HEAD_METRICS" \
|
||||||
|
--base-metrics "$BASE_METRICS" \
|
||||||
|
--github-token "$GH_TOKEN" \
|
||||||
|
--pr-number "$PR_NUMBER"
|
||||||
|
|
|
||||||
30
.github/workflows/hotpath-profile.yml
vendored
30
.github/workflows/hotpath-profile.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Hotpath Profile
|
name: hotpath-profile
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
@ -14,6 +14,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout PR HEAD
|
- name: Checkout PR HEAD
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
|
@ -22,42 +24,42 @@ jobs:
|
||||||
env:
|
env:
|
||||||
HOTPATH_JSON: "true"
|
HOTPATH_JSON: "true"
|
||||||
run: |
|
run: |
|
||||||
cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > head-timing.json
|
cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/head_timing.json
|
||||||
|
|
||||||
- name: Run allocation profiling on HEAD
|
- name: Run allocation profiling on HEAD
|
||||||
env:
|
env:
|
||||||
HOTPATH_JSON: "true"
|
HOTPATH_JSON: "true"
|
||||||
run: |
|
run: |
|
||||||
cargo run --features='hotpath,hotpath-alloc-count-total' 2>&1 | grep '^{"hotpath_profiling_mode"' > head-alloc.json
|
cargo run --features='hotpath,hotpath-alloc' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/head_alloc.json
|
||||||
|
|
||||||
- name: Checkout base branch
|
- name: Checkout base branch
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
with:
|
git checkout ${{ github.event.pull_request.base.sha }}
|
||||||
ref: ${{ github.event.pull_request.base.sha }}
|
|
||||||
|
|
||||||
- name: Run timing profiling on base
|
- name: Run timing profiling on base
|
||||||
env:
|
env:
|
||||||
HOTPATH_JSON: "true"
|
HOTPATH_JSON: "true"
|
||||||
run: |
|
run: |
|
||||||
cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > base-timing.json
|
cargo run --features='hotpath' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/base_timing.json || echo '{}' > /tmp/base_timing.json
|
||||||
|
|
||||||
- name: Run allocation profiling on base
|
- name: Run allocation profiling on base
|
||||||
env:
|
env:
|
||||||
HOTPATH_JSON: "true"
|
HOTPATH_JSON: "true"
|
||||||
run: |
|
run: |
|
||||||
cargo run --features='hotpath,hotpath-alloc-count-total' 2>&1 | grep '^{"hotpath_profiling_mode"' > base-alloc.json
|
cargo run --features='hotpath,hotpath-alloc' 2>&1 | grep '^{"hotpath_profiling_mode"' > /tmp/base_alloc.json || echo '{}' > /tmp/base_alloc.json
|
||||||
|
|
||||||
- name: Save PR number
|
- name: Save PR number
|
||||||
run: echo "${{ github.event.number }}" > pr_number.txt
|
run: |
|
||||||
|
echo '${{ github.event.pull_request.number }}' > /tmp/pr_number.txt
|
||||||
|
|
||||||
- name: Upload profiling results
|
- name: Upload profiling results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hotpath-results
|
name: hotpath-results
|
||||||
path: |
|
path: |
|
||||||
head-timing.json
|
/tmp/head_timing.json
|
||||||
head-alloc.json
|
/tmp/head_alloc.json
|
||||||
base-timing.json
|
/tmp/base_timing.json
|
||||||
base-alloc.json
|
/tmp/base_alloc.json
|
||||||
pr_number.txt
|
/tmp/pr_number.txt
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue